====== pears.PersonAvailableForRecovery ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."PersonAvailableForRecovery" IS {create function PersonAvailableForRecovery /* Application Maintained Function / Procedure - DO NOT EDIT*/ (in sFoundDigit char(1),in sPersonid char(20),in dShiftDate date,in tShiftFrom time,in tShiftTo time,in iRecovery smallint,in MovingShiftID char(20)) returns char(1) begin declare x char(1); if isnull(irecovery,0) = 0 or isnull(sfounddigit,'A') <> 'A' then return sfounddigit end if; set x=personavailableforplaniterate(spersonid,dshiftdate,tshiftfrom,addrecoveryhours(tshiftfrom,tshiftto,irecovery),0,movingshiftid); if isnull(x,'A') = 'A' then return sfounddigit else return x end if end }