Commit 9d2a1e86 authored by Fares's avatar Fares

docs(death): update architecture map with corrected fee logic

Reflects that deceased is excluded from annual sub, trustee fee uses
current plan price via PricingEngine, and Pricing module is now a dependency.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent d48cc140
...@@ -174,16 +174,22 @@ recorded → completed (for spouse/child death — no fee, simpler flow) ...@@ -174,16 +174,22 @@ recorded → completed (for spouse/child death — no fee, simpler flow)
``` ```
For primary_member death: For primary_member death:
The deceased member is NOT charged. The primary spouse IS the new member.
Form Fee = SVC_TRANSFER_FORM (default 570 EGP) Form Fee = SVC_TRANSFER_FORM (default 570 EGP)
Annual Sub = SVC_ANNUAL_MEMBER + (spouses × SVC_ANNUAL_SPOUSE) + (children × SVC_ANNUAL_CHILD) Annual Sub = 1 × SVC_ANNUAL_MEMBER (primary spouse = new member)
+ (temps × SVC_ANNUAL_TEMP) + DEVELOPMENT_FEE (once) + (remaining_spouses × SVC_ANNUAL_SPOUSE) [exclude primary + secondaries]
+ (children × SVC_ANNUAL_CHILD)
+ (temps × SVC_ANNUAL_TEMP)
+ DEVELOPMENT_FEE (once)
Example: member + 1 spouse + 2 children + 1 temp = 492 + 492 + 222×2 + 222 + 35 = 1,685 EGP Example: new member (wife) + 0 extra spouses + 2 children + 1 temp = 492 + 222×2 + 222 + 35 = 1,193 EGP
Base per membership = Form Fee + Annual Sub (all family) Base per membership = Form Fee + Annual Sub (new membership family)
Total Base = Base × (1 + number_of_secondary_spouses) Total Base = Base × (1 + number_of_secondary_spouses)
Trustee Fee = percentage of membership_value OR fixed amount (set during board approval) Trustee Fee = percentage of CURRENT plan price from pricing_configs (NOT old membership_value)
OR fixed amount — set during board approval (boardApprove action)
Grand Total = Total Base + Trustee Fee Grand Total = Total Base + Trustee Fee
...@@ -224,6 +230,7 @@ For spouse/child death: fee_amount = 0 (no transfer) ...@@ -224,6 +230,7 @@ For spouse/child death: fee_amount = 0 (no transfer)
| Archive | ArchiveService (takeSnapshot, recordNumberTransfer) | | Archive | ArchiveService (takeSnapshot, recordNumberTransfer) |
| Payments | PaymentService (processPayment for direct pay) | | Payments | PaymentService (processPayment for direct pay) |
| Cashier | PaymentRequestService (queue payment for cashier processing) | | Cashier | PaymentRequestService (queue payment for cashier processing) |
| Pricing | PricingEngine::getMembershipPrice (current plan price for trustee fee calculation) |
| Rules | RuleEngine (DEVELOPMENT_FEE) | | Rules | RuleEngine (DEVELOPMENT_FEE) |
| ServiceCatalog | ServicePrice (SVC_TRANSFER_FORM, SVC_ANNUAL_MEMBER, SVC_ANNUAL_SPOUSE, SVC_ANNUAL_CHILD, SVC_ANNUAL_TEMP) | | ServiceCatalog | ServicePrice (SVC_TRANSFER_FORM, SVC_ANNUAL_MEMBER, SVC_ANNUAL_SPOUSE, SVC_ANNUAL_CHILD, SVC_ANNUAL_TEMP) |
......
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