# Cash & Shift Operations Completion Bundle v38

v38 combines four previously separate cash-operation steps into one sprint bundle.

## A. Shift variance approval gate

Existing Approval Engine is reused; no new approval schema is introduced.

Configure an active policy:

- action_code: `cash.shift.close_variance`
- scope_type: tenant or branch
- conditions:
  - `max_abs_variance_without_approval`

Example conditions:

```json
{"max_abs_variance_without_approval":"100.000000"}
```

If absolute close variance is above that threshold, close requires an approved
Approval Request with:

- action_code = `cash.shift.close_variance`
- subject_type = `cash.shift`
- subject_public_id = target shift public ULID
- payload.variance_amount = exact variance being approved

No policy means legacy close behavior remains available.

## B. Cash drop reversal

Cash drop history is never mutated.

A reversal:
- creates immutable `cash.transfer_reversals`
- moves value from destination account back to shift cashbox
- posts paired immutable cash movements
- increases shift expected cash
- posts `cash_drop_reversal` shift entry
- requires original shift to remain open
- is idempotent and one reversal per original transfer

## C. Shift summary

The summary is derived from immutable shift entries:

- opening float
- cash sales
- cash refunds
- manual cash in/out
- cash drops
- cash drop reversals
- close variance
- net shift entries

Blind-close behavior remains:
open shifts do not reveal `expected_cash_amount`.

## D. Operational APIs

Adds:
- shift history/filtering
- current open shift by register
- shift summary/detail
- cash drop reversal

## API

GET  /api/v1/cash/shifts
GET  /api/v1/cash/registers/{registerPublicId}/current-shift
GET  /api/v1/cash/shifts/{shiftPublicId}/summary
POST /api/v1/cash/cash-drops/{transferPublicId}/reverse

Existing shift endpoints remain unchanged.

## Bundle policy

v38 is intentionally a larger delivery unit:
multiple related features, one backup, one migration sequence, focused regressions,
and one full suite.
