We make the price lists we want by putting the customer’s code in the title
We set the value in the custom field we have set for the items
We put the following code in the documents we want the additional discount to be included
In the following code – example we use the additional field 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
-- lines -- select "Pososto" im_discount from "ekptvseisgrammes" where ("ekptvseisgrammes"."from_date"<=cast('now' as date) or "ekptvseisgrammes"."from_date" is null) and ("ekptvseisgrammes"."to_date">=cast('now' as date) or "ekptvseisgrammes"."to_date" is null) and ("ekptvseisgrammes"."from_time"<=cast('now' as time) or "ekptvseisgrammes"."from_time" is null) and ("ekptvseisgrammes"."to_time">=cast('now' as time) or "ekptvseisgrammes"."to_time" is null) and ("ekptvseisgrammes"."quantityfrom"<=1 or "ekptvseisgrammes"."quantityfrom" is null) and ("ekptvseisgrammes"."quantityto">=1 or "ekptvseisgrammes"."quantityto" is null) and "Ekptvseis"= (select "ekptvseis"."Aa" from "ekptvseis" where "ekptvseis"."Titlos"= (select "pelates"."Kvdikos" from "pelates" where "pelates"."Aa"=:cl) ) and "ekptvseisgrammes"."Eidos" is null and "ekptvseisgrammes"."customfield"=2 and "ekptvseisgrammes"."customfieldvalue"= (select "apouhkh"."custom2" from "apouhkh" where "apouhkh"."Aa"=:pi) -- lines-eof -- |
In the item we define in the corresponding additional field the word that we have put in the price lists
After selecting the item, the additional discount is automatically entered