Commit ff5bbeed authored by Mahmoud Aglan's avatar Mahmoud Aglan

docs: update architecture maps for Death/Waiver/Transfers/Subscriptions

Reflect changes from display completeness and logic fixes commit.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 784c7ee8
# Death Module — Architecture Map # Death Module — Architecture Map
> **Last updated:** 2026-07-22 > **Last updated:** 2026-08-06 (show view: deceased name, membership dates, subscription status; index: full status labels; createNewSubscriptions dedup)
> **Status:** Living document — incrementally updated as new information is discovered > **Status:** Living document — incrementally updated as new information is discovered
--- ---
...@@ -341,6 +341,9 @@ The Death module has **no own permissions**. It reuses Transfers module permissi ...@@ -341,6 +341,9 @@ The Death module has **no own permissions**. It reuses Transfers module permissi
7. **activated_by_payment_id**: New member records link to the death_fee payment ID for audit trail 7. **activated_by_payment_id**: New member records link to the death_fee payment ID for audit trail
8. **Spouse/child death is simpler**: Just archives the dependent record, no membership transfer 8. **Spouse/child death is simpler**: Just archives the dependent record, no membership transfer
9. **Dual payment paths**: Payment via Cashier queue (normal) or direct via `/pay` endpoint 9. **Dual payment paths**: Payment via Cashier queue (normal) or direct via `/pay` endpoint
10. **show() enhanced data (2026-08-06)**: Controller passes `deceasedName` (actual spouse/child name), `newMemberSubs` (subscription rows for transferred member), `membership_created_at`/`membership_activated_at` from the members join, and `created_at`/`activated_at` from newMember query. show.php displays deceased person name, case creation date, original membership dates, new member acquisition date, and subscription status section.
11. **index.php full status labels (2026-08-06)**: All death case statuses (recorded, board_review, board_approved, rejected, fee_paid, pending_form_fill, completed) now have proper Arabic status labels displayed in the list view.
12. **createNewSubscriptions dedup (2026-08-06)**: The method checks for existing subscription rows before inserting and updates pending rows to paid status instead of creating duplicates — prevents double subscription entries on re-completion or retry scenarios.
--- ---
......
# Subscriptions Module — Architecture Map # Subscriptions Module — Architecture Map
> **Last updated:** 2026-07-21 (added receipt_number + paid_by audit columns per subscription row) > **Last updated:** 2026-08-06 (memberSubscriptions page-load sync via SubscriptionSyncService::refreshForMember)
> **Status:** Living document — incrementally updated as new information is discovered > **Status:** Living document — incrementally updated as new information is discovered
--- ---
...@@ -442,6 +442,7 @@ No subscriptions should exist before this year. ...@@ -442,6 +442,7 @@ No subscriptions should exist before this year.
8. **Exempt status is terminal**: Once exempted, a subscription cannot be un-exempted without direct DB intervention 8. **Exempt status is terminal**: Once exempted, a subscription cannot be un-exempted without direct DB intervention
9. **PHP truthiness hazard in getRate()**: `'0.00' ?: fallback` never triggers because PHP treats non-empty strings as truthy. Fixed: `getRate()` returns `''` for missing/zero rows, plus hard fallback defaults. 9. **PHP truthiness hazard in getRate()**: `'0.00' ?: fallback` never triggers because PHP treats non-empty strings as truthy. Fixed: `getRate()` returns `''` for missing/zero rows, plus hard fallback defaults.
10. **service_catalog date filtering**: `getRate()` filters by `effective_from <= today AND (effective_to IS NULL OR effective_to >= today)`. Year-specific codes (e.g. `SVC_ANNUAL_TEMP_2026`) may not exist — the generic code is the reliable fallback. 10. **service_catalog date filtering**: `getRate()` filters by `effective_from <= today AND (effective_to IS NULL OR effective_to >= today)`. Year-specific codes (e.g. `SVC_ANNUAL_TEMP_2026`) may not exist — the generic code is the reliable fallback.
11. **Page-load sync for active members (2026-08-06)**: `SubscriptionController::memberSubscriptions()` now calls `SubscriptionSyncService::refreshForMember()` on page load for active members, ensuring missing subscription rows for active dependents are auto-created before displaying the subscriptions page. This catches dependents added through non-standard paths (e.g., death/waiver transfers) that may not have triggered the normal event listeners.
--- ---
......
# Transfers Module — Architecture Map # Transfers Module — Architecture Map
> **Last updated:** 2026-07-22 (child_separation: auto-complete after payment, skip archive snapshot, form_number generation, cashier displays child name + fee breakdown) > **Last updated:** 2026-08-06 (store: male under-25 employed+graduated exception, marriage_date vs membership date validation, create.php JS fix)
> **Status:** Living document — incrementally updated as new information is discovered > **Status:** Living document — incrementally updated as new information is discovered
--- ---
...@@ -342,6 +342,9 @@ Companion Surcharge: if new owner brings MORE dependents than source had: ...@@ -342,6 +342,9 @@ Companion Surcharge: if new owner brings MORE dependents than source had:
5. **Form submission optional**: FormBridge is only called if `TRANSFER_SEPARATION` form definition exists 5. **Form submission optional**: FormBridge is only called if `TRANSFER_SEPARATION` form definition exists
6. **Dual payment paths**: Payment can come via Cashier queue (PaymentRequestService) OR direct (PaymentService::processPayment via /pay endpoint) 6. **Dual payment paths**: Payment can come via Cashier queue (PaymentRequestService) OR direct (PaymentService::processPayment via /pay endpoint)
7. **TransferEligibility** is a shared service: also used for divorce and waiver eligibility checks 7. **TransferEligibility** is a shared service: also used for divorce and waiver eligibility checks
8. **Male under-25 employed+graduated exception (2026-08-06)**: `store()` age validation now allows males under 25 IF both `is_employed=1` AND `graduation_date` is set — checks these fields before rejecting based on age alone.
9. **Marriage date vs membership date validation (2026-08-06)**: `store()` validates that `marriage_date` is not earlier than the membership's `activated_at` or `created_at` — rejects if marriage predates membership acquisition.
10. **create.php JS fix (2026-08-06)**: The child_separation dropdown no longer hides males under 25 from the selection list — server-side validation handles eligibility instead of client-side filtering.
--- ---
......
# Waiver Module — Architecture Map # Waiver Module — Architecture Map
> **Last updated:** 2026-07-23 (Round 5: fix installment_cheques SQL error, include dev fee in debt calc, add form_number, block children >21, fix dependency transfer documentation) > **Last updated:** 2026-08-06 (show view: payment request tracking; index: target member name, date column, fee_paid/rejected status labels)
> **Status:** Living document — incrementally updated as new information is discovered > **Status:** Living document — incrementally updated as new information is discovered
--- ---
...@@ -390,6 +390,8 @@ The Waiver module uses permissions registered in **Transfers/bootstrap.php**: ...@@ -390,6 +390,8 @@ The Waiver module uses permissions registered in **Transfers/bootstrap.php**:
21. **Send-to-cashier route (2026-06-26)**: New `POST /waivers/{id}/send-to-cashier` replaces old immediate payment. Requires status=approved + target set 21. **Send-to-cashier route (2026-06-26)**: New `POST /waivers/{id}/send-to-cashier` replaces old immediate payment. Requires status=approved + target set
22. **Status indicators (2026-06-26)**: fee_paid status shows "🟢 جاهز لاعتماد طلب التنازل" with explicit "all conditions met" message 22. **Status indicators (2026-06-26)**: fee_paid status shows "🟢 جاهز لاعتماد طلب التنازل" with explicit "all conditions met" message
23. **Go to payment button (2026-06-26)**: Debt display includes direct link to member's financial page for quick payment 23. **Go to payment button (2026-06-26)**: Debt display includes direct link to member's financial page for quick payment
24. **show() payment request tracking (2026-08-06)**: Controller now passes `paymentRequest` (fetched from payment_requests table by `related_entity_type=waiver_requests`); show.php displays payment request status/details for tracking.
25. **index.php enhanced columns (2026-08-06)**: List view now shows target member name column, date column, and proper Arabic status labels for fee_paid and rejected statuses.
--- ---
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment