Commit 89c787c0 authored by ssurve's avatar ssurve

POD function updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95042 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f8da8a9b
......@@ -159,6 +159,7 @@ BEGIN
else
-- Logic for partial POD entries starts here
hdr_sql_stmt := 'select tran_id from spl_sales_por_hdr where invoice_id = '''||ls_invoiceid||''' and confirmed = ''Y'' and wf_status <> ''R'' ';
begin
......@@ -169,15 +170,7 @@ BEGIN
EXIT WHEN dtl_cur%NOTFOUND;
begin
dtl_sql_stmt := 'select line_no,item_code,quantity__inv into lineno,itemcode,invqty from spl_sales_por_det where tran_id = '''||ls_podtranid||'''';
begin
open item_cur for dtl_sql_stmt;-- USING ls_podtranid;
LOOP
FETCH item_cur INTO ls_podtranid,itemcode,lineno,inv_qty;
EXIT WHEN item_cur%NOTFOUND;
select sum(quantity__resale) into podqty_sum from spl_sales_por_det where tran_id = ls_podtranid and item_code = itemcode;
select sum(quantity__resale),sum(quantity__inv) into podqty_sum,inv_qty from spl_sales_por_det where tran_id = ls_podtranid group by item_code ;
if podqty_sum < inv_qty then
cnumber :=1;
......@@ -185,9 +178,6 @@ BEGIN
--exit;
end if;
END LOOP;
CLOSE item_cur;
end;
exception when others then
return -1;
end;
......@@ -209,6 +199,7 @@ BEGIN
return cnumber;
END;
-- POD Function ends here
--added cross-update sql [13/12/13]
......
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