Commit 0855322a authored by vvengurlekar's avatar vvengurlekar

F18GPIT005.sql - functions added to get sundry code, sundry type and sundry...

F18GPIT005.sql -  functions added to get sundry code, sundry type and sundry name according to ref_ser


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@192498 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0671731a
...@@ -2,7 +2,7 @@ update system_events set service_code = 'prv_default_ejb', comp_type = 'JB', com ...@@ -2,7 +2,7 @@ update system_events set service_code = 'prv_default_ejb', comp_type = 'JB', com
update system_events set service_code = 'poic_default_ejb', comp_type = 'JB', comp_name = 'ibase.webitm.ejb.fin.ChqNoChgIC' where obj_name = 'chqcanc' and event_code = 'post_item_change'; update system_events set service_code = 'poic_default_ejb', comp_type = 'JB', comp_name = 'ibase.webitm.ejb.fin.ChqNoChgIC' where obj_name = 'chqcanc' and event_code = 'post_item_change';
alter table chqcanc add ref_ser char(6); alter table chqcanc add REF_SER varchar2(6);
update chqcanc set ref_ser = 'M-PAY' where ref_ser is null; update chqcanc set ref_ser = 'M-PAY' where ref_ser is null;
...@@ -50,3 +50,70 @@ end; ...@@ -50,3 +50,70 @@ end;
/ /
---------------------Functions added by Varsha V [26-10-18] [END]------------------------------ ---------------------Functions added by Varsha V [26-10-18] [END]------------------------------
---------------------Functions added by Varsha V [30-10-18] [START]------------------------------
-----------Need to deploy to QC Only [START]------------
alter table chqcanc Modify REF_SER varchar2(6);
update chqcanc set REF_SER = trim(REF_SER);
-----------Need to deploy to QC Only [END]------------
create or replace
function fn_sundry_name_ref_ser_wise ( ls_ref_ser char, ls_tran_id char)
RETURN VARCHAR is ls_sundry_name VARCHAR(100);
begin
if ls_ref_ser = 'E-PAY' then
select fn_sundry_name (sundry_type,sundry_code,'N') into ls_sundry_name from payment_exp where tran_id = ls_tran_id;
elsif ls_ref_ser = 'M-PAY' then
select fn_sundry_name (sundry_type,sundry_code,'N') into ls_sundry_name from misc_payment where tran_id = ls_tran_id;
end if;
if ls_sundry_name is null then
ls_sundry_name := '';
end if;
return ls_sundry_name;
end;
/
create or replace
function fn_get_trandate_chqcanc ( ls_ref_ser char, ls_tran_id char)
RETURN date is ls_column_value date;
begin
if ls_ref_ser = 'E-PAY' then
select tran_date into ls_column_value from payment_exp where tran_id = ls_tran_id;
elsif ls_ref_ser = 'M-PAY' then
select tran_date into ls_column_value from misc_payment where tran_id = ls_tran_id;
end if;
if ls_column_value is null then
ls_column_value := '';
end if;
return ls_column_value;
end;
/
create or replace
function fn_get_ref_ser_wise_data ( ls_ref_ser char, ls_tran_id char, column_name char)
RETURN VARCHAR is ls_column_value VARCHAR(100);
begin
if ls_ref_ser = 'E-PAY' then
if column_name = 'SUNDRY_CODE' then
select sundry_code into ls_column_value from payment_exp where tran_id = ls_tran_id;
elsif column_name = 'SUNDRY_TYPE' then
select sundry_type into ls_column_value from payment_exp where tran_id = ls_tran_id;
end if;
elsif ls_ref_ser = 'M-PAY' then
if column_name = 'SUNDRY_CODE' then
select sundry_code into ls_column_value from misc_payment where tran_id = ls_tran_id;
elsif column_name = 'SUNDRY_TYPE' then
select sundry_type into ls_column_value from misc_payment where tran_id = ls_tran_id;
end if;
end if;
if ls_column_value is null then
ls_column_value := '';
end if;
return ls_column_value;
end;
/
---------------------Functions Ended by Varsha V [30-10-18] [START]------------------------------
\ 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