Package org.mustangproject
Class CashDiscount
- java.lang.Object
-
- org.mustangproject.CashDiscount
-
- All Implemented Interfaces:
IZUGFeRDCashDiscount
public class CashDiscount extends java.lang.Object implements IZUGFeRDCashDiscount
A class to represent discounts for early payments ("Skonto")
-
-
Constructor Summary
Constructors Constructor Description CashDiscount()bean contructorCashDiscount(java.math.BigDecimal percent, int days)Create a cash discount (skonto) with the specified height in the specified period.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAsCII()java.lang.StringgetAsXRechnung()since EN16931 voted not to have (or even allow) cash discounts in their core invoice the german XRechnung CIUS defined it's own proprietary format for a freetext fieldjava.lang.IntegergetDays()java.math.BigDecimalgetPercent()CashDiscountsetDays(java.lang.Integer days)CashDiscountsetPercent(java.math.BigDecimal percent)
-
-
-
Constructor Detail
-
CashDiscount
public CashDiscount(java.math.BigDecimal percent, int days)Create a cash discount (skonto) with the specified height in the specified period. Should someone add more period types than just "days" there is be space for a (optional) third parameter- Parameters:
percent- max 3 decimals "behind the dot", more precision is currently ignoreddays- the count of the periods (usually days) the percentage applies
-
CashDiscount
public CashDiscount()
bean contructor
-
-
Method Detail
-
getPercent
public java.math.BigDecimal getPercent()
-
setPercent
public CashDiscount setPercent(java.math.BigDecimal percent)
-
getDays
public java.lang.Integer getDays()
-
setDays
public CashDiscount setDays(java.lang.Integer days)
-
getAsCII
public java.lang.String getAsCII()
- Specified by:
getAsCIIin interfaceIZUGFeRDCashDiscount- Returns:
- this particular cash discount as cross industry invoice XML
-
getAsXRechnung
public java.lang.String getAsXRechnung()
since EN16931 voted not to have (or even allow) cash discounts in their core invoice the german XRechnung CIUS defined it's own proprietary format for a freetext field- Specified by:
getAsXRechnungin interfaceIZUGFeRDCashDiscount- Returns:
- this particular cash discount in proprietary xrechnung format
-
-