Wonach suchst Du?
What are you looking for?

Fix a non-EDI order's shipment and invoice for EDI sending

It sometimes happens that a user manually creates a sales order for an EDI customer and forgets to set the IsEdiEnabled flag. Later they notice that they cannot send any DESADV or INVOICE and ask support.

We assume that

Assume the order’s POReference is ‘123456’

How to fix this:

UPDATE C_Order
SET IsEDIEnAbled='Y', Updated=now(), Updatedby=99
WHERE POReference='123456';

UPDATE M_InOut
SET IsEDIEnAbled='Y', Updated=now(), Updatedby=99
WHERE POReference='123456';

UPDATE C_Invoice
SET IsEDIEnAbled='Y', EDI_ExportStatus='P', Updated=now(), Updatedby=99
WHERE POReference='123456';

At this point, the invoice can already be sent as EDI-INVOICE.

For the DESADV, we need to create the EDI_Desadv record. To do that, we can now use a dedicated process (AD_Process.Value='EDI_Desadv_Create_From_C_Order') from the sales order’s gear. That process is available if the current sales order is completed or closed, has IsEdiEnabled=Y and does not yet reference an EDI_Desadv record. Note that:


View source file on GitHub.com