closes #618
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
- correcly write charge reason codes also for non-Xrechnung
|
||||
- correcly write charge reason codes also for non-Xrechnung #617
|
||||
- correctly import additional referenced documents into invoice/corrected setting of attachments from jackson
|
||||
- corrected parseException structure
|
||||
- allow 1p0 as potential xmp version number
|
||||
- #618 import BT-20
|
||||
|
||||
2.15.1
|
||||
=======
|
||||
|
||||
@@ -262,7 +262,7 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
||||
* @return the Payment Terms
|
||||
*/
|
||||
public String getPaymentTerms() {
|
||||
return extractString("//*[local-name() = 'SpecifiedTradePaymentTerms']//*[local-name() = 'Description']");
|
||||
return importedInvoice.getPaymentTermDescription();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -644,6 +644,12 @@ public class ZUGFeRDInvoiceImporter {
|
||||
String currency = extractString("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]/*[local-name()=\"InvoiceCurrencyCode\"]|//*[local-name()=\"DocumentCurrencyCode\"]");
|
||||
zpp.setCurrency(currency);
|
||||
|
||||
String paymentTermsDescription = extractString("//*[local-name()=\"SpecifiedTradePaymentTerms\"]/*[local-name()=\"Description\"]|//*[local-name()=\"PaymentTerms\"]/*[local-name()=\"Note\"]");
|
||||
if ((paymentTermsDescription!=null)&&(!paymentTermsDescription.isEmpty())) {
|
||||
zpp.setPaymentTermDescription(paymentTermsDescription);
|
||||
}
|
||||
|
||||
|
||||
xpr = xpath.compile("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]|//*[local-name()=\"ApplicableSupplyChainTradeSettlement\"]");
|
||||
NodeList headerTradeSettlementNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||
List<BankDetails> bankDetails = new ArrayList<>();
|
||||
@@ -660,6 +666,9 @@ public class ZUGFeRDInvoiceImporter {
|
||||
&& (headerTradeSettlementChilds.item(settlementChildIndex).getLocalName().equals("SpecifiedTradePaymentTerms"))) {
|
||||
NodeList paymentTermChilds = headerTradeSettlementChilds.item(settlementChildIndex).getChildNodes();
|
||||
for (int paymentTermChildIndex = 0; paymentTermChildIndex < paymentTermChilds.getLength(); paymentTermChildIndex++) {
|
||||
if ((paymentTermChilds.item(paymentTermChildIndex).getLocalName() != null) && (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("Description"))) {
|
||||
zpp.setPaymentTermDescription(paymentTermChilds.item(paymentTermChildIndex).getTextContent());
|
||||
}
|
||||
if ((paymentTermChilds.item(paymentTermChildIndex).getLocalName() != null) && (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("DueDateDateTime"))) {
|
||||
NodeList dueDateChilds = paymentTermChilds.item(paymentTermChildIndex).getChildNodes();
|
||||
for (int dueDateChildIndex = 0; dueDateChildIndex < dueDateChilds.getLength(); dueDateChildIndex++) {
|
||||
|
||||
@@ -76,6 +76,7 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
||||
assertEquals("LTR", invoice.getZFItems()[2].getProduct().getUnit());
|
||||
assertEquals("7.00", invoice.getZFItems()[0].getProduct().getVATPercent().toString());
|
||||
assertEquals("RE-20170509/505", invoice.getNumber());
|
||||
assertEquals("Zahlbar ohne Abzug bis zum 30.05.2017", invoice.getPaymentTermDescription());
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
assertEquals("2017-05-09", sdf.format(invoice.getIssueDate()));
|
||||
@@ -127,7 +128,7 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
||||
assertEquals(invoice.getZFItems()[0].getNotesWithSubjectCode().get(0).getContent(),"Something");
|
||||
assertEquals(invoice.getZFItems()[0].getNotesWithSubjectCode().size(),1);
|
||||
assertEquals("400", invoice.getZFItems()[1].getQuantity().toString());
|
||||
|
||||
assertEquals("Zahlbar ohne Abzug bis zum 30.05.2017", invoice.getPaymentTermDescription());
|
||||
assertEquals("AB321", invoice.getReferenceNumber());
|
||||
assertEquals("160", invoice.getZFItems()[0].getPrice().toString());
|
||||
assertEquals("Heiße Luft pro Liter", invoice.getZFItems()[2].getProduct().getName());
|
||||
|
||||
Reference in New Issue
Block a user