IO-710 Export Log page & insert actions on export

This commit is contained in:
Patrick Fic
2021-04-21 14:31:40 -07:00
parent 6d9576b9a4
commit 09e1ab7f83
38 changed files with 653 additions and 180 deletions

View File

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

View File

@@ -0,0 +1,17 @@
- args:
cascade: false
read_only: false
sql: "CREATE\r\nOR REPLACE FUNCTION public.search_exportlog(search text) RETURNS
SETOF exportlog LANGUAGE plpgsql STABLE AS $function$ BEGIN IF search = '' THEN
RETURN query\r\nSELECT\r\n *\r\nFROM\r\n exportlog e;\r\n ELSE RETURN query\r\nSELECT\r\n
\ exportlog.*\r\nFROM\r\n exportlog e,\r\n jobs j,\r\n payments p,\r\n bills
b,\r\n users u\r\nWHERE\r\n (\r\n j.ro_number ILIKE '%' || search || '%'\r\n
\ OR b.invoice_number ILIKE '%' || search || '%'\r\n OR p.paymentnum ILIKE
'%' || search || '%'\r\n OR u.email ILIKE '%' || search || '%'\r\n\r\n )\r\n
\ AND (e.jobid = j.id\r\n or e.paymentid = p.id\r\n or e.billid = b.id\r\nor
e.useremail = u.email)\r\n;\r\nEND IF;\r\nEND $function$;"
type: run_sql
- args:
name: search_exportlog
schema: public
type: track_function