docs: small changes based on review
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Moritz 2025-12-11 15:27:18 +01:00
parent 59f81d8bc7
commit 0e78610608
Signed by: moritz
GPG key ID: 1020A035E5DD0824

View file

@ -82,7 +82,6 @@ This document provides a comprehensive overview of the Membership Fees system. I
- amount (Decimal) - Membership fee amount in Euro - amount (Decimal) - Membership fee amount in Euro
- interval (Enum) - :monthly, :quarterly, :half_yearly, :yearly - interval (Enum) - :monthly, :quarterly, :half_yearly, :yearly
- description (Text, optional) - description (Text, optional)
- timestamps
``` ```
**Important:** **Important:**
@ -101,7 +100,6 @@ This document provides a comprehensive overview of the Membership Fees system. I
- status (Enum) - :unpaid (default), :paid, :suspended - status (Enum) - :unpaid (default), :paid, :suspended
- amount (Decimal) - Membership fee amount at generation time (history when type changes) - amount (Decimal) - Membership fee amount at generation time (history when type changes)
- notes (Text, optional) - Admin notes - notes (Text, optional) - Admin notes
- timestamps
``` ```
**Important:** **Important:**
@ -169,11 +167,16 @@ value: UUID (Required) - Default membership fee type for new members
**Algorithm:** **Algorithm:**
Lock the whole cycle table for the duration of the algorithm
1. Get `member.membership_fee_start_date` and member's membership fee type 1. Get `member.membership_fee_start_date` and member's membership fee type
2. Calculate first cycle based on `membership_fee_start_date` 2. Generate cycles until today (or `left_at` if present):
3. Generate all cycles from start to today (or `left_at` if present) - If no cycle exists:
4. Skip existing cycles - Generate all cycles from `membership_fee_start_date`
5. Set `amount` to current membership fee type's amount - else:
- Generate all cycles from last existing cycle
- use the interval to generate the cycles
3. Set `amount` to current membership fee type's amount
**Example (Yearly):** **Example (Yearly):**