From 56a60a990d44ec4f5a31c34af9f92001cf75b497 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Wed, 26 Mar 2025 11:18:55 +0100 Subject: [PATCH] =?UTF-8?q?Cargosoft=20Invoice=20import=20-=20skip=20if=20?= =?UTF-8?q?billing=20Text=20=3D=3D=20W=C3=84HRUNG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xml/CargosoftXMLInvoiceImportService.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportService.java index c88dac3..5d01dab 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportService.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportService.java @@ -634,6 +634,13 @@ public class CargosoftXMLInvoiceImportService { Node rowNode = rowList.item(i); if (rowNode.getNodeType() == Node.ELEMENT_NODE) { + // XPath-Ausdruck für den BillingCode + XPathExpression billingCodeExpr = xPath.compile("BillingCode/Codes/Code"); + String billingCode = (String) billingCodeExpr.evaluate(rowNode, XPathConstants.STRING); + // skip row wenn billing code = "WÄHRUNG" + if ("WÄHRUNG".equals(billingCode)) { + continue; // skip this row! + } // Get the FileNumber value String fileNumber = (String) fileNumberExpr.evaluate(rowNode, XPathConstants.STRING); childItemCol.setItemValue("datev.text", fileNumber); @@ -690,9 +697,6 @@ public class CargosoftXMLInvoiceImportService { * * und ggf. die ATC Nummer finden.... **/ - // XPath-Ausdruck für den BillingCode - XPathExpression billingCodeExpr = xPath.compile("BillingCode/Codes/Code"); - String billingCode = (String) billingCodeExpr.evaluate(rowNode, XPathConstants.STRING); childItemCol.setItemValue("BillingCode", billingCode); // XPath-Ausdruck für die BillingTexts XPathExpression billingTextsExpr = xPath.compile("BillingTexts/BillingText");