====== pears.NetCandidateTaxCodeDropdown ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create procedure "pears"."NetCandidateTaxCodeDropdown"( in "pWebUserID" char(20),in "TaxCode" char(10) default null )
result( "Value" char(20),"Descrip" char(1024),"selected" char(1) )
// IQXWeb
begin
declare "CurrentTaxCode" char(20);
set "CurrentTaxCode" = "trim"((select "string"("TaxCode",(if "Week1Ind" = 1 then 'Week 1' endif)) from "pay_employee" key join "person" key join "iqxnetuserlink" where "iqxnetuserid" = "pWebUserID"));
select "tagchoiceid","isnull"("longdescription","description"),(if "isnull"("CurrentTaxCode",'') = "description" then '1' else '0' endif) from "tagchoice" where "tagid" = 'PDE' and "taglocation" = 'P' order by "sortorder" asc
end /* DOC
2017-10-23 PC remove hard-coded questions and allow lookup from question
2018-11-08 ET This should be a soft procedure.
*/
go
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetCandidateTaxCodeDropdown" IS
{create PROCEDURE pears."NetCandidateTaxCodeDropdown"(in pWebUserID char(20),in TaxCode char(10) default null)
RESULT(Value char(20),Descrip char(1024),selected char(1) )
// IQXWeb
BEGIN
declare CurrentTaxCode char(20);
set CurrentTaxCode=trim((select string(TaxCode,(if Week1Ind=1 then 'Week 1' endif)) from pay_employee key join person key join iqxnetuserlink where iqxnetuserid=pWebUserID));
select tagchoiceid,isnull(longdescription,description),(if isnull(CurrentTaxCode,'')=description then '1' else '0' endif) from tagchoice where tagid='PDE' and taglocation='P' order by sortorder asc
END
/* DOC
2017-10-23 PC remove hard-coded questions and allow lookup from question
2018-11-08 ET This should be a soft procedure.
*/
}