# S19-11 Assumptions — Rekod Aset Sub-module Delta

**Task:** Rekod Aset — depreciation rates, schedule, register
**Date:** 2026-05-09

## What already exists

`app/Domain/FixedAssets/` already has:
- `FixedAsset` model with `depn_method` (StraightLine / ReducingBalance), `depn_rate_bps`, `useful_life_months`, `cost_cents`, `salvage_value_cents`, `accumulated_depn_cents`
- `CalculateMonthlyDepreciation` action — SL and RB formulas
- `RunDepreciationRun` action — monthly batch via Artisan scheduler
- `CreateFixedAsset`, `UpdateFixedAsset`, `DisposeAsset` actions
- `fixed_assets` table with depreciation accounting FK columns

## What S19-11 adds

1. **`asset_types` table** — named asset type with default depreciation rate and useful life (e.g. "Kenderaan" = RB 20% p.a., "Peralatan" = SL 10 years). Lets koperasi configure rates per asset type once, then assign assets to a type.

2. **`asset_type_id` on `fixed_assets`** — nullable FK; if set, the asset inherits the type's rate when `depn_rate_bps` / `useful_life_months` is null.

3. **`GenerateAssetRegister` action** — returns all active assets for a tenant with: name, category, asset_type, cost, accumulated_depn, NBV, in_service_date, method. Serves as the "register listing" mandatory item.

4. **`ap_bill_id` on `fixed_assets`** — nullable FK to `ap_bills` to satisfy "purchase tied to AP bill" requirement. Added via additive migration.

## Assumptions

- `asset_types` is tenant-scoped (each koperasi configures their own type set).
- Rate stored in `rate_bps` (basis points, same convention as `depn_rate_bps` on `fixed_assets`).
- Useful life stored in months (same as `useful_life_months`).
- `CalculateMonthlyDepreciation` inherits type rate only when asset's own `depn_rate_bps` / `useful_life_months` is null AND `asset_type_id` is set.
- "Block save if doesn't match AP" is interpreted as: if `ap_bill_id` is provided, it must belong to same tenant. Validated in `CreateFixedAsset` action (additive change).
- Tests: 5 covering the new features (type CRUD, register listing, type-inherited rate, AP link validation).
