====== pears.NetTimesheetHeader ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create procedure "pears"."NetTimesheetHeader"( in "pWebUserID" char(20),in "pTempTimesheetID" char(20) )
result( "temptimesheetid" char(20),"serialnumber" char(20),"tempname" char(60),"position" char(60),"companyname" char(60),"weekenddate" date,"timesheettype" char(1),"timesheettotal" double )
begin
select "s"."tempshiftid","s"."shiftdate","s"."timefrom","s"."timeto","s"."breakminutes",
"p"."description","weekmonthenddate"("t"."period","t"."periodlength") as "weekenddate"
from "tempshift" as "s" key join "temptimesheet" as "t"
,"tempshift" as "s" key left outer join "tempshiftplan" as "p"
,"temptimesheet" as "t" key join "person"
where "t"."temptimesheetid" = "pTempTimesheetID"
and "s"."shiftdate" between "weekenddate"-6 and "weekenddate"
order by "s"."shiftdate" asc,"s"."timefrom" asc
end
go
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetTimesheetHeader" IS
{create procedure pears."NetTimesheetHeader"( in "pWebUserID" char(20),in "pTempTimesheetID" char(20) )
result( "temptimesheetid" char(20),"serialnumber" char(20),"tempname" char(60),"position" char(60),"companyname" char(60),"weekenddate" date,"timesheettype" char(1),"timesheettotal" double )
begin
select "s"."tempshiftid","s"."shiftdate","s"."timefrom","s"."timeto","s"."breakminutes",
"p"."description","weekmonthenddate"("t"."period","t"."periodlength") as "weekenddate"
from "tempshift" as "s" key join "temptimesheet" as "t"
,"tempshift" as "s" key left outer join "tempshiftplan" as "p"
,"temptimesheet" as "t" key join "person"
where "t"."temptimesheetid" = "pTempTimesheetID"
and "s"."shiftdate" between "weekenddate"-6 and "weekenddate"
order by "s"."shiftdate" asc,"s"."timefrom" asc
end
}