Asset Categories (فئات الأصول)
Asset categories group fixed assets by type and define default depreciation rules and GL account mappings. When creating a fixed asset, the category determines which accounts are used for the asset cost, depreciation expense, and accumulated depreciation -- unless overridden at the asset level.
Purpose
- Organize fixed assets into logical groups (vehicles, equipment, furniture, buildings)
- Define default depreciation method and useful life for each group
- Map three GL accounts per category: asset cost, depreciation expense, accumulated depreciation
- Reduce data entry by inheriting category defaults when registering new assets
Entity Attributes
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | auto | Primary key |
company_id | integer | auto | Owning company |
name | string | yes | Category name (English) |
name_ar | string | no | Category name (Arabic) |
code | string | no | Category code |
depreciation_method | enum | yes | straight_line, declining_balance, accelerated |
useful_life_months | integer | yes | Default useful life in months |
asset_account_id | FK | yes | GL account for asset cost |
depreciation_account_id | FK | yes | GL account for depreciation expense |
accumulated_depreciation_account_id | FK | yes | GL account for accumulated depreciation |
is_active | boolean | no | Active status (default: true) |
created_at | datetime | auto | Creation timestamp |
updated_at | datetime | auto | Last update timestamp |
Relationships
API Endpoints
| Method | Path | Description | Permission |
|---|---|---|---|
GET | /api/accounting/asset-categories | List categories (paginated) | accounting.asset-categories.view |
POST | /api/accounting/asset-categories | Create a category | accounting.asset-categories.create |
GET | /api/accounting/asset-categories/{id} | Get a category | accounting.asset-categories.view |
PUT | /api/accounting/asset-categories/{id} | Update a category | accounting.asset-categories.update |
DELETE | /api/accounting/asset-categories/{id} | Soft-delete a category | accounting.asset-categories.delete |
Request/Response Examples
Create Asset Category
bash
curl -X POST /api/accounting/asset-categories \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name": "Office Furniture",
"name_ar": "أثاث المكاتب",
"code": "FURN",
"depreciation_method": "straight_line",
"useful_life_months": 60,
"asset_account_id": 20,
"depreciation_account_id": 55,
"accumulated_depreciation_account_id": 21,
"is_active": true
}'dart
final response = await dio.post('/api/accounting/asset-categories', data: {
'name': 'Office Furniture',
'name_ar': 'أثاث المكاتب',
'code': 'FURN',
'depreciation_method': 'straight_line',
'useful_life_months': 60,
'asset_account_id': 20,
'depreciation_account_id': 55,
'accumulated_depreciation_account_id': 21,
'is_active': true,
});Response 201 Created
json
{
"data": {
"id": 3,
"company_id": 1,
"name": "Office Furniture",
"name_en": "Office Furniture",
"name_ar": "أثاث المكاتب",
"code": "FURN",
"depreciation_method": "straight_line",
"depreciation_method_label": "Straight Line",
"useful_life_months": 60,
"asset_account_id": 20,
"depreciation_account_id": 55,
"accumulated_depreciation_account_id": 21,
"is_active": true,
"created_at": "2026-03-10T08:00:00.000000Z",
"updated_at": "2026-03-10T08:00:00.000000Z"
}
}Update Asset Category
bash
curl -X PUT /api/accounting/asset-categories/3 \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"useful_life_months": 48,
"depreciation_method": "declining_balance"
}'dart
final response = await dio.put('/api/accounting/asset-categories/3', data: {
'useful_life_months': 48,
'depreciation_method': 'declining_balance',
});Depreciation Methods
| Method | Description |
|---|---|
straight_line | Equal monthly depreciation: (cost - salvage) / useful_life_months |
declining_balance | Applied to net book value: NBV * (2 / useful_life_months) |
accelerated | Declining balance that switches to straight-line when straight-line produces a higher amount |
Business Rules
- Three GL accounts required -- every category must map to an asset account, a depreciation expense account, and an accumulated depreciation account.
- Category defaults -- when a fixed asset does not specify its own depreciation method, the category's method and useful life are used.
- Ordered by code -- the list endpoint returns categories ordered by
code. - Soft delete -- deleting a category performs a soft delete.
- Company scoped -- all queries filter by the authenticated user's company.
- Active flag -- categories can be deactivated to prevent selection when creating new assets.