no message
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user