no message

This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-02-02 13:15:58 +01:00
parent 022f4e0a2a
commit 7f99b78c8a
16 changed files with 1031 additions and 69 deletions

View File

@@ -33,7 +33,8 @@ CREATE OR REPLACE VIEW public.vw_utility_purchase_physical_contract AS
''::text AS "strInvoiceCurrency",
COALESCE(phys.dblphysicalqty, 0::double precision) AS "dblPhysicalQty",
pl.quantity_theorical::double precision - COALESCE(phys.dblphysicalqty, 0::double precision) AS "dblOpenQuantity",
COALESCE(inst.dblinstructedqty, 0::double precision) AS "dblInInstructedQuantity"
COALESCE(inst.dblinstructedqty, 0::double precision) AS "dblInInstructedQuantity",
COALESCE(bl.estimated_date, pl.to_del) AS "dtmEstimatedBLDate"
FROM purchase_line pl
JOIN purchase_purchase pc ON pl.purchase = pc.id
JOIN product_uom pu1 ON pl.unit = pu1.id
@@ -61,6 +62,7 @@ CREATE OR REPLACE VIEW public.vw_utility_purchase_physical_contract AS
sum(t1."dblQuantity") AS dblinstructedqty
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;
ALTER TABLE public.vw_utility_purchase_physical_contract