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.NetReportProvTimesheetLines ====== <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> create procedure "pears"."NetReportProvTimesheetLines"( in "pWebUserID" char(20),in "pProvTimesheetID" char(20) ) result( "Pay_Type" char(100),"Unit" char(100),"Units__R" double,"Rate__MR" double,"Total__MR" double ) -- 20121003 NetReportTimesheets modified for Current timesheets begin declare "userClass" char(20); set "userClass" = (select first "iqxnetuserclassid" from "iqxnetuser" where "iqxnetuserid" = "pWebUserID"); select "b"."description", "b"."unit", (if "userclass" = 'CLIENT' then "l"."unitscharged" else "l"."unitspaid" endif), (if "userclass" = 'CLIENT' then "l"."chargerate" else "l"."payrate" endif), (if "userclass" = 'CLIENT' then "l"."unitscharged"*"l"."chargerate" else "l"."unitspaid"*"l"."payrate" endif) from "tempprovtimesheetline" as "l" key join "temppayband" as "b" where "l"."tempprovtimesheetid" = "pProvTimesheetID" order by "b"."sortorder" asc,"b"."description" asc end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetReportProvTimesheetLines" IS {create procedure pears."NetReportProvTimesheetLines"( in "pWebUserID" char(20),in "pProvTimesheetID" char(20) ) result( "Pay_Type" char(100),"Unit" char(100),"Units__R" double,"Rate__MR" double,"Total__MR" double ) -- 20121003 NetReportTimesheets modified for Current timesheets begin declare "userClass" char(20); set "userClass" = (select first "iqxnetuserclassid" from "iqxnetuser" where "iqxnetuserid" = "pWebUserID"); select "b"."description", "b"."unit", (if "userclass" = 'CLIENT' then "l"."unitscharged" else "l"."unitspaid" endif), (if "userclass" = 'CLIENT' then "l"."chargerate" else "l"."payrate" endif), (if "userclass" = 'CLIENT' then "l"."unitscharged"*"l"."chargerate" else "l"."unitspaid"*"l"."payrate" endif) from "tempprovtimesheetline" as "l" key join "temppayband" as "b" where "l"."tempprovtimesheetid" = "pProvTimesheetID" order by "b"."sortorder" asc,"b"."description" asc end } </code> database/procedures/pears_netreportprovtimesheetlines.txt Last modified: 2026/08/07 19:24by 127.0.0.1