starting with document level charges/allowances via invoice class

This commit is contained in:
Jochen Stärk
2020-09-29 21:36:56 +02:00
parent b707559507
commit 7dde7e7180
6 changed files with 44 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
package org.mustangproject;
import org.mustangproject.ZUGFeRD.IExportableTransaction;
import org.mustangproject.ZUGFeRD.IZUGFeRDAllowanceCharge;
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableItem;
@@ -64,6 +65,17 @@ public class Charge implements IZUGFeRDAllowanceCharge {
}
}
@Override
public BigDecimal getTotalAmount(IExportableTransaction currentTrans) {
// if (totalAmount!=null) {
return totalAmount;
// } else //if (percent!=null) {
// to be implemented return currentItem.get().multiply(getPercent().divide(new BigDecimal(100)));
//} else {
// throw new RuntimeException("Either totalAmount or percent must be set");
// }
}
public BigDecimal getPercent() {
return percent;