closes #579
This commit is contained in:
@@ -377,6 +377,25 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testImportPrepaid() throws XPathExpressionException, ParseException {
|
||||
InputStream inputStream = this.getClass()
|
||||
.getResourceAsStream("/EN16931_1_Teilrechnung.pdf");
|
||||
ZUGFeRDInvoiceImporter importer = new ZUGFeRDInvoiceImporter();
|
||||
importer.doIgnoreCalculationErrors();
|
||||
importer.setInputStream(inputStream);
|
||||
Invoice invoice = importer.extractInvoice();
|
||||
boolean isBD=invoice.getTotalPrepaidAmount() instanceof BigDecimal;
|
||||
assertTrue(isBD);
|
||||
BigDecimal expected=new BigDecimal(50);
|
||||
if (isBD) {
|
||||
BigDecimal amread=invoice.getTotalPrepaidAmount();
|
||||
assertTrue(amread.compareTo(expected) == 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testImportIncludedNotes() throws XPathExpressionException, ParseException {
|
||||
InputStream inputStream = this.getClass()
|
||||
|
||||
BIN
library/src/test/resources/EN16931_1_Teilrechnung.pdf
Normal file
BIN
library/src/test/resources/EN16931_1_Teilrechnung.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user