update ksef
This commit is contained in:
parent
fb3f086192
commit
f61c7feca5
3 changed files with 19 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ import javax.crypto.Cipher;
|
||||||
import javax.crypto.spec.IvParameterSpec;
|
import javax.crypto.spec.IvParameterSpec;
|
||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|
||||||
|
import org.imixs.archive.core.SnapshotService;
|
||||||
import org.imixs.workflow.FileData;
|
import org.imixs.workflow.FileData;
|
||||||
import org.imixs.workflow.ItemCollection;
|
import org.imixs.workflow.ItemCollection;
|
||||||
import org.imixs.workflow.engine.DocumentService;
|
import org.imixs.workflow.engine.DocumentService;
|
||||||
|
|
@ -53,6 +54,9 @@ public class KSeFAPIService {
|
||||||
@Inject
|
@Inject
|
||||||
DocumentService documentService;
|
DocumentService documentService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
SnapshotService snapshotService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method uploads a KSeF Invoice document (XML).
|
* This method uploads a KSeF Invoice document (XML).
|
||||||
* The response of the upload is a 'referenceNumber' which is stored into the
|
* The response of the upload is a 'referenceNumber' which is stored into the
|
||||||
|
|
@ -85,8 +89,18 @@ public class KSeFAPIService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load invoice XML
|
// Load invoice XML
|
||||||
|
byte[] invoiceXml = null;
|
||||||
FileData fileData = workitem.getFileData(fileName);
|
FileData fileData = workitem.getFileData(fileName);
|
||||||
byte[] invoiceXml = fileData.getContent();
|
// test if we need to load the snapshot data...
|
||||||
|
if (fileData.getContent().length == 0) {
|
||||||
|
fileData = snapshotService.getWorkItemFile(workitem.getUniqueID(), fileName);
|
||||||
|
if (fileData != null) {
|
||||||
|
invoiceXml = fileData.getContent();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
invoiceXml = fileData.getContent();
|
||||||
|
}
|
||||||
|
|
||||||
logger.info("│ ├── XML Invoice loaded - " + invoiceXml.length + " bytes");
|
logger.info("│ ├── XML Invoice loaded - " + invoiceXml.length + " bytes");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,8 @@ public class BusinessPartnerImportService {
|
||||||
businesspartner.setItemValue("partner.zip", importDoc.getItemValueString("_vendor_zip_code"));
|
businesspartner.setItemValue("partner.zip", importDoc.getItemValueString("_vendor_zip_code"));
|
||||||
businesspartner.setItemValue("partner.city", importDoc.getItemValueString("_vendor_city"));
|
businesspartner.setItemValue("partner.city", importDoc.getItemValueString("_vendor_city"));
|
||||||
|
|
||||||
|
businesspartner.setItemValue("partner.vat", importDoc.getItemValueString("_vendor_registration_id"));
|
||||||
|
|
||||||
// hat sich das Objekt verändert?
|
// hat sich das Objekt verändert?
|
||||||
if (!businesspartner.equals(oldBussinessPartnerItemColl)) {
|
if (!businesspartner.equals(oldBussinessPartnerItemColl)) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1379,7 +1379,7 @@ Wiedervorlage wird um 7 bzw. 5 Tage erhöht</bpmn2:text>
|
||||||
<bpmn2:sequenceFlow id="sequenceFlow_4IITzA" sourceRef="IntermediateCatchEvent_6" targetRef="task_LqbtSQ">
|
<bpmn2:sequenceFlow id="sequenceFlow_4IITzA" sourceRef="IntermediateCatchEvent_6" targetRef="task_LqbtSQ">
|
||||||
<bpmn2:documentation id="documentation_0HA5Tw"/>
|
<bpmn2:documentation id="documentation_0HA5Tw"/>
|
||||||
</bpmn2:sequenceFlow>
|
</bpmn2:sequenceFlow>
|
||||||
<bpmn2:task id="task_nKKaIg" imixs:processid="4100" name="Processsing E-Invoice">
|
<bpmn2:task id="task_nKKaIg" imixs:processid="4100" name="Create KSeF XML">
|
||||||
<bpmn2:extensionElements>
|
<bpmn2:extensionElements>
|
||||||
<imixs:item name="txteditorid" type="xs:string">
|
<imixs:item name="txteditorid" type="xs:string">
|
||||||
<imixs:value><![CDATA[alexander/form_basic]]></imixs:value>
|
<imixs:value><![CDATA[alexander/form_basic]]></imixs:value>
|
||||||
|
|
@ -2208,7 +2208,7 @@ Wiedervorlage wird um 7 bzw. 5 Tage erhöht</bpmn2:text>
|
||||||
<bpmn2:sequenceFlow id="sequenceFlow_qs1rug" sourceRef="task_rhD89g" targetRef="event_OEuWOw">
|
<bpmn2:sequenceFlow id="sequenceFlow_qs1rug" sourceRef="task_rhD89g" targetRef="event_OEuWOw">
|
||||||
<bpmn2:documentation id="documentation_4yIz0Q"/>
|
<bpmn2:documentation id="documentation_4yIz0Q"/>
|
||||||
</bpmn2:sequenceFlow>
|
</bpmn2:sequenceFlow>
|
||||||
<bpmn2:task id="task_UCh9Ww" imixs:processid="4200" name="Processsing KSeF XML">
|
<bpmn2:task id="task_UCh9Ww" imixs:processid="4200" name="Export KSeF XML">
|
||||||
<bpmn2:extensionElements>
|
<bpmn2:extensionElements>
|
||||||
<imixs:item name="txteditorid" type="xs:string">
|
<imixs:item name="txteditorid" type="xs:string">
|
||||||
<imixs:value><![CDATA[alexander/form_basic]]></imixs:value>
|
<imixs:value><![CDATA[alexander/form_basic]]></imixs:value>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue