Merge branch 'langfr-feature/1022'
This commit is contained in:
@@ -21,7 +21,9 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
|||||||
/***
|
/***
|
||||||
* the period (usually days) count how long the percent apply
|
* the period (usually days) count how long the percent apply
|
||||||
*/
|
*/
|
||||||
protected Integer days=null;
|
protected Integer days;
|
||||||
|
|
||||||
|
protected BigDecimal basisAmount;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Create a cash discount (skonto) with the specified height in the specified period.
|
* Create a cash discount (skonto) with the specified height in the specified period.
|
||||||
@@ -61,18 +63,31 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getBasisAmount() {
|
||||||
|
return basisAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CashDiscount setBasisAmount(BigDecimal basisAmount) {
|
||||||
|
this.basisAmount = basisAmount;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* @return this particular cash discount as cross industry invoice XML
|
* @return this particular cash discount as cross industry invoice XML
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getAsCII() {
|
public String getAsCII() {
|
||||||
return "<ram:SpecifiedTradePaymentTerms>"+
|
String s = "<ram:SpecifiedTradePaymentTerms>"
|
||||||
"<ram:Description>Cash Discount</ram:Description>"+
|
+ " <ram:Description>Cash Discount</ram:Description>"
|
||||||
" <ram:ApplicableTradePaymentDiscountTerms>"+
|
+ " <ram:ApplicableTradePaymentDiscountTerms>"
|
||||||
" <ram:BasisPeriodMeasure unitCode=\"DAY\">"+days+"</ram:BasisPeriodMeasure>"+
|
+ " <ram:BasisPeriodMeasure unitCode=\"DAY\">" + days + "</ram:BasisPeriodMeasure>";
|
||||||
" <ram:CalculationPercent>"+XMLTools.nDigitFormat(percent,3)+"</ram:CalculationPercent>"+
|
if (basisAmount != null) {
|
||||||
|
s += " <ram:BasisAmount>" + XMLTools.nDigitFormat(basisAmount, 2) + "</ram:BasisAmount>";
|
||||||
|
}
|
||||||
|
s += " <ram:CalculationPercent>"+XMLTools.nDigitFormat(percent,3)+"</ram:CalculationPercent>"+
|
||||||
" </ram:ApplicableTradePaymentDiscountTerms>"+
|
" </ram:ApplicableTradePaymentDiscountTerms>"+
|
||||||
"</ram:SpecifiedTradePaymentTerms>";
|
"</ram:SpecifiedTradePaymentTerms>";
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -84,8 +99,4 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
|||||||
public String getAsXRechnung() {
|
public String getAsXRechnung() {
|
||||||
return "#SKONTO#TAGE="+days+"#PROZENT="+XMLTools.nDigitFormat(percent,2)+"#\n";
|
return "#SKONTO#TAGE="+days+"#PROZENT="+XMLTools.nDigitFormat(percent,2)+"#\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user