Commit 1f65f336 authored by arane's avatar arane

Project Estimation - On approval those item for which stk_opt is <> "0" to be...

Project Estimation - On approval those item for which stk_opt is <> "0" to be updated in demand/supply summary for MRP

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@216381 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c36198e1
select item_code,due_date, round(sum(demand)+ fn_get_sampleqty(item_code ,'@sitecode@' ),0) demand , sum(supply) supply, sum(stock_qty) stock_qty, select item_code,due_date, round(sum(demand)+ fn_get_sampleqty(item_code ,'@sitecode@' ),0) demand , sum(supply) supply, sum(stock_qty) stock_qty,
sum(oth_supply) oth_supply, sum(pending_po) pending_po ,sum(pending_do) pending_do, sum(pending_indent) pending_indent, sum(pending_dr) pending_dr sum(oth_supply) oth_supply, sum(pending_po) pending_po ,sum(pending_do) pending_do, sum(pending_indent) pending_indent, sum(pending_dr) pending_dr
from from (
(
select item.item_code, inv_dem_supp.due_date , select item.item_code, inv_dem_supp.due_date ,
sum(inv_dem_supp.demand_QTY) demand , sum(inv_dem_supp.demand_QTY) demand ,
sum(inv_dem_supp.SUPPLY_QTY) supply, sum(inv_dem_supp.SUPPLY_QTY) supply,
...@@ -16,7 +14,7 @@ from inv_dem_supp, item ...@@ -16,7 +14,7 @@ from inv_dem_supp, item
where ( inv_dem_supp.item_code = item.item_code ) where ( inv_dem_supp.item_code = item.item_code )
and ( inv_dem_supp.site_code in ('@sitecode@') ) and ( inv_dem_supp.site_code in ('@sitecode@') )
AND ( item.item_code__plan = '@itemcode@') AND ( item.item_code__plan = '@itemcode@')
AND ( inv_dem_supp.REF_SER in ('I-DEM','D-DEM','S-DEM','S-FST','IND') ) AND ( inv_dem_supp.REF_SER in ('I-DEM','D-DEM','S-DEM','S-FST','IND','PRJBSL') )
AND ( inv_dem_supp.REF_SER not in ('P-ORD','D-ORDI','D-ORDR','W-ORD','W-BIL','STK') ) AND ( inv_dem_supp.REF_SER not in ('P-ORD','D-ORDI','D-ORDR','W-ORD','W-BIL','STK') )
and ( inv_dem_supp.due_date >= to_date('@fromdate@')) and ( inv_dem_supp.due_date >= to_date('@fromdate@'))
AND ( inv_dem_supp.due_date <= to_date('@todate@')) AND ( inv_dem_supp.due_date <= to_date('@todate@'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment