Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.SDSRequired ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."SDSRequired" IS {create function SDSRequired /* Application Maintained Function / Procedure - DO NOT EDIT*/ ( IN COID char(20),IN PID char(20)) RETURNS SMALLINT NOT DETERMINISTIC BEGIN if WPKMaintainGetSwitchValue('IR35SDSON','','L') = 'N' then return 0 end if; -- if exists (select 1 from company where PrivateSector = 1 and companyid = COID) then return 0 -- end if; if exists(select 1 from pay_employee where personid = PID and taxmethod = 1) then return 0 end if; if exists(select 1 from pay_employee where personid = PID and HMRCEngagementDetail = 'F') then return 0 end if; if exists(select 1 from companySDS where personid = PID and companyid = COID) then return 0 end if; return 1 END } </code> database/procedures/pears_sdsrequired.txt Last modified: 2026/08/07 19:24by 127.0.0.1