19 package org.turro.financials.model.document;
21 import java.util.Currency;
22 import org.turro.financials.entity.Document;
23 import org.turro.financials.entity.DocumentLine;
24 import org.turro.zkoss.locale.Currencies;
37 this.document = document;
52 amount += at.getAmount();
60 amount += at.getDiscount();
68 if(at.isPerCent(0.0)) {
69 amount += at.getTaxable();
71 amount += at.getTotal();
75 amount -= ar.getRetained();
85 private void createAmounts() {
89 int fractionDigits =
getCurrency().getDefaultFractionDigits();
93 dl.setLineOrder(count++);
94 double tax = dl.getFullTax();
98 taxables.
add(tax, dl.getTax(), dl.getEquivalenceSurcharge(),
99 dl.getTaxValue(), dl.getRealTaxValue(), dl.getEquivalenceSurchargeValue(),
100 dl.getSubtotal(), dl.getTaxable(), fractionDigits);
101 if(dl.getRetention() != 0.0) {
102 retentions.
add(dl.getRetention(), dl.getTaxable(), fractionDigits);
111 private Currency currency;
114 if(currency ==
null && document.
getContract() !=
null) {
OperatingModifier getOperatingModifier()
boolean isEquivalenceSurcharge()
Set< DocumentLine > getDocumentLines()
boolean add(Double perCent, Double taxable, int fractionDigits)
boolean add(Double perCent, Double tax, Double req, Double taxValue, Double taxRealValue, Double reqValue, Double subtotal, Double taxable, int fractionDigits)
DocumentAmounts(Document document)
AmountTaxableSet getTaxables()
AmountRetainedSet getRetentions()
static Currency getDefault()
boolean isSumTax(DocumentLine line)