Fix invoice calculation if rounding amount is present

This commit is contained in:
Marcel
2025-01-01 14:04:50 +01:00
parent 9b846ff4b6
commit 29ea8534f2
4 changed files with 345 additions and 11 deletions

View File

@@ -466,4 +466,12 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
assertFalse(invoice.getZFItems()[0].getNotes() == null);
assertEquals(1, invoice.getZFItems()[0].getNotes().length);
}
@Test
public void testImportXRechnungWithoutCalculationErrors() throws FileNotFoundException, XPathExpressionException, ParseException {
File inputFile = getResourceAsFile("cii/02.03a-INVOICE_uncefact.xml");
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(new FileInputStream(inputFile));
assertEquals("0", zii.importedInvoice.getDuePayable().toPlainString());
}
}

File diff suppressed because one or more lines are too long