<!-- generated by php artisan docs:split-brd from brd/BRD-Morvia-Project-Guide-en.md — edit the BRD, not this file -->

#### TRN-019 | Cashback, points and levels (trainee wallet)
**Source:** p.30–32 · **Actor:** trainee
- **Purpose:** let the trainee follow the benefits and incentives linked to the account.
- **Screen contents:** **cashback balance**; points balance and current level.
- **Cashback mechanism:**
  - Encourages repeat purchases: when purchases reach an amount set by the admin, the trainee gets a
    cashback value to use **later as a discount** on a new enrollment.
  - Admin settings (ADM-039): *required purchase amount* (threshold to earn cashback) · *cashback
    value* (discount earned) · *status* (active / inactive).
  - Example: purchase ≥ 500 SAR → 10 SAR cashback, added to the cashback balance per the earning
    rules.
  - Cashback is computed on the **amount actually paid**, not the course's original price.
  - Cashback is **never withdrawn as cash**; it is only a discount on a later enrollment.
- **Points and levels:**
  - The user's level depends on the **total points collected**.
  - The admin controls: level name · points needed · level order · level status (ADM-041).
  - Example thresholds: level 1 = 200, level 2 = 400, level 3 = 600 points, later mapped to final
    names (e.g. Silver / Gold / Platinum), each with the **discount rate** applied at that level.
  - **Using points:** the user can use points as a discount only after reaching one of the defined
    levels; the admin also controls whether a level allows using points. Flow: points balance > 0 →
    has the user reached a qualifying level? → no: points keep accumulating and the "use points"
    option is hidden → yes: points can be used as a discount.
- **Changed by additional requirements:** the number of points per course is set by the **admin**
  during review (not by the trainer) and earned when the course is **completed** (A-p.10–11).
- **Changed by the cancellation policy (C-§22):** a cancelled course earns **no** points or cashback and
  its pending rewards are cancelled; points or cashback **used to pay** go back to their original
  balance. Only the cash actually paid is refunded, outside the system (C-§10). The admin makes these
  wallet adjustments when removing the trainee (DEC-12).

**Acceptance, rules and screen notes citing TRN-019:**

- WF-06 — Course completion — End time reached → system completes automatically or trainer / admin completes → enrollments Completed → certificates issued → points granted → cashback → trainer entitlements Pending → Available → admin settles outside — TRR-022, ADM-030, TRN-025, TRN-019, TRR-025, ADM-038
- BR-LOY-01 — Cashback is earned on the amount actually paid, evaluated per single purchase, never paid out as cash, and used only as a discount on a later enrollment. — TRN-019, ADM-039
- BR-LOY-03 — Course points are set by the admin, earned when the course is completed, and returned on cancellation (D4). — ADM-026, ADM-041, TRN-019
- BR-LOY-04 — The level follows total points earned historically; using points never lowers it; points can be used as a discount only at a level that allows it. — TRN-019, ADM-041
- BR-CNL-06 — A cancelled course earns no points or cashback; pending rewards and Pending entitlements are cancelled; points / cashback used to pay return to their balance; only cash actually paid is refunded (C-§21, §22). — TRN-019, TRR-025, ADM-038
