19 package org.turro.financials.model.document;
21 import org.turro.math.Round;
29 private Double perCent, tax, req, taxValue, taxRealValue, reqValue, amount, taxable;
30 private int fractionDigits;
33 this.perCent = perCent;
43 public void add(Double taxValue, Double taxRealValue, Double reqValue, Double amount, Double taxable) {
44 this.taxValue += taxValue;
45 this.taxRealValue += taxRealValue;
46 this.reqValue += reqValue;
47 this.amount += amount;
48 this.taxable += taxable;
52 return this.perCent.equals(perCent);
56 this.fractionDigits = fractionDigits;
68 return new Round(amount - taxable).
decimals(fractionDigits).value();
111 return taxable + taxValue;
115 return amount ==
null || amount == 0 || amount.isNaN();
121 hash = 23 * hash + (this.perCent !=
null ? this.perCent.hashCode() : 0);
130 if (getClass() != obj.getClass()) {
134 if (this.perCent != other.perCent && (
this.perCent ==
null || !
this.perCent.equals(other.perCent))) {
142 return perCent.compareTo(o.perCent);
void add(Double taxValue, Double taxRealValue, Double reqValue, Double amount, Double taxable)
boolean equals(Object obj)
int compareTo(AmountTaxable o)
AmountTaxable(Double perCent, Double tax, Double req)
boolean isPerCent(Double perCent)
Double getFullTaxAmount()
Double getTaxRealAmount()
void setFractionDigits(int fractionDigits)
Round decimals(int digits)