1. Attendance form: Force start date to blank by clearing Django 5.x auto-fill
from model default (default=timezone.now). Added self.fields['date'].initial=None
in AttendanceLogForm.__init__().
2. History list view: When filtering by a specific worker, show only that
worker's name in the Workers column (not all workers on the log). Uses
filtered_worker_obj passed from the view.
3. History list view: Added Amount column (admin-only) showing daily cost.
When filtering by worker, shows that worker's daily_rate. When unfiltered,
shows total via new WorkLog.display_amount property (sum of all workers'
daily_rate, uses prefetch cache for efficiency).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Straight port from V2 adapted for V5 field names. Creates expense
receipts with dynamic line items, VAT calculation (Included/Excluded/
None at 15%), and emails HTML + PDF to Spark Receipt. Uses lazy
xhtml2pdf import to avoid crashing if not installed on server.
Files: forms.py (ExpenseReceiptForm + FormSet), views.py (create_receipt),
create_receipt.html, receipt_email.html, receipt_pdf.html, urls.py, base.html
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Attendance form: date range (start+end), Sat/Sun checkboxes, conflict
detection with Skip/Overwrite, supervisor auto-set, estimated cost card
- Work history: filter by worker/project/payment status, CSV export,
payment status badges (Paid/Unpaid)
- Supervisor dashboard: stat cards for projects, teams, workers count
- Forms: supervisor filtering (non-admins only see their projects/workers)
- Navbar: History link now works, cleaned up inline styles in base.html
- Management command: setup_groups creates Admin + Work Logger groups
- No model/migration changes — database is untouched
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>