Enhance Charges/Allowances with reasonCode.

This commit is contained in:
langfr
2024-07-30 15:37:57 +01:00
parent 5da63fe80f
commit 77ddc7627d
5 changed files with 178 additions and 69 deletions

View File

@@ -26,6 +26,10 @@ public class Charge implements IZUGFeRDAllowanceCharge {
* a simple human readable description
*/
protected String reason;
/**
* Code from list UNTDID 5189
*/
protected String reasonCode;
/**
* the category ID why this charge has been applied
*/
@@ -94,6 +98,22 @@ public class Charge implements IZUGFeRDAllowanceCharge {
}
@Override
public String getReasonCode() {
return reasonCode;
}
/***
* Reason code for the charge
* @param reasonCode from list UNTDID 5189
* @return fluid setter
*/
public Charge setReasonCode(String reasonCode) {
this.reasonCode = reasonCode;
return this;
}
@Override
public BigDecimal getTotalAmount(IAbsoluteValueProvider currentItem) {
if (totalAmount!=null) {
@@ -137,7 +157,7 @@ public class Charge implements IZUGFeRDAllowanceCharge {
/***
* machine readable reason for this allowance/charge
* the category ID why this has been applied
* @param categoryCode usually S
* @return fluid setter
*/