i’m currently working with the Mustangproject to create an XRechnung invoice. Allowances on document level are working fine. But when i try to add an allowance on invoice line level error is: The method addAllowance(IZUGFeRDAllowanceCharge) is undefined for the type Product.
as well as for Item (in case i cant read the documentation): The method addAllowance(IZUGFeRDAllowanceCharge) is undefined for the type Item
The Code:
IZUGFeRDAllowanceCharge allowance = new Allowance()
.setPercent(new BigDecimal(12))
.setReason("Reason")
.setCategoryCode("test")
.setTaxPercent(new BigDecimal(19))
.setTotalAmount(new BigDecimal(100));
Item item = new Item(null, null, null);
item.setProduct(new Product(description, name, unit, vATPercent));
item.setPrice(invoiceLine.priceDetails.itemNetPrice.getContent());
item.setQuantity(invoiceLine.invoicedQuantity.getContent());
Product product = new Product(null, null, null, null);
item.addAllowance(allowance);
I want to add Allowances and Charges on Invoice Line level (for 1 product only).
The addAllowance method wont get recognized.
Jonas Stengel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.