Commit 7ad5951b authored by Ketan Patil's avatar Ketan Patil

Upload New File

parent 949be0e0
create or replace FUNCTION DDF_CHECK_ADV_PENDING (ls_sundry_code in char,ls_sundry_type in char)
RETURN char is ls_adv_exist char(1);
cnt number(3);
fin_cnt number(3);
BEGIN
ls_adv_exist:='0';
cnt:=0;
fin_cnt:=0;
if length(trim(ls_sundry_code)) <> 0 then
select count(*) into fin_cnt from finparm where prd_code='999999' and var_name='ADV_PENDING_ACCT_CD';
if (fin_cnt > 0) then
select count(*) into cnt from misc_payables where sundry_type=ls_sundry_type and sundry_code=ls_sundry_code and tot_amt <> adj_amt and acct_code in(select var_value from finparm where prd_code='999999' and var_name='ADV_PENDING_ACCT_CD');
if (cnt > 1) then
ls_adv_exist:='1';
else
ls_adv_exist:='0';
end if;
else
ls_adv_exist:='1';
end if;
end if;
RETURN ls_adv_exist;
exception
when NO_DATA_FOUND then
null;
END;
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