metafresh logo and link to homepage

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

If 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 can’t send any DESADV or INVOICE and ask support.

We assume that

Let the order’s POReference be ‘123456’

How to fix:

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 send as EDI-INVOIC.

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 complered or closed, has IsEdiEnabled=Y and does not yet reference an EDI_Desadv record. Note that


Zur Quelldatei auf github.com