public class TransactionCalculator extends java.lang.Object implements IAbsoluteValueProvider
LineCalculator| Modifier and Type | Field and Description |
|---|---|
protected IExportableTransaction |
trans |
| Constructor and Description |
|---|
TransactionCalculator(IExportableTransaction trans) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getAllowanceReasonForPercent(java.math.BigDecimal percent)
returns a (potentially concatenated) string of allowance reasons, or
"Allowances", if none are defined
|
protected java.math.BigDecimal |
getAllowancesForPercent(java.math.BigDecimal percent)
returns total of allowances for this tax rate
|
java.math.BigDecimal |
getAllowanceTotal() |
protected java.lang.String |
getChargeReasonForPercent(java.math.BigDecimal percent)
returns a (potentially concatenated) string of charge reasons, or "Charges"
if none are defined
|
protected java.math.BigDecimal |
getChargesForPercent(java.math.BigDecimal percent)
returns total of charges for this tax rate
|
java.math.BigDecimal |
getChargeTotal() |
java.math.BigDecimal |
getGrandTotal()
the invoice total with VAT, corrected by prepaid amount, allowances and
charges
|
protected java.math.BigDecimal |
getTaxBasis()
returns the total net value of the invoice, including charges/allowances on
document level
|
protected java.math.BigDecimal |
getTotal()
returns the total net value of all items, without document level
charges/allowances
|
protected java.math.BigDecimal |
getTotalPrepaid()
if something had already been paid in advance, this will get it from the
transaction
|
java.math.BigDecimal |
getValue() |
protected java.util.HashMap<java.math.BigDecimal,VATAmount> |
getVATPercentAmountMap()
which taxes have been used with which amounts in this transaction, empty for
no taxes, or e.g. 19:190 and 7:14 if 1000 Eur were applicable to 19% VAT
(=190 EUR VAT) and 200 EUR were applicable to 7% (=14 EUR VAT) 190 Eur
|
protected IExportableTransaction trans
public TransactionCalculator(IExportableTransaction trans)
trans - the invoice (or IExportableTransaction) to be calculatedprotected java.math.BigDecimal getTotalPrepaid()
public java.math.BigDecimal getGrandTotal()
protected java.math.BigDecimal getChargesForPercent(java.math.BigDecimal percent)
percent - a specific rate, or null for any rateprotected java.lang.String getChargeReasonForPercent(java.math.BigDecimal percent)
percent - a specific rate, or null for any rateprotected java.lang.String getAllowanceReasonForPercent(java.math.BigDecimal percent)
percent - a specific rate, or null for any rateprotected java.math.BigDecimal getAllowancesForPercent(java.math.BigDecimal percent)
percent - a specific rate, or null for any rateprotected java.math.BigDecimal getTotal()
protected java.math.BigDecimal getTaxBasis()
protected java.util.HashMap<java.math.BigDecimal,VATAmount> getVATPercentAmountMap()
public java.math.BigDecimal getValue()
getValue in interface IAbsoluteValueProviderpublic java.math.BigDecimal getChargeTotal()
public java.math.BigDecimal getAllowanceTotal()
Copyright © 2023. All rights reserved.