# TOBAS Release R2 (pilot): what is in it

R1 put the public website and CMS live (Phase 1). R2 adds branch accounting and Headquarters' oversight, for
a pilot with 2 or 3 real branches. Details of each change are in [CHANGELOG.md](../../CHANGELOG.md); the
reasons behind them are in [DECISIONS.md](../../DECISIONS.md) (D-031 to D-051).

## TOBAS Branch (the branch's books)

- **Accounting engine** (Phase 2): one chart of accounts for the church, with branch sub-accounts where HQ
  allows. Every entry is double-entry, balanced per fund, and append-only. Mistakes are corrected by
  reversal, closed months refuse entries, and a ledger check runs every night.
- **Cash book and imprest; bank book** with transfers, fixed deposits, statement import, reconciliation and
  sign-off (Phase 3).
- **Income and expenditure** (Phase 3):
  - giving batches counted by two people, with receipts;
  - pledges and reminders;
  - requisitions reviewed, approved and paid by different people;
  - payment vouchers and cheques.
- **General journal** with a checker for every journal, reversals, accruals and recurring journals (Phase 3).
- **Fixed assets** (Phase 4A): depreciation that stops at the right time, improvements, write-offs, branch
  transfers approved by HQ, photos and QR labels, and counts.
- **Budgets** (Phase 4B): by cost centre, with 80% and 100% alerts, copy forward, and variance for any period.
- **Users** (Phase 4B): custom roles, devices and sessions, and a password policy.
- **Statements and reports** (Phase 4C): cash flow, notes, prior-year comparatives, tithes by service and
  more. Every report downloads as Excel, PDF or CSV, on the church letterhead.
- **Year end** (Phase 4D): branches submit and HQ Finance accepts. The closing trial balance is kept, and
  budgets are copied forward.

## TOBAS Directs (Headquarters)

- **Branch register and lifecycle** (5A): suspend, lock, resume, close or merge a branch, confirmed by HQ
  Finance.
- **Provisioning wizard** (5B):
  - a new branch in seven saved steps;
  - its admin activates by a one-time link;
  - opening balances are imported and posted by a second person;
  - a go-live checklist.
- **Chart of accounts versions** (5C): HQ's changes are published together, with a note to branches.
- **People in all branches** (5C): appoint admins, change roles, reset access.
- **Auditor mode** (5D):
  - each auditor's engagement limits the branches, the dates of the books, and an end date;
  - everything they open or download is logged;
  - their downloads say "Auditor copy";
  - their questions go to branches to answer.

## Not in R2 (later phases)

- Working offline (Phase 6).
- Consolidated statements with eliminations and MIS dashboards (Phase 7).
- Per-branch licences and renewals (Phase 8).
- Online giving posting to branch ledgers (Phase 9).

## Upgrading a server to R2

Back up first, then:

```
php artisan backup:run
php artisan migrate --force
php artisan config:cache
php artisan permissions:sync
npm ci && npm run build
php artisan ledger:verify
```
