numerus/verify/quote_product.sql
jordi fita mas 35b12f7ea4 Add relations for sales quotations and their products
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.
2023-06-06 21:08:31 +02:00

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;