Skip to content

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

FieldTypeRequiredDescription
idintegerautoPrimary key
company_idintegerautoOwning company
namestringyesCategory name (English)
name_arstringnoCategory name (Arabic)
codestringnoCategory code
depreciation_methodenumyesstraight_line, declining_balance, accelerated
useful_life_monthsintegeryesDefault useful life in months
asset_account_idFKyesGL account for asset cost
depreciation_account_idFKyesGL account for depreciation expense
accumulated_depreciation_account_idFKyesGL account for accumulated depreciation
is_activebooleannoActive status (default: true)
created_atdatetimeautoCreation timestamp
updated_atdatetimeautoLast update timestamp

Relationships

API Endpoints

MethodPathDescriptionPermission
GET/api/accounting/asset-categoriesList categories (paginated)accounting.asset-categories.view
POST/api/accounting/asset-categoriesCreate a categoryaccounting.asset-categories.create
GET/api/accounting/asset-categories/{id}Get a categoryaccounting.asset-categories.view
PUT/api/accounting/asset-categories/{id}Update a categoryaccounting.asset-categories.update
DELETE/api/accounting/asset-categories/{id}Soft-delete a categoryaccounting.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

MethodDescription
straight_lineEqual monthly depreciation: (cost - salvage) / useful_life_months
declining_balanceApplied to net book value: NBV * (2 / useful_life_months)
acceleratedDeclining balance that switches to straight-line when straight-line produces a higher amount

Business Rules

  1. Three GL accounts required -- every category must map to an asset account, a depreciation expense account, and an accumulated depreciation account.
  2. Category defaults -- when a fixed asset does not specify its own depreciation method, the category's method and useful life are used.
  3. Ordered by code -- the list endpoint returns categories ordered by code.
  4. Soft delete -- deleting a category performs a soft delete.
  5. Company scoped -- all queries filter by the authenticated user's company.
  6. Active flag -- categories can be deactivated to prevent selection when creating new assets.

Moon ERP API Documentation