(SELECT NVL (new_cost, 0) month_end_cost
FROM apps.mtl_material_transactions
WHERE transaction_id =
(SELECT MAX (transaction_id)
FROM apps.mtl_material_transactions
WHERE inventory_item_id = msi.inventory_item_id
AND organization_id = ood.organization_id
AND transaction_date <=
TRUNC
( LAST_DAY
(TO_DATE
(:p_transaction_date,
'MON-YY'
)
)
+ 1
))) month_end_avg_cost
No comments:
Post a Comment