Cargosoft Invoice import - skip if billing Text == WÄHRUNG

This commit is contained in:
Ralph Soika 2025-03-26 11:18:55 +01:00
parent 0d5aa41e4d
commit 56a60a990d

View file

@ -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");