19 package org.turro.financials.treasury.m303m;
21 import java.util.Date;
22 import org.amic.util.date.CheckDate;
23 import org.turro.jpa.Dao;
33 private Double amountDeclared;
42 return amountDeclared ==
null ? 0 : amountDeclared;
53 private void fillData() {
55 "select sum(e.credit) from RegisterEntry e " +
56 "where e.register.registerDate <= ? " +
57 "and e.register.registerDate >= ? " +
58 "and e.register.view.id = 1 " +
59 "and (e.register.exclude = FALSE and e.register.closing = FALSE and e.register.regularizeVAT = FALSE) " +
61 "and e.account.id = ?",
63 if(amountDeclared ==
null || amountDeclared == 0) {
65 "select sum(e.debit) from RegisterEntry e " +
66 "where e.register.registerDate <= ? " +
67 "and e.register.registerDate >= ? " +
68 "and e.register.view.id = 1 " +
69 "and (e.register.exclude = FALSE and e.register.closing = FALSE and e.register.regularizeVAT = FALSE) " +
71 "and e.account.id = ?",
74 if(amountDeclared !=
null) {
75 amountDeclared = -amountDeclared;
81 return new CheckDate(
set.getExercise(), month, 1, 0, 0, 0).addDays(26).getDate();
85 return new CheckDate(
set.getExercise(), month + 1, 1, 0, 0, 0).addDays(-1).addDays(25).getDate();
89 return new CheckDate(
set.getExercise(), month + 1, 1, 0, 0, 0).addDays(-1).getDate();
double getAmountDeclared()
DeclaredMonth(ModelSet set, int month)
Object getSingleResult(WhereClause wc)