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.

The variables sent by EMDI to the SQL code are:

: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 receives content from the variables and defines it accordingly:

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 -> General use field (If the fifth part contains the product code then it is ignored)

im_message -> Opens an informative message
im_messagw -> Opens a warning message