Commit 3dde0163 authored by dpawar's avatar dpawar

update pophelp query


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95802 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6c740a6b
......@@ -364,19 +364,21 @@ insert into messages
values
('VTPODARI','POD received','Proof of Delivery already received for this invoice ID','E',sysdate,'BASE','BASE');
update itemser_cr_policy set policy_result='0' where item_ser ='NT' and cr_policy='P93';
-- Added on 06/AUG/14
update pophelp set sql_str=
'select distinct invoice_id
'select distinct invoice_id,inv_type,tran_date
from
(
select case when nvl(tt.quantity,0) <> nvl(dt.quantity,0) then tt.invoice_id else ''NOT'' end invoice_id
select case when nvl(tt.quantity,0) <> nvl(dt.quantity,0) then tt.invoice_id else ''NOT'' end invoice_id,tt.inv_type,tt.tran_date
from
(
select inv.invoice_id,tr.item_code,tr.lot_no,tr.lot_sl,tr.inv_line_no,sum(nvl(tr.quantity,0)) quantity
select inv.invoice_id,tr.item_code,tr.lot_no,tr.lot_sl,tr.inv_line_no,sum(nvl(tr.quantity,0)) quantity ,inv.inv_type,inv.tran_date
from invoice_trace tr
join invoice inv on inv.invoice_id = tr.invoice_id and inv.site_code = ''?'' and inv.cust_code__bil = ''?'' AND sysdate - conf_date > 45 and inv_type in (''DM'',''IS'')
group by inv.invoice_id, tr.item_code, tr.lot_no, tr.lot_sl, tr.inv_line_no
group by inv.invoice_id, tr.item_code, tr.lot_no, tr.lot_sl, tr.inv_line_no, inv.inv_type, inv.tran_date
) tt
left outer join
(
......@@ -403,7 +405,7 @@ order by invoice_id'
where mod_name='W_PROOF_OF_DELIVERY' and field_name='INVOICE_ID';
update itemser_cr_policy set policy_result='0' where item_ser ='NT' and cr_policy='P93';
......
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