diff --git a/office-alexander-logistics-app/src/main/deprecated/SEPAExportAdapterNBD.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/sepa/SEPAExportAdapterExcel.java similarity index 90% rename from office-alexander-logistics-app/src/main/deprecated/SEPAExportAdapterNBD.java rename to office-alexander-logistics-app/src/main/java/com/alexanderlogistics/sepa/SEPAExportAdapterExcel.java index 7b045a0..00325c7 100644 --- a/office-alexander-logistics-app/src/main/deprecated/SEPAExportAdapterNBD.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/sepa/SEPAExportAdapterExcel.java @@ -1,4 +1,4 @@ -package com.alexanderlogistics.dwc; +package com.alexanderlogistics.sepa; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -30,7 +30,8 @@ import org.imixs.workflow.exceptions.PluginException; import org.imixs.workflow.exceptions.QueryException; import org.imixs.workflow.sepa.services.SepaWorkflowService; -import com.alexanderlogistics.KreditorDebitorService; +import com.alexanderlogistics.BusinessPartnerService; +import com.alexanderlogistics.InvoiceUtil; import com.alexanderlogistics.OPListExportAdapterByWeek; import jakarta.ejb.EJB; @@ -56,9 +57,9 @@ import jakarta.inject.Inject; * @version 1.0 * @author rsoika */ -public class SEPAExportAdapterNBD implements SignalAdapter { +public class SEPAExportAdapterExcel implements SignalAdapter { - private static Logger logger = Logger.getLogger(SEPAExportAdapterNBD.class.getName()); + private static Logger logger = Logger.getLogger(SEPAExportAdapterExcel.class.getName()); public static final String ERROR_CONFIG = "CONFIG_ERROR"; public static final String ERROR_MISSING_INVOICE = "ERROR_MISSING_INVOICE"; @@ -81,7 +82,7 @@ public class SEPAExportAdapterNBD implements SignalAdapter { SnapshotService snapshotService; @Inject - KreditorDebitorService kreditorDebitorService; + BusinessPartnerService businessPartnerService; /** * This method collects a data set with all invoices and computes a NBA Excel @@ -242,7 +243,7 @@ public class SEPAExportAdapterNBD implements SignalAdapter { logger.finest("......new document added"); } catch (IOException e) { - throw new PluginException(SEPAExportAdapterNBD.class.getSimpleName(), ERROR_CONFIG, + throw new PluginException(SEPAExportAdapterExcel.class.getSimpleName(), ERROR_CONFIG, "failed to update sepa export: " + e.getMessage()); } } @@ -289,17 +290,12 @@ public class SEPAExportAdapterNBD implements SignalAdapter { String result = ""; ItemCollection cdtrItemCol = null; - String cdtrNumber = workitem.getItemValueString("cdtr.number"); + cdtrItemCol = businessPartnerService.getBusinessPartnerByID(InvoiceUtil.getBPID(workitem)); - try { - cdtrItemCol = kreditorDebitorService.findCreditor(cdtrNumber); - } catch (PluginException e) { - logger.warning("Unable to resolve address for " + cdtrNumber + " : " + e.getMessage()); - } if (cdtrItemCol != null) { - result = result + cdtrItemCol.getItemValueString("_vendor_zip_code") + " "; - result = result + cdtrItemCol.getItemValueString("_vendor_city") + " "; - result = result + cdtrItemCol.getItemValueString("_vendor_str") + " "; + result = result + cdtrItemCol.getItemValueString("partner.zip") + " "; + result = result + cdtrItemCol.getItemValueString("partner.city") + " "; + result = result + cdtrItemCol.getItemValueString("partner.address") + " "; } // length max 255 @@ -308,16 +304,10 @@ public class SEPAExportAdapterNBD implements SignalAdapter { } private String getVendorField(ItemCollection workitem, String fieldname) { - String result = ""; + ItemCollection cdtrItemCol = null; - String cdtrNumber = workitem.getItemValueString("cdtr.number"); - - try { - cdtrItemCol = kreditorDebitorService.findCreditor(cdtrNumber); - } catch (PluginException e) { - logger.warning("Unable to resolve address for " + cdtrNumber + " : " + e.getMessage()); - } + cdtrItemCol = businessPartnerService.getBusinessPartnerByID(InvoiceUtil.getBPID(workitem)); if (cdtrItemCol != null) { return cdtrItemCol.getItemValueString(fieldname); } diff --git a/workflow/usa/sepa-export-manual-usa-3.0.2.bpmn b/workflow/usa/sepa-export-manual-usa-3.0.2.bpmn new file mode 100644 index 0000000..eebf822 --- /dev/null +++ b/workflow/usa/sepa-export-manual-usa-3.0.2.bpmn @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + application.urlindex.jsf?workitem=$uniqueid + +]]> + + + application.urlindex.jsf?workitem=$uniqueid + +]]> + + + + + + + + + + + + + + IntermediateCatchEvent_6 + IntermediateCatchEvent_1 + IntermediateCatchEvent_7 + Task_2 + ExclusiveGateway_1 + Task_1 + StartEvent_2 + IntermediateCatchEvent_2 + IntermediateCatchEvent_18 + IntermediateCatchEvent_3 + Task_7 + Task_6 + EndEvent_3 + IntermediateCatchEvent_4 + IntermediateCatchEvent_5 + + textAnnotation_Ku1gIw + event_KyxeBg + TextAnnotation_1 + textAnnotation_0HzKVA + + + + + + $created (dbtr.name)]]> + + + true + + + + + + + + + + + + Payment Run
+Bank: dbtr.name
+Created: $created
+IBAN/Currency: name
]]>
+
+ + + +
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_2 + SequenceFlow_10 + sequenceFlow_eTlV8A +
+ + + + + SequenceFlow_10 + SequenceFlow_17 + + + + + + $created (dbtr.name)]]> + + + true + + + + + + + + + + + + Payment Run
+Bank: dbtr.name
+Created: $created
+IBAN/Currency: name
]]>
+
+ + + +
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_19 + SequenceFlow_17 +
+ + + + + SequenceFlow_28 + SequenceFlow_18 + SequenceFlow_1 + + + + + + $created (dbtr.name)]]> + + + true + + + + + + + + + + + + + + + + + + + Payment Run
+Bank: dbtr.name
+Created: $created
+IBAN/Currency: name
]]>
+
+ + + + + + +
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_12 + SequenceFlow_7 + SequenceFlow_8 + SequenceFlow_28 +
+ + + + + + + + + + + + + Invoice Controlling]]> + + + + + + SequenceFlow_7 + + SequenceFlow_6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home + + (^rechnungseingang) + 5500 + 300 + +]]> + + + + + + + + + false + + + + SequenceFlow_4 + SequenceFlow_2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Invoice Controlling]]> + + + + + + + + + + + + false + + + + SequenceFlow_12 + + + + + + SequenceFlow_6 + + + + + + + + + + + + + + + + + + + + + SequenceFlow_8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_18 + SequenceFlow_5 + SequenceFlow_19 + + + + + + + + + + + $created (dbtr.name)]]> + + + + + + + + + + + + + + + + + + + Payment Run
+Bank: dbtr.name
+Created: $created
+IBAN/Currency: name
]]>
+
+ + + + + + + + + +
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_3 + SequenceFlow_11 + SequenceFlow_9 + SequenceFlow_4 + SequenceFlow_5 + sequenceFlow_Taezjw +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SEPA-USA + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SEPA-Body]]> + + + + SequenceFlow_1 + SequenceFlow_3 + + + DataOutput_2 + + + DataOutput_2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SEPA-USA + + +]]> + + + + + + + + + false + + + + + + + + + + + + + + + + + + SEPA-Body]]> + + + + + + + SequenceFlow_11 + + + DataOutput_1 + + + DataOutput_1 + + + + + + + + + + + + + + + + + (^rechnungseingang) + 5500 + 320 +]]> + + + + + + SequenceFlow_9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_5 + sequenceFlow_eTlV8A + sequenceFlow_Taezjw + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +