West Coast Pest Attendance App - Current Build
==============================================

Install location
----------------
Extract this ZIP inside:
/home/uent/public_html/

The ZIP must extract directly to folders like:
- backoffice/
- api/
- attendance/
- cron/
- sql/

Do not extract it into /home/uent/public_html/public_html/.

SQL setup
---------
Run these SQL files if they have not already been run:
- sql/01_create_work_sessions.sql
- sql/01_create_work_session_events.sql
- sql/02_create_tracking_tables.sql
- sql/03_phase1_minimal_updates.sql
- sql/04_create_payroll_settings.sql

Payroll rules
-------------
Backoffice includes Payroll Settings where you can set:
- normal start time
- normal end time
- grace minutes before normal start
- grace minutes after normal end
- standard daily normal minutes
- lunch deduction minutes

Default rule:
- normal day: 07:30 to 16:30
- 15 minutes grace before start
- 15 minutes grace after end
- normal daily cap: 480 minutes / 8 hours
- lunch deduction: 60 minutes unless Working Lunch is clicked

Reports/export use one central payroll calculation:
- Weekdays: normal hours inside the work window, capped at the standard day after lunch.
- Weekday overtime: all time outside the normal window or above the daily normal cap = OT 1.5.
- Sundays and public holidays: all worked time after lunch = OT 2.0.
- No other days go to OT 2.0.

Backoffice pages affected
-------------------------
- Monthly Summary
- Date Range Report
- Staff Hours
- Sessions
- Sage Payroll Export
- Payroll Settings
