19 package org.turro.financials.treasury.m303m;
21 import javax.persistence.NoResultException;
22 import org.turro.jpa.Dao;
29 private String account;
31 private Double amountVat, declaredVat, pendingVat;
51 "select a.id from Account as a where a.id like ?",
62 return amountVat - (declaredVat + pendingVat);
89 private void fillData() {
93 "select a.id, sum(e.debit), sum(e.credit) from RegisterEntry e " +
94 "join e.register r " +
96 "where r.registerDate <= ? " +
97 "and r.registerDate >= ? " +
98 "and r.view.id = 1 " +
99 "and (r.exclude = FALSE and r.closing = FALSE and r.regularizeVAT = FALSE) " +
104 account = (String) objs[0];
106 amountVat = (Double) (objs[1] ==
null ? 0.0 : objs[1]);
108 amountVat = (Double) (objs[2] ==
null ? 0.0 : objs[2]);
111 }
catch(NoResultException ex) {
117 "select a.id, sum(e.debit), sum(e.credit) from RegisterEntry e " +
118 "join e.register r " +
119 "join e.account a " +
120 "where r.registerDate <= ? " +
121 "and r.registerDate >= ? " +
122 "and r.view.id = 1 " +
123 "and (r.exclude = FALSE and r.closing = FALSE and r.regularizeVAT = FALSE) " +
128 account = (String) objs[0];
130 declaredVat = (Double) (objs[2] ==
null ? 0.0 : objs[2]);
132 declaredVat = (Double) (objs[1] ==
null ? 0.0 : objs[1]);
135 }
catch(NoResultException ex) {
Date getFinalDeclaredDate()
Date getMonthInitialDate()
Date getMonthDeclaredDate()
double getToDeclareAmountVat()
void setPendingVat(double value)
VatEntry(int vat, EntryMonth month)
double getToDeclareAmountOp()
Object getSingleResult(WhereClause wc)