Commit all views

This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-05-11 14:01:13 +02:00
parent 3986882771
commit 3a3e715336
28 changed files with 5546 additions and 111 deletions

View File

@@ -19,7 +19,12 @@ CREATE OR REPLACE VIEW public.vw_utility_contract_fees AS
CASE
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN '-1'::integer
ELSE 1
END AS "dblSignMultiplier"
END AS "dblSignMultiplier",
CASE
WHEN (upper((p.code)::text) ~~ '%FREIGHT%'::text) THEN 'Freight'::text
WHEN (upper((p.code)::text) ~~ '%PROFIT SHARING%'::text) THEN 'Profit Sharing'::text
ELSE 'Other Costs'::text
END AS "strProductGroup"
FROM ((((fee_fee f
JOIN currency_currency c ON ((f.currency = c.id)))
JOIN product_product p ON ((f.product = p.id)))
@@ -47,7 +52,12 @@ UNION ALL
CASE
WHEN (upper((f.p_r)::text) = 'REC'::text) THEN 1
ELSE '-1'::integer
END AS "dblSignMultiplier"
END AS "dblSignMultiplier",
CASE
WHEN (upper((p.code)::text) ~~ '%FREIGHT%'::text) THEN 'Freight'::text
WHEN (upper((p.code)::text) ~~ '%PROFIT SHARING%'::text) THEN 'Profit Sharing'::text
ELSE 'Other Costs'::text
END AS "strProductGroup"
FROM ((((fee_fee f
JOIN currency_currency c ON ((f.currency = c.id)))
JOIN product_product p ON ((f.product = p.id)))