Added invoice search + reformatted invoices page BOD-123
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[]
|
||||
12
hasura/migrations/1595971216422_run_sql_migration/up.yaml
Normal file
12
hasura/migrations/1595971216422_run_sql_migration/up.yaml
Normal 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
|
||||
Reference in New Issue
Block a user