Whenever a client is selected, it is possible to run SQL code.

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

After being selected by the client, the variables sent by EMDI to the SQL code:

: cd Number of document type line
: rd Related document
: pd Parental document
: cl Customer Line Number

EMDI accepts the content from the variables and defines it accordingly:

im_documentseries -> Document series
im_related -> Related documents
im_notes -> Notes
im_shippingaddress -> Place of shipment
im_loadingplace -> Place of loading
im_sign -> Signature
im_devicessentlist -> List of items sent to the documents
im_custom -> General scope (If the fifth part contains the product code that is pasted on the virtual keyboard then it is ignored)

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 additional points field.
If it is larger than the additional field then a message is displayed.