Dump - ITSA views

This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-06-14 11:05:54 +02:00
parent 3a3e715336
commit af63a53372
27 changed files with 708 additions and 140 deletions

View File

@@ -0,0 +1,38 @@
CREATE OR REPLACE VIEW public.vw_utility_physical_pricing_definition AS
SELECT 'Purchase'::text AS "strContractType",
pc.line AS "intContractLineId",
pc.id AS "intPricingComponentId",
pc.price_index AS "intPriceCurveId",
vpc."strPriceDescription",
vpc."strPriceIndex",
vpc."strCurrency",
vpc."strUnit",
vpc."strPriceCurveType",
vpc."strPriceArea",
vpc."strPriceCalendar",
vpc."strPricingType",
vpc."dtmPricingStartDate",
vpc."dtmPricingEndDate",
vpc."strPricingMonth"
FROM (pricing_component pc
LEFT JOIN vw_utility_price_curve vpc ON ((vpc."intPriceCurveId" = pc.price_index)))
WHERE (pc.line IS NOT NULL)
UNION ALL
SELECT 'Sale'::text AS "strContractType",
pc.sale_line AS "intContractLineId",
pc.id AS "intPricingComponentId",
pc.price_index AS "intPriceCurveId",
vpc."strPriceDescription",
vpc."strPriceIndex",
vpc."strCurrency",
vpc."strUnit",
vpc."strPriceCurveType",
vpc."strPriceArea",
vpc."strPriceCalendar",
vpc."strPricingType",
vpc."dtmPricingStartDate",
vpc."dtmPricingEndDate",
vpc."strPricingMonth"
FROM (pricing_component pc
LEFT JOIN vw_utility_price_curve vpc ON ((vpc."intPriceCurveId" = pc.price_index)))
WHERE (pc.sale_line IS NOT NULL);;