- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 26 of file Amount.java.
◆ Amount()
org.turro.financials.model.Amount.Amount |
( |
Double |
tax, |
|
|
Double |
subtotal, |
|
|
Double |
discount, |
|
|
Double |
retained, |
|
|
int |
fractionDigits |
|
) |
| |
Definition at line 32 of file Amount.java.
34 this.subtotal = subtotal;
35 this.discount = discount;
36 this.retained = retained;
37 this.fractionDigits = fractionDigits;
◆ addTax()
void org.turro.financials.model.Amount.addTax |
( |
Double |
tax, |
|
|
Double |
subtotal, |
|
|
Double |
discount, |
|
|
Double |
retained |
|
) |
| |
Definition at line 48 of file Amount.java.
50 this.subtotal += subtotal;
51 this.discount += discount;
52 this.retained += retained;
◆ compareTo()
int org.turro.financials.model.Amount.compareTo |
( |
Amount |
o | ) |
|
Definition at line 110 of file Amount.java.
111 return tax.compareTo(o.getTax());
◆ equals()
boolean org.turro.financials.model.Amount.equals |
( |
Object |
obj | ) |
|
Definition at line 88 of file Amount.java.
92 if (getClass() != obj.getClass()) {
96 if (this.tax != other.tax && (
this.tax ==
null || !
this.tax.equals(other.tax))) {
Amount(Double tax, Double subtotal, Double discount, Double retained, int fractionDigits)
◆ getAmount()
Double org.turro.financials.model.Amount.getAmount |
( |
| ) |
|
Definition at line 79 of file Amount.java.
81 return new Round((
getTaxable() * (1.0 + tax / 100.0))).decimals(fractionDigits).value() - retained;
◆ getDiscount()
Double org.turro.financials.model.Amount.getDiscount |
( |
| ) |
|
◆ getRetained()
Double org.turro.financials.model.Amount.getRetained |
( |
| ) |
|
◆ getSubtotal()
Double org.turro.financials.model.Amount.getSubtotal |
( |
| ) |
|
◆ getTax()
Double org.turro.financials.model.Amount.getTax |
( |
| ) |
|
◆ getTaxable()
Double org.turro.financials.model.Amount.getTaxable |
( |
| ) |
|
Definition at line 71 of file Amount.java.
72 return new Round(subtotal - discount).decimals(fractionDigits).value();
◆ getTaxValue()
Double org.turro.financials.model.Amount.getTaxValue |
( |
| ) |
|
◆ hashCode()
int org.turro.financials.model.Amount.hashCode |
( |
| ) |
|
Definition at line 103 of file Amount.java.
105 hash = 97 * hash + (this.tax !=
null ? this.tax.hashCode() : 0);
◆ isEmpty()
boolean org.turro.financials.model.Amount.isEmpty |
( |
| ) |
|
Definition at line 44 of file Amount.java.
45 return subtotal ==
null || subtotal == 0 || subtotal.isNaN();
◆ setAmountSet()
void org.turro.financials.model.Amount.setAmountSet |
( |
AmountSet |
amountSet | ) |
|
Definition at line 40 of file Amount.java.
41 this.amountSet = amountSet;
The documentation for this class was generated from the following file: