Copied as much as i could from Numerus, and made as few modifications as i could to adapt to this code base; it is, quite frankly, a piece of shit. We need to be able to create invoices from scratch “just in case”, apparently, but it is not yet possible to create an invoice from a booking.
23 lines
496 B
PL/PgSQL
23 lines
496 B
PL/PgSQL
-- Verify camper:invoice on pg
|
|
|
|
begin;
|
|
|
|
select invoice_id
|
|
, company_id
|
|
, slug
|
|
, invoice_number
|
|
, invoice_date
|
|
, contact_id
|
|
, invoice_status
|
|
, notes
|
|
, payment_method_id
|
|
, currency_code
|
|
, created_at
|
|
from camper.invoice
|
|
where false;
|
|
|
|
select 1 / count(*) from pg_class where oid = 'camper.invoice'::regclass and relrowsecurity;
|
|
select 1 / count(*) from pg_policy where polname = 'company_policy' and polrelid = 'camper.invoice'::regclass;
|
|
|
|
rollback;
|