starting with document level charges/allowances via invoice class
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user