Commit be7989dc authored by prane's avatar prane

removed select mps_order sql as per suggested Manoharan sir for syncom

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@183958 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 47d45201
...@@ -9,21 +9,9 @@ select item_code,due_date, demand, 0 supply, 0 stock_qty, 0 oth_supply, ...@@ -9,21 +9,9 @@ select item_code,due_date, demand, 0 supply, 0 stock_qty, 0 oth_supply,
(sorder.sale_order = sorditem.sale_order ) and (sorder.sale_order = sorditem.sale_order ) and
(case when sorder.confirmed is null then 'N' else sorder.confirmed end = 'Y' ) and (case when sorder.confirmed is null then 'N' else sorder.confirmed end = 'Y' ) and
(case when sorditem.consume_fc is null then 'Y' else sorditem.consume_fc end = 'N' ) and (case when sorditem.consume_fc is null then 'Y' else sorditem.consume_fc end = 'N' ) and
(sorditem.site_code in ('@sitecode@') ) AND (sorditem.site_code in ('') ) AND
(item.item_code__plan = '@itemcode@') AND (item.item_code__plan = '') AND
(sorditem.due_date >= to_date('@fromdate@')) and (sorditem.due_date >= to_date('')) and
(sorditem.due_date <= to_date('@todate@')) and (sorditem.due_date <= to_date('')) and
(case when sorder.status is null then 'P' else sorder.status end = 'P') and (CASE WHEN SORDER.STATUS IS NULL THEN 'P' ELSE SORDER.STATUS END = 'P') AND
(sorder.order_type not in ('S') ) (sorder.order_type not in ('S') ) )
UNION ALL
select mps_order.tran_id, 'mps' as tran_ser, item.item_code__plan as item_code,mps_order.due_date due_date,mps_order.quantity as demand,0 as supply, 0 as stock_qty, 0 as oth_supply, 0 as pending_po, 0 as pending_do, 0 as pending_indent, 0 as pending_dr ,mps_order.site_code as site_code
from mps_order,item where
mps_order.item_code=item.item_code
and (item.item_code__plan='@itemcode@')
and ( case when mps_order.status is null then 'P' else
mps_order.status end in ('P','T','M'))
and mps_order.site_code in ('@sitecode@') and
(mps_order.due_date >= to_date('@fromdate@')) and
(mps_order.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