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_ ”
:pq product quantity “grammes”.”Posothta”

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

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 -> 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: