public class Charge extends java.lang.Object implements IZUGFeRDAllowanceCharge
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
categoryCode
the category ID why this charge has been applied
|
protected java.math.BigDecimal |
percent
the percentage, null if not relative at all
|
protected java.lang.String |
reason
a simple human readable description
|
protected java.math.BigDecimal |
taxPercent
the tax rate the charge belongs to
|
protected java.math.BigDecimal |
totalAmount
the absolute value if not percentage
|
| Constructor and Description |
|---|
Charge()
Bean connstructor
|
Charge(java.math.BigDecimal totalAmount)
creates a item level or invoice level charge
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCategoryCode()
the category ID why this has been applied
|
java.math.BigDecimal |
getPercent()
returns a percentage, if relative abount, or null for absolute amounts
|
java.lang.String |
getReason()
get a description for the allowance/charge
|
java.math.BigDecimal |
getTaxPercent()
get the applicable tax percentage for the allowance/charge
|
java.math.BigDecimal |
getTotalAmount(IAbsoluteValueProvider currentItem)
returns the absolute amount, even if it was relative in the first place
|
boolean |
isCharge()
Always to return true for IZUGFeRDAllowanceCharge
|
Charge |
setCategoryCode(java.lang.String categoryCode)
machine readable reason for this allowance/charge
|
Charge |
setPercent(java.math.BigDecimal percent)
if relative charge: percent to increase the item
|
Charge |
setReason(java.lang.String reason)
Freetext (?)
|
Charge |
setTaxPercent(java.math.BigDecimal taxPercent)
charges can be applied to VAT items, in which case they take the same VAT rate
|
Charge |
setTotalAmount(java.math.BigDecimal totalAmount)
sets the total amount to be changed to, e.g. if not specified via constructor
|
protected java.math.BigDecimal percent
protected java.math.BigDecimal totalAmount
protected java.math.BigDecimal taxPercent
protected java.lang.String reason
protected java.lang.String categoryCode
public Charge()
public Charge(java.math.BigDecimal totalAmount)
totalAmount - (the absolute amount)public Charge setTotalAmount(java.math.BigDecimal totalAmount)
totalAmount - 2 decimal money amountpublic Charge setPercent(java.math.BigDecimal percent)
percent - as bigdecimalpublic Charge setTaxPercent(java.math.BigDecimal taxPercent)
taxPercent - the tax percentage on the chargepublic java.lang.String getReason()
IZUGFeRDAllowanceChargegetReason in interface IZUGFeRDAllowanceChargepublic Charge setReason(java.lang.String reason)
reason - freetextpublic java.math.BigDecimal getTotalAmount(IAbsoluteValueProvider currentItem)
IZUGFeRDAllowanceChargegetTotalAmount in interface IZUGFeRDAllowanceChargecurrentItem - the class delivering the initial valuepublic java.math.BigDecimal getPercent()
IZUGFeRDAllowanceChargegetPercent in interface IZUGFeRDAllowanceChargepublic java.math.BigDecimal getTaxPercent()
IZUGFeRDAllowanceChargegetTaxPercent in interface IZUGFeRDAllowanceChargepublic boolean isCharge()
isCharge in interface IZUGFeRDAllowanceChargepublic java.lang.String getCategoryCode()
IZUGFeRDAllowanceChargegetCategoryCode in interface IZUGFeRDAllowanceChargepublic Charge setCategoryCode(java.lang.String categoryCode)
categoryCode - usually SCopyright © 2023. All rights reserved.