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

@@ -31,7 +31,8 @@ CREATE OR REPLACE VIEW public.vw_utility_purchase_physical_contract AS
(COALESCE((pl.quantity_theorical)::double precision, (0)::double precision) - COALESCE(phys.dblphysicalqty, (0)::double precision)) AS "dblOpenQuantity",
COALESCE(inst.dblinstructedqty, (0)::double precision) AS "dblInInstructedQuantity",
COALESCE(bl.estimated_date, pl.to_del) AS "dtmEstimatedBLDate",
pl.finished AS "ysnFinished"
pl.finished AS "ysnFinished",
pl.targeted_qt AS "dblTargetedQuantity"
FROM (((((((((((purchase_line pl
JOIN purchase_purchase pc ON ((pl.purchase = pc.id)))
JOIN product_uom pu1 ON ((pl.unit = pu1.id)))
@@ -60,4 +61,4 @@ CREATE OR REPLACE VIEW public.vw_utility_purchase_physical_contract AS
FROM vw_utility_instructed_lots t1
GROUP BY t1."intPurchaseLineId") inst ON ((pl.id = inst."intPurchaseLineId")))
LEFT JOIN pricing_estimated bl ON (((pl.id = bl.line) AND ((bl.trigger)::text = 'bldate'::text))))
WHERE (1 = 1);;
WHERE ((1 = 1) AND ((pc.line_type)::text = 'goods'::text));;