Hello
So im setting up pay periods in my program the only thing that im stuck on now is how to limit dates in the date picker to just this week.
This is the query i used so the user can see records for just this pay period/week now i just need to make sure they cant add records for last pay period ak last week
select
`time card`.`Time Card ID`,
`time card`.`Date`,
`time card`.`Employee ID`,
`employee info`.`First Name`,
`employee info`.`Last Name`,
`time card`.`Project ID`,
`time card`.`Job Code`,
`time card`.`Startup Time`,
`time card`.`Shutdown Time`,
time_to_sec(timediff(`time card`.`Shutdown Time`,`time card`.`Startup Time`))/ 3600 AS `Time Total`,
`time card`.`ADMIN/PM Hrs Worked`,
`time card`.`Description`,
`time card`.`Record Modified`,
`time card`.`Date Record Modified`,
`time card`.`Fix Time`,
`time card`.`Fix Time Description`,
`time card`.`Admin Check`,
`time card`.`Admin Check ID`,
`time card`.`PM Check`,
`time card`.`PM Check ID`
From
`time card` ,
`employee info`
WHERE
YEARWEEK(`time card`.`Date`,5) = YEARWEEK(CURRENT_DATE,5)
AND
`time card`.`Employee ID` = `employee info`.`Employee ID`
So i only want user to be able to add records that match this current week/pay period. IE monday - sunday of this week
Im hoping that i can do this in the date picker so that i dont have to use an event which would allow them to enter any dates but the beforeadd would return an error if the date of the record was lower or higher then the current week.
Any idea's would really help my boss is jumping down my throat:(
Thanks
Travis Wilson