# Phase 7C manual test script: alerts and remittances

For the HQ Administrator or HQ Finance and a branch treasurer, about 20 minutes. The rules are also proved by
`tests/Feature/AlertsAndRemittancesTest.php`:
- each kind of alert opening, closing by itself or staying until resolved;
- the daily email going once;
- monthly drafts, reminders, confirmation by the branch and approval by Headquarters with a reason;
- the parent branch's own staff unable to act on a sub-branch's draft;
- the branch dashboard;
- only Headquarters reaching the alerts.

**Logins (demo church):**
- **admin@demo.church.test**: with the password you set on 18 Oct (the only demo login that can act on alerts);
- **auditor@demo.church.test**: read-only, sees the alerts;
- **treasurer@demo.church.test**: Headquarters' own treasurer (not a network role).

Before you start, on the server: `php artisan directs:alerts --no-email` and
`php artisan remittances:draft --month=2026-09` (the local demo already has an overdue September draft for Enugu).

## A. The alerts list

1. [ ] As admin, open **Headquarters (Directs) › Alerts**. The counts at the top show critical, warning and for
   information; critical alerts come first.
2. [ ] Filter by **Kind** = Entry dated far back, then by **Branch** = Enugu Branch. The list follows.
3. [ ] Click an alert's title: it opens the page where the problem is fixed (a journal, a budget, the remittances
   page).
4. [ ] Press **Look again now**: "Looked at" shows the time just now.

## B. Dealing with an alert

5. [ ] On **Negative cash** or **Budget overrun**, choose yourself under **Assigned**, then press **Acknowledge**.
   The status shows acknowledged and the alert stays in the list.
6. [ ] Press **Note**, type a note and save it. It shows under the alert.
7. [ ] On an **Unusually large amount** alert, press **Resolve…** and say what you found. It leaves the list; with
   **Show** = Resolved it is there with your note. Press **Look again now**: it does not come back.
8. [ ] On the resolved alert press **Open again**: it is back in the list.
9. [ ] Fix the cause of a non-sticky alert (for example, reconcile the bank account it names), then press **Look
   again now**: it closes by itself with the note "Cleared by itself."
10. [ ] As auditor: the list shows, without Acknowledge, Note or Resolve buttons. As treasurer: `/directs/alerts`
    shows "not found".

## C. Remittances

11. [ ] As treasurer, open **Remittances to HQ**. Under **Waiting to be confirmed**, Enugu's September draft shows
    its total and **15 Oct 2026 · overdue**, and **Waiting for Enugu Branch to confirm** instead of buttons.
12. [ ] As admin, the same row shows **Approve for the branch…** and **Set aside…**. Press **Approve for the
    branch…** and cancel the prompt: nothing happens. Press it again and give a reason: the remittance is posted,
    with a due date of 15 Oct 2026, and the draft leaves the list.
13. [ ] In **Posted remittances**, the new row's **Due** shows overdue until it is paid. Record a payment: the row
    shows settled, marked late.
14. [ ] **On time this year** shows Enugu with one late remittance.
15. [ ] In the audit trail, the approval shows with your reason.

## D. Dashboards and emails

16. [ ] As treasurer, the dashboard shows **Alerts from Headquarters** for Headquarters' own branch.
17. [ ] A branch treasurer whose branch has a draft sees "1 remittance(s) to confirm" under **Needs attention**.
18. [ ] On the **HQ dashboard**, the tiles and branch table include **Remittances on time**.
19. [ ] Optional, with mail set up: `php artisan directs:alerts` sends one email of new alerts to HQ Finance;
    running it again sends nothing. `php artisan remittances:remind` emails a branch's treasurer 3 days before a
    due date.

## Sign-off

| Tester | Date | Result | Notes |
|---|---|---|---|
| | | | |
