They are mostly the same as invoices, but the contact and payment method are optional, thus, like other optionals fields, i created relations to link these that have payment method or contact, to avoid NULL columns in quote. Still missing functions to add and edit quotations, and views to compute their tax and total amount.
19 lines
438 B
PL/PgSQL
19 lines
438 B
PL/PgSQL
-- Verify numerus:quote_product on pg
|
|
|
|
begin;
|
|
|
|
select quote_product_id
|
|
, quote_id
|
|
, name
|
|
, description
|
|
, price
|
|
, quantity
|
|
, discount_rate
|
|
from numerus.quote_product
|
|
where false;
|
|
|
|
select 1 / count(*) from pg_class where oid = 'numerus.quote_product'::regclass and relrowsecurity;
|
|
select 1 / count(*) from pg_policy where polname = 'company_policy' and polrelid = 'numerus.quote_product'::regclass;
|
|
|
|
rollback;
|