Commit all views for ITSA

This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-03-24 14:40:53 +01:00
parent 091bd4ce00
commit 832a142e87
62 changed files with 2397 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
CREATE OR REPLACE VIEW public.vw_bi_itsa_fct_contract_fees AS
SELECT "intFeeId",
"strContractType" AS "Contract Type",
"intContractLineId",
"strPackaging" AS "Packaging",
"strPayOrRec" AS "Pay or Rec",
"strType" AS "Type",
"strProduct" AS "Fee",
"strSupplier" AS "Supplier",
"strState" AS "State",
"strWeightType" AS "Weighing Type",
"dblQuantity" AS "Quantity",
("dblPrice" * ("dblSignMultiplier")::numeric) AS "Price",
"strCurrency" AS "Currency",
"strUnit" AS "Unit",
(("dblQuantity" * "dblPrice") * ("dblSignMultiplier")::numeric) AS "Amount",
CASE
WHEN (upper(("strProduct")::text) = 'MARITIME FREIGHT'::text) THEN "strProduct"
WHEN (upper(("strProduct")::text) = 'PROFIT SHARING'::text) THEN "strProduct"
ELSE 'Other Costs'::character varying
END AS "Cost Group"
FROM vw_utility_contract_fees;;