Added invoice search + reformatted invoices page BOD-123

This commit is contained in:
Patrick Fic
2020-07-28 15:59:09 -07:00
parent 64e02bf8cb
commit d708ac9226
12 changed files with 476 additions and 196 deletions

View File

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

View File

@@ -0,0 +1,6 @@
- args:
cascade: true
read_only: false
sql: CREATE INDEX idx_invoices_invoicenumber ON invoices USING GIN (invoice_number
gin_trgm_ops);
type: run_sql

View File

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

View File

@@ -0,0 +1,12 @@
- args:
cascade: true
read_only: false
sql: "CREATE OR REPLACE FUNCTION public.search_invoices(search text)\n RETURNS
SETOF invoices\n LANGUAGE plpgsql\n STABLE\nAS $function$\n\nBEGIN\n if search
= '' then\n return query select * from invoices ;\n else \n return query
SELECT\n *\nFROM\n payments\nWHERE\n search <% (invoice_number);\n end if;\n\n\tEND\n$function$;"
type: run_sql
- args:
name: search_invoices
schema: public
type: track_function

View File

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

View File

@@ -0,0 +1,8 @@
- args:
cascade: true
read_only: false
sql: "CREATE OR REPLACE FUNCTION public.search_invoices(search text)\n RETURNS
SETOF invoices\n LANGUAGE plpgsql\n STABLE\nAS $function$\n\nBEGIN\n if search
= '' then\n return query select * from invoices ;\n else \n return query
SELECT\n *\nFROM\n invoices\nWHERE\n search <% (invoice_number);\n end if;\n\n\tEND\n$function$;"
type: run_sql

View File

@@ -4053,6 +4053,9 @@ tables:
- active:
_eq: true
functions:
- function:
schema: public
name: search_invoices
- function:
schema: public
name: search_jobs