Added conversion logic for ROs. Blanket translations for files.

This commit is contained in:
Patrick Fic
2020-01-14 11:58:37 -08:00
parent bee4f630c4
commit e4693685fe
29 changed files with 2783 additions and 185 deletions

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,9 @@
- args:
cascade: true
sql: "CREATE OR REPLACE FUNCTION public.assign_ro_number()\r\n RETURNS trigger\r\n
LANGUAGE plpgsql\r\nAS $function$\r\n begin\r\n IF NEW.converted
= true and new.ro_number is null THEN\r\n UPDATE counters\r\n\tSET
count = count + 1 where shopid=new.shopid AND countertype=\"ronum\"\r\n\tRETURNING
CONCAT(prefix,count) into new.ro_number;\r\n\r\n END IF;\r\n RETURN
NEW;\r\n END;\r\n $function$\r\n;\r\n"
type: run_sql