jon/jon/db/entry/get_tax_groups.sql
Paul Brinkmeier afd7e9369d First draft of elm frontend
This will probably be scrapped or rewritten
2023-08-21 14:45:45 +02:00

10 lines
267 B
SQL

SELECT
tax_group_id AS id,
description,
tax_percentage :: float AS percentage,
tax_description AS description
FROM garfield.tax_groups,
LATERAL garfield.tax_find(tax_group_id, NOW() :: date) AS tax_id
LEFT JOIN garfield.taxes USING (tax_id)
WHERE active