PACKAGE WL4 - PAYROLL READY WORKING LUNCH EXPORT

Purpose
- Adds a payroll-ready page using the new working lunch calculation.
- Shows staff totals and session detail.
- Adds CSV download for payroll/import/review.

Files
- /backoffice/payroll-working-lunch-export.php
- /backoffice/payroll-working-lunch-export.css
- /sql/verify-wl4-payroll-working-lunch-export.sql
- /README-WL4.txt

Extract inside
- /home/uent/public_html

Open this page
- https://uent.co.za/backoffice/payroll-working-lunch-export.php

Recommended menu placement
Add this link near Staff Hours / Sage Payroll Export:

Payroll Working Lunch Export
/backoffice/payroll-working-lunch-export.php

Calculation
- Payroll Worked = session span - lunch deducted
- Lunch Deducted = full default lunch if no working lunch exists
- Lunch Deducted = stored deducted minutes if working lunch exists
- Payroll Hours = Payroll Worked minutes / 60 as decimal hours

CSV columns
- staff_id
- staff_name
- session_date
- clock_in
- clock_out
- session_status
- span_minutes
- span_hours
- default_lunch_minutes
- working_lunch_minutes
- lunch_deducted_minutes
- worked_minutes
- worked_hours
- clock_in_status
- clock_out_status
- lunch_status
- work_session_id

Important
- This does not replace Sage export yet.
- It creates a clean payroll-ready dataset to validate the new working lunch payroll logic.
- Once validated, WL5 can update Sage Payroll Export to use these same totals.
