====== pears.pay_weeklyemployerNI ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create function "pears"."pay_weeklyemployerNI"(
/* Application Maintained Function / Procedure - DO NOT EDIT*/
in "pay" real,in "paydate" date,in "pid" char(20) )
returns real
begin
declare "tmethod" smallint;
select "isnull"("taxmethod",1) into "tmethod" from "pay_employee" where "personid" = "pid";
if "tmethod" = 1 then
if "pay" <= 83 then
return(0)
else
return("pay"*.122)
end if
else return(0)
end if
end