diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/einvoice/KSeFAdapter.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/einvoice/KSeFAdapter.java index 7be8685..45d17d0 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/einvoice/KSeFAdapter.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/einvoice/KSeFAdapter.java @@ -136,7 +136,7 @@ public class KSeFAdapter implements SignalAdapter { } /** - * THis method updates an e-invoice template with the data stored in the + * This method updates an e-invoice template with the data stored in the * workitem. * * First the method loads an EInvoiceModel based on the provided XML Template @@ -345,6 +345,13 @@ public class KSeFAdapter implements SignalAdapter { /** * Parses the data list of an invoice line and returns a TradeLineItem object. * The order of the list items must be exactly! + * + * # 16.04.2026 + * Laut Herrn Grzegorz Grzelczyk dürfen in den Rechnungspositionen nur netto + * werte eingetragen sein. Siehe buildTradeLineItem() + * + * Des weiteren soll anstatt datev.text (pos nummer) der original billing text + * ausgewiesen werden */ private TradeLineItem buildTradeLineItem(ItemCollection orderItem, int pos) { if (orderItem == null) { @@ -357,16 +364,27 @@ public class KSeFAdapter implements SignalAdapter { // invoices! TradeLineItem tradeLineItem = new TradeLineItem(pos + ""); - tradeLineItem.setName(orderItem.getItemValueString("datev.text")); + // Herrn Grzegorz Grzelczyk möchte hier BillingText + // tradeLineItem.setName(orderItem.getItemValueString("datev.text")); + tradeLineItem.setName(orderItem.getItemValueString("billingtext")); + tradeLineItem.setQuantity(1); double vat = orderItem.getItemValueDouble("datev.vatrate"); // 23.00 double netto = orderItem.getItemValueDouble("datev.umsatz"); // 970.00 - double brutto = netto * (1 + (vat / 100)); - double steuer = brutto - netto; + + // # 16.04.2026 + // Der total bezieht sich laut Herrn Grzegorz Grzelczyk ausschließlich auf den + // Nettowert x Menge. + // Der Brutto Wert ist hier falsch! Da die Menge immer 1 ist ist das beide male + // der selbe wert + // WRONG: tradeLineItem.setTotal(brutto); + + // double brutto = netto * (1 + (vat / 100)); + // double steuer = brutto - netto; tradeLineItem.setTaxRate(vat); tradeLineItem.setNetPrice(netto); - tradeLineItem.setTotal(brutto); + tradeLineItem.setTotal(netto); // menge x netto return tradeLineItem; } 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 a0e128f..0577495 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 @@ -332,6 +332,8 @@ public class CargosoftXMLInvoiceImportService { * Creates and processes a new workitem with a given xml information from the * fileData * + * Hier wird das Corgosoft XML geparst und die Felder in Imixs gefüllt. Z.b. + * werden hier auch die ChildItems angelegt. * * @return * @throws ModelException @@ -628,7 +630,10 @@ public class CargosoftXMLInvoiceImportService { 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)) { + // # Ergänzung 16.4.2026 + // Da dieses flag von Cargosoft machmachmal auch 'KURS' lautet müssen wir das + // auch berücksichtigen. + if ("WÄHRUNG".equals(billingCode) || "KURS".equals(billingCode)) { continue; // skip this row! } // Get the FileNumber value