Each time a product is selected (while issuing a document), it is possible to execute SQL code.

This is set in Settings-> Purchase/Sales-> Documents-> SQL Run

After the user has selected a product, the variables sent by EMDI to the SQL code are:

:aa Document line number “pvlhseis”. “aa”
:cd Document type line number “eidhpar”. “aa”
:rd Related document “eidhpar”. “parallhlo”
:pd Parent document “eidhpar”. “Koino”
:cl Client line number “pelates”.”aa” or “pvlhseis”. “kvdikospelath”
:bl Delivery customer line number “pvlhseis”. “Delivery”
:as command line number “pvlhseis”. “assignor”
:re relevant Document line number “pvlhseis”. “Sxetiko”

:pi product line number “grammes”.”Eidos”
:li Document line number “grammes”. “aa”

EMDI receives content from the variables and defines it accordingly:

im_expired -> expiration date “kinhseis”.”Lhjh”
im_position -> position “kinhseis”.”Uesh”
im_portion -> portion “grammes”.”meridasx_”
im_move -> move “grammes”.”stixossx_”
im_price -> Value excl. VAT   “grammes”.”Timh”
im_quantity -> Quantity “grammes”.”Posothta”
im_description -> Product description  “grammes”.”PerigrafhEidoys”
im_discount -> Discount rate “grammes”.”Ekptvsh”

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