Every time a document is being issued or saved, it is possible to execute SQL code.
This is set in Settings -> Purchase/Sales-> Documents -> Run SQL.
VARIABLES SENT BY EMDI TO SQL CODE:
:aa Document line number “pvlhseis”.”Aa”
:cd Documents type line number “eidhpar”.”Aa”
:rd Related Document “eidhpar”.”parallhlo”
:pd Parent Document “eidhpar”.”Koino”
:cl Customer line number “pelatesAa” ή “pvlhseis”.”Kvdikospelath”
:bl Line number of delivery customer “pvlhseis”.”Paradosh”
:as Line number of assignor “pvlhseis”.”assignor”
:re Related Document line number “pvlhseis”.”Sxetiko”
The result can be saved on any of the following fields. There is the field #CUS that is splitted in 5 parts with the symbol | , #CUS1, #CUS2, #CUS3, #CUS4, #CUS5.
EMDI ACCEPTS THE CONTENT FROM THE VARIABLES AND DEFINES IT CORRESPONDING:
im_documentseries -> Document series “pvlhseis”.”Seira”
im_related -> Related documents “pvlhseis”.”Sxetika”
im_notes -> Notes “pvlhseis”.”Sxolio”
im_shippingaddress -> Shipping address “pvlhseis”.”Apostolh”
im_loadingplace -> Loading address “pvlhseis”.”Fortvsh”
im_sign -> Signature “pvlhseis”.”ypografh”
im_devicessentlist -> List of devices that the documents have been sent “pvlhseis”.”devicessentlist”
im_custom -> Field used for rewards (If the fifth part contains the product code then it is ignored)
im_cust1 -> General scope field 1
im_cust2 -> General scope field 2
im_cust3 -> General scope field 3
im_cust4 -> General scope field 4
im_cust5 -> General scope field 5
im_message -> Opens an informative message
im_messagw -> Opens a warning message