Commit 9e566f49 authored by rreddy's avatar rreddy

//changed by sankara 08/04/14 for wms live


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94522 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ad379a3b
......@@ -45149,4 +45149,39 @@ END IF;
END TRIG_WAVE_STAT_ORG;
/
//changed by sankara 08/04/14 for wms live
CREATE OR REPLACE FUNCTION "FN_PRONO" (as_trancode in char,as_prono in varchar2)
return varchar2 is
ls_prono varchar2(20) := as_prono;
len number := 0;
m number(17,2);
rem number(17,2);
c number;
sumodd number := 0;
sumeven number := 0;
begin
if trim(as_trancode) in ('TACO0001','TAUP0071')
then
m := as_prono / 7;
rem := m-trunc(m);
if rem = 0 then ls_prono := as_prono||'0';
elsif rem = .14 then ls_prono := as_prono||'1';
elsif (rem = .28 or rem = .29) then ls_prono := as_prono||'2';
elsif (rem = .42 or rem = .43) then ls_prono := as_prono||'3';
elsif rem = .57 then ls_prono := as_prono||'4';
elsif rem = .71 then ls_prono := as_prono||'5';
elsif (rem = .85 or rem = .86) then ls_prono := as_prono||'6';
end if;
end if;
if trim(as_trancode) in ('TAFE0039')
then
m := as_prono / 7;
rem := trunc(m);
rem := rem * 7;
rem := as_prono - rem;
ls_prono := as_prono||trim(rem);
end if;
return ls_prono ;
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