18 package org.turro.financials.model.document;
21 import org.amic.util.date.CheckDate;
22 import org.turro.contacts.Address;
23 import org.turro.contacts.Contact;
24 import org.turro.elephant.db.WhereClause;
25 import org.turro.financials.db.FinancialsPU;
26 import org.turro.financials.entity.DocumentLine;
27 import org.turro.jpa.Dao;
36 return Arrays.asList(
new String[] {
51 List<Object[]> l =
new ArrayList<Object[]>();
76 wc.
addClause(
"select line from DocumentLine line join line.document doc");
77 wc.
addClause(
"where year(doc.receiptDate) = :year");
79 wc.
addClause(
"and doc.documentDefinition.id in (12, 2, 1, 51, 49, 46, 5, 15, 18, 52)");
80 wc.
addClause(
"and line.lineType.id in (12, 4, 97, 1, 3, 125, 150, 149, 151, 146, 147, 122, 123, 103, 126, 19, 135, 132, 169)");
84 for(
DocumentLine line : (List<DocumentLine>) dao.getResultList(wc)) {
86 switch((
int) line.getLineType().getId()) {
112 (line.getDocument().getForcedView() ==
null ?
"" : line.getDocument().getForcedView().getName()),
114 line.getDocument().getContract().getContractor());
115 at.
addOperationsAmount(
new CheckDate(line.getDocument().getReceiptDate()).getQuarter(), line.getToDeclare());
119 private AnnualTransaction getAnnualTransaction(String view, String opKey, String contractor) {
void addClause(String clause)
void addNamedValue(String name, Object value)
void addOperationsAmount(int quarter, double operationsAmount)
double getOperationsAmount(int quarter)
double getOperationsAmountSum()
int compareTo(AnnualTransaction o)
Collection< Object[]> getRows()
Collection< String > getColumns()
abstract String getLabel(String key)