We want to show the percentage of the tax as columns in the invoice, but until now it was not possible to have a single VAT column when products have different VAT (e.g., 4 % and 10 %), because, as far as the application is concerned, these where ”different taxes”. We also think it would be hard later on to compute the tax due to the government. So, tax classes is just a taxonomy to be able to have different names and rates for the same type of tax, mostly VAT and retention in our case.
15 lines
351 B
PL/PgSQL
15 lines
351 B
PL/PgSQL
-- Verify numerus:tax_class on pg
|
|
|
|
begin;
|
|
|
|
select tax_class_id
|
|
, company_id
|
|
, name
|
|
from numerus.tax_class
|
|
where false;
|
|
|
|
select 1 / count(*) from pg_class where oid = 'numerus.tax_class'::regclass and relrowsecurity;
|
|
select 1 / count(*) from pg_policy where polname = 'company_policy' and polrelid = 'numerus.tax_class'::regclass;
|
|
|
|
rollback;
|