Commit 8bea04fc authored by vvengurlekar's avatar vvengurlekar

F18GPIT005.sql - functions added to calculate net_amt and curr_code in chqcanc


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@192397 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7ed0e9f7
...@@ -13,3 +13,40 @@ VALUES ('CHQCANC', 'STD', 'REF_SER', '', 0, '', 0, 0, '', 0, 0, 0, '', 'N', '', ...@@ -13,3 +13,40 @@ VALUES ('CHQCANC', 'STD', 'REF_SER', '', 0, '', 0, 0, '', 0, 0, 0, '', 'N', '',
update pophelp set sql_str = 'select tran_id,tran_date,ref_no,bank_code,sundry_type,sundry_code,curr_code, net_amt from misc_payment where confirmed=''Y'' union select tran_id,tran_date,ref_no,bank_code,sundry_type,sundry_code,curr_code, net_amt from payment_exp where confirmed=''Y''' update pophelp set sql_str = 'select tran_id,tran_date,ref_no,bank_code,sundry_type,sundry_code,curr_code, net_amt from misc_payment where confirmed=''Y'' union select tran_id,tran_date,ref_no,bank_code,sundry_type,sundry_code,curr_code, net_amt from payment_exp where confirmed=''Y'''
where mod_name = 'W_CHQCANC' and field_name = 'TRAN_ID'; where mod_name = 'W_CHQCANC' and field_name = 'TRAN_ID';
---------------------Functions added by Varsha V [26-10-18] [START]------------------------------
create or replace
function fn_chqcanc_amount ( ls_ref_ser char, ls_ref_no char)
return number as
ls_amount number (15,2);
begin
if ls_ref_ser = 'E-PAY' then
select net_amt into ls_amount from payment_exp where tran_id = ls_ref_no;
elsif ls_ref_ser = 'M-PAY' then
select net_amt into ls_amount from misc_payment where tran_id = ls_ref_no;
end if;
if ls_amount is null then
ls_amount := 0;
end if;
return ls_amount;
end;
/
create or replace
function fn_chqcanc_currency ( ls_ref_ser char, ls_ref_no char)
return char is ls_curr_code char(5);
begin
if ls_ref_ser = 'E-PAY' then
select curr_code into ls_curr_code from payment_exp where tran_id = ls_ref_no;
elsif ls_ref_ser = 'M-PAY' then
select curr_code into ls_curr_code from misc_payment where tran_id = ls_ref_no;
end if;
if ls_curr_code is null then
ls_curr_code := '';
end if;
return ls_curr_code;
end;
/
---------------------Functions added by Varsha V [26-10-18] [END]------------------------------
\ No newline at end of file
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