# ALPHA PATCH-002

## Dashboard Attendance Formula Correction

You are implementing Alpha Patch-002 for the INVEETAIRE platform.

This is NOT a new feature.

This patch addresses the single observation discovered during Alpha Acceptance Test (AAT-001).

Do NOT implement any new functionality.

Do NOT refactor architecture.

Do NOT modify database schema.

---

# Current Status

✅ Sprint 0 Complete

✅ Sprint 1 Complete

✅ Sprint 2 Complete

✅ Sprint 3 Complete

✅ PILOT-001

✅ PILOT-002

✅ PILOT-003

✅ PILOT-004

✅ PILOT-005

✅ PILOT-006

✅ PILOT-007

✅ Alpha Patch-001

✅ Alpha Acceptance Test

Repository Status:

ALPHA BASELINE

---

# Objective

Correct the attendance percentage calculation displayed on the Wedding Operations Dashboard.

The current implementation may produce percentages greater than 100% when a checked-in guest represents multiple invited pax.

Business logic remains correct.

Only dashboard presentation requires correction.

---

# Scope

Modify ONLY the dashboard statistics calculation.

Do NOT modify:

Check-In logic

Attendance records

RSVP logic

Guest records

Workspace logic

Messaging

Public Invitation

QR

Scanner

---

# Required Behaviour

Provide TWO separate metrics.

---

## Guest Attendance

Formula:

checked_in_guest_count

/

total_guest_count

×

100

Maximum:

100%

---

## Pax Attendance

Formula:

checked_in_pax

/

total_invited_pax

×

100

Maximum:

100%

---

Display both values independently.

Do NOT mix guest count with pax count.

---

# Dashboard

Dashboard must expose:

total_guest_count

checked_in_guest_count

guest_attendance_percentage

total_invited_pax

checked_in_pax

pax_attendance_percentage

Existing statistics must remain compatible.

---

# Constraints

Do NOT:

Change database schema

Modify services outside dashboard aggregation if unnecessary

Refactor architecture

Implement charts

Implement realtime updates

Implement exports

Implement analytics

---

# Verification

Verify:

Single guest (1 pax)

Family guest (6 pax)

Large group (8 pax)

No check-ins

Partial attendance

Full attendance

Percentages never exceed 100%.

Existing dashboard statistics remain valid.

PHP syntax passes.

---

# Acceptance Criteria

PASS only if:

Guest attendance percentage is correct.

Pax attendance percentage is correct.

No percentage exceeds 100%.

Existing dashboard fields remain available.

No new features added.

PHP syntax passes.

---

# Output

Provide:

1. Files modified.
2. Updated dashboard formulas.
3. Verification results.
4. Acceptance checklist.
5. PHP syntax results.

Stop after implementation.

Wait for Human Approval.
