# RAMA AG — Phase 09 — Monthly & Annual Reporting

Status: **DONE (draft values)** (branch `develop/v1`; not yet activated on `:3400`).

## Implemented features
- **Monthly control** (`/smgv/monthly`): the client sheet layout (calendar week, day, target, holidays, the three time bands, travel, day total with corrections marked, week totals, credits and supplements, all 15 absence codes, control flags, manual corrections, remarks, month balance).
  - Sticky row labels, headers and total column; horizontal scrolling inside the sheet; keyboard navigation (arrow keys and Enter).
  - Only absence cells are editable; attendance evidence never is.
  - Weekend and holiday indicators, warnings, previous/next employee and month, approved leave can be taken over as Ferien.
- **Annual overview** (`/smgv/annual`): January–December plus year, matching the Jahresübersicht rows (employment %, target, day/night work, travel, deduction, supplements, unproductive by code, total, Vergleich, cumulative), Vorjahr compensation, vacation control and carry-over to the next year. Without an employee selected, it shows the company-wide annual table.
- **Vacation & absences** (`/smgv/absences`) and **Overtime & compensation** (`/smgv/balances`, append-only correction journal).
- All annual totals are sums of the monthly results, which are sums of the daily results.

## Modified / added files
`app/Livewire/Smgv/{Monthly,Annual,Absences,Balances}.php` + views; `resources/js/app.js` (`btSheet`)

## Database changes
None.

## Test results
Unit `tests/Unit/SmgvTimeEngineTest.php` (8), feature `tests/Feature/SmgvAccountingTest.php` (8), `tests/Feature/SmgvCenterTest.php` (6). Full regression: main 562 (464 passed, 98 skipped by design), memory 97 (96 + 1 skipped), upgrade 2: **0 failures**.

## Security considerations
All user-facing actions are Administrator-only: `admin` route middleware plus a fresh database check on every Livewire request (`SmgvContext::bootSmgvContext`) and a service-level `Actor::admin()`. Audit entries never contain personal values (no AHV, address or birth date). Isolation is unchanged: RAMA database and account only, no outbound mail or HTTP, and Quality was never touched.

## Technical decisions, assumptions and limitations
See `RAMA_AG_MASTER_DEVELOPMENT_TRACKER.md` (Decisions, Known limitations).

## Outstanding blockers
The GAV/SMGV rule confirmations listed in `RAMA_AG_MASTER_DEVELOPMENT_TRACKER.md` remain open. Until they are answered, values are drafts (watermarked, with banners).
