When a client is selected (while issuing a document), it is possible to execute SQL code.

This is set in Settings-> Purchases / Sales-> Customer’s, run SQL.

After selected by the client user, the variables sent by emdi to the sql code

:cd Line number of document type “eidhpar”.”Aa”
:rd Related document “eidhpar”.”parallhlo”
:pd Parent document “eidhpar”.”Koino”
:cl Customer Line Number “pelates”.”Aa” or “pvlhseis”.”Kvdikospelath”

 

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 Place of shipment “pvlhseis”.”Apostolh”
im_loadingplace Place of loading “pvlhseis”.”Fortvsh”
im_sign Signature “pvlhseis”.”ypografh”
im_devicessentlist List of items sent to the documents “pvlhseis”.”devicessentlist”
im_shipping Shipping method “pvlhseis”.”Tropos”
im_handling Purpose of handling “pvlhseis”.”Skopos”
im_custom Field used for rewards (If the fifth part contains the product code that is pasted on the virtual keyboard then it is ignored)  “pvlhseis”.”custom”|
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 Open informative message
im_messagw Open a warning message

 

The following example puts the loyalties total points in the sales comment and compares it with the product custom field “points”.
If it is larger than the custom field then a message is displayed.