no message

This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-02-02 15:52:52 +01:00
parent 7f99b78c8a
commit 0fa522ece6
6 changed files with 134 additions and 5 deletions

View File

@@ -11,11 +11,11 @@ CREATE OR REPLACE VIEW public.vw_utility_purchase_physical_contract AS
COALESCE(vult.dblintransitquantity, 0::double precision) AS "dblInTransitQuantity",
COALESCE(dropship.dbldropshippedquantity, 0::double precision) AS "dblDropshippedQuantity",
COALESCE(received.dblreceivedquantity, 0::double precision) AS "dblReceivedQuantity",
pl.linked_price AS "dblPrice",
COALESCE(pl.linked_price, 0) AS "dblPrice",
pu2.name AS "strPriceUnit",
'n/a'::text AS "strPriceCurrency",
pl.unit_price AS "dblUnitPrice",
pl.quantity_theorical AS "dblTheoriticalQuantity",
COALESCE(pl.quantity_theorical, 0::numeric) AS "dblTheoriticalQuantity",
round((pl.quantity * pl.unit_price::double precision)::numeric, get_rounding_position(mcr.rounding)) AS "dblLineAmount",
cur.name AS "strCurrency",
0::numeric AS "dblLineBaseAmount",
@@ -32,7 +32,7 @@ CREATE OR REPLACE VIEW public.vw_utility_purchase_physical_contract AS
0::numeric AS "dblInvoicedAmount",
''::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(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"
FROM purchase_line pl