Each time we click save or register a document it is possible to execute SQL code.

This is set in Settings-> Purchases / Sales-> Documents-> SQL Execution.

 

 

VARIABLES SENT BY EMDI TO SQL CODE:

: aa Document line number “pvlhseis”. ”Aa”
: cd Document type line number “eidhpar”. ”Aa”
: rd Related document “eidhpar”. ”parallhlo”
: pd Parent document “eidhpar”. ”Koino”
: cl Number customer service line “pelates”. ”Aa” or “pvlhseis”. ”Kvdikospelath”
: bl Delivery customer line number “pvlhseis”. ”Paradosh”
: as Customer line number “pvlhseis”. ”assignor”
: re Sxetiko

: pi Item number “grammes”. ”Eidos”
: li Document line number “grammes”. ”Aa”

: pc Item code “grammes”. ”KvdikosEidoys”
: pn Item description “grammes”. ”PerigrafhEidoys”
: pw Weight “grammes”. ”baros_”
: pp Position “grammes”. ”uesh_”
: pr Portion “grammes”. ” meridasx_ ”
: ps Verse“ grammes ”.” stixossx_ ”
: pe Start date“ grammes ”.” enarjh_ ”
: pl Expiry date“ grammes ”.” kinhseis_ ”

 

EMDI ACCEPTS THE CONTENT FROM THE VARIABLES AND RETURNS TO THE DOCUMENT:

im_message -> Open newsletter
im_messagw -> Open warning message

 

Caution. At this stage the tables “grammes”, “pvlhseis” and “kinhseis” are not up to date. The data is stored in a cache so variables must be used.

Example: