19 package org.turro.financials.model.document.contract;
21 import java.util.Date;
22 import java.util.TreeSet;
23 import org.turro.financials.entity.Contract;
24 import org.turro.financials.entity.Document;
25 import org.turro.financials.entity.RegisterView;
26 import org.turro.i18n.I_;
35 Contract contract, Date from, Date to) {
36 fillPortfolio(documents, view, contract, from, to);
40 Contract contract, Date from, Date to) {
42 documents.
fillList(view, contract, from, to);
58 for(
final Document doc : documents) {
60 if(doc.getDocumentDefinition().getId() != 1 &&
61 doc.getDocumentDefinition().getId() != 67 &&
62 doc.getDocumentDefinition().getId() != 2 &&
63 doc.getDocumentDefinition().getId() != 43 &&
64 doc.getDocumentDefinition().getId() != 44 &&
65 doc.getDocumentDefinition().getId() != 6 &&
66 doc.getDocumentDefinition().getId() != 7) {
70 dp =
new DocumentPortfolio();
73 dp.
setDate(doc.getDocumentDate());
74 dp.
setConcept(doc.getDocumentDefinition().getName() +
" " + doc.getDocumentNumber());
76 double amount = doc.getTotalAmount();
78 switch ((
int) doc.getDocumentDefinition().getId()) {
82 final_balance += amount;
97 final_balance -= amount;
ContractPortfolioList(DocumentByContractList documents, RegisterView view, Contract contract, Date from, Date to)
void fillList(RegisterView view, Contract contract, Date from, Date to)
double getInitialBalance(RegisterView view, Contract contract, Date from, Date to)
void setPortfolio(Double portfolio)
void setDocument(Document document)
void setInvoice(Double invoice)
void setBalance(Double balance)
void setConcept(String concept)
void setSettlement(Double settlement)
static String get(String msg)