Commit 4c8849c1 authored by kdabholkar's avatar kdabholkar

add new function for DB2 database.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106686 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e395ecac
......@@ -473,6 +473,34 @@ end
@
drop function fn_get_hsn_sac@
create function fn_get_hsn_sac(as_sitecode varchar(5),as_itemcode varchar(10),as_acctcode varchar(10))
returns varchar(20)
deterministic
begin atomic
declare ls_hsnno varchar(20);
if as_itemcode is null or length(trim(as_itemcode)) = 0 then
set ls_hsnno = (select sac_code from accounts
where acct_code = as_acctcode);
else
set ls_hsnno = (select hsn_no from siteitem
where site_code = as_sitecode
and item_code = as_itemcode);
if ls_hsnno is null or length(trim(ls_hsnno)) = 0 then
set ls_hsnno = (select hsn_no from item
where item_code = as_itemcode);
end if;
end if;
return ls_hsnno;
end
@
drop function fn_gst_rate_amt@
create function fn_gst_rate_amt(as_trancode varchar(6),as_tranid varchar(10), al_lineno decimal(3,0), as_type char(1), as_rateoramt char(1))
......
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