CRMconnect Azuvio · Docs

Workflow: Asset Lifecycle

Modules involved: Assets (Groups · Locations · Allocation · Actions · Depreciation) · Staff · Clients (portal)
Used by: IT/Admin · HR · Finance · Management
Typical duration: Continuous — from acquisition to disposal/write-off

Overview

The Assets module manages the company's physical asset inventory (laptops, phones, equipment, furniture, etc.) throughout the full lifecycle: acquisition, allocation to employees, damage reporting, warranty repairs, losses, and disposal/write-off. Depreciation is calculated in real time at view — there is no scheduled job.

No approval workflow. All actions (allocation, revocation, loss, disposal) are executed immediately on POST — no pending states or manager approval.

No link to the Fleet module or to the Expenses/Purchase Orders module. The acquisition cost is stored directly on the asset record (unit_price); it does not automatically generate an expense or a purchase invoice.

Asset status is not an explicit field — it is derived from counters (total_allocation, total_lost, total_damages, etc.). The tabs in the interface filter based on these counters.


Flow diagram

[SETUP — admin, one time]
  │
  ├── Asset Groups (categories: IT, Furniture, Vehicles, etc.)
  ├── Unit Types (units of measure: piece, set, kg)
  └── Asset Locations (physical locations — admin only)
  │
  ↓
[1. ACQUISITION / ASSET CREATION]
  │
  ├── Assets → New Asset
  ├── Fields: assets_code, assets_name, amount (quantity), unit_price, date_buy
  │     warranty_period (months), depreciation (months), asset_group, asset_location
  ├── Supplier: supplier_name, supplier_address, supplier_phone
  ├── Attachments (invoices, certificates, photos)
  └── inventory_history: acction='add_new', begin=0, end=amount
  │
  ↓
[2. ADDITIONAL STOCK (optional, if additional units are purchased)]
  │
  ├── acction_2: type='additional'
  ├── amount += units added
  └── inventory_history: acction='additional'
  │
  ↓
[3. ALLOCATION TO EMPLOYEE]
  │
  ├── acction_1: type='allocation', acction_to=staffid
  ├── Fields: amount (quantity), acction_location (handover location), acction_reason
  ├── total_allocation += amount
  ├── Available stock = amount - total_allocation
  └── inventory_history: acction='allocation'
  │
  ↓
[4. IN USE — asset allocated]
  │
  ├── Tab "In Use": total_allocation > 0
  ├── Staff sees their own assets (if permissions allow)
  └── Client can see their own assets in portal (if visible_to_client=1 + belongs_to)
  │
  ↓
[5. EVENTS OVER TIME (any, in any order)]
  │
  ├── [A] BROKEN: type='broken' → total_damages += amount (quantity does NOT decrease)
  │
  ├── [B] WARRANTY/REPAIR (from damage):
  │     type='warranty' → total_warranty += amount, total_damages -= amount
  │     cost = repair cost
  │     Max = total_damages - total_warranty (net unrepaired units)
  │
  ├── [C] LOST: type='lost' → amount -= amount, total_lost += amount
  │     (permanent removal from inventory)
  │
  └── [D] REVOKE (return from employee):
        type='revoke', acction_to=staffid
        total_allocation -= amount
        System checks net allocation per staff before revocation
  │
  ↓
[6. DISPOSAL / WRITE-OFF (end-of-life)]
  │
  ├── type='liquidation'
  ├── amount -= disposed quantity, total_liquidation += quantity
  ├── cost = recovery/sale value at disposal
  └── inventory_history: acction='liquidation'
  │
  ↓
[DEPRECIATION REPORT]
  │
  ├── Assets → Reports → Depreciation
  ├── PHP real-time calculation (no depreciation table):
  │     months_elapsed = (today - date_buy) / 31 days
  │     monthly_depreciation = (unit_price × amount) / depreciation_months
  │     accumulated_depreciation = months_elapsed × monthly_depreciation
  │     residual_value = (unit_price × amount) - accumulated_depreciation
  └── Filterable by asset group or individual asset

[ASSET DISPOSED ✓ · INVENTORY UPDATED ✓]

Step by step

1. Initial configuration

1a. Asset Groups

Where: /admin/assets → Settings → Asset Group → Add Group

Asset categories (e.g.: "IT Equipment", "Furniture", "Vehicles"). At least one group is required.

1b. Unit Types

Where: /admin/assets → Settings → Unit Types

Units of measure for quantity (e.g.: "Piece", "Set", "Kg"). Custom units can be added with unit_code, unit_name, unit_symbol.

1c. Asset Locations

Where: /admin/assets → Settings → Asset Locations (admin onlyis_admin())

Physical locations of assets (e.g.: "Bucharest Office", "Warehouse", "Cluj Headquarters"). Accessible exclusively to admins.


2. Create an asset

Where: /admin/assets → New Asset

Required fields:

Field Description
assets_code Unique code (AJAX-verified in real time)
assets_name Asset name
amount Total quantity
unit FK → tblware_unit_type
asset_group FK → tblassets_group
asset_location FK → tblasset_location

Financial fields:

Field Description
unit_price Price per unit (DECIMAL 15,2)
date_buy Acquisition date
warranty_period Warranty period in months
depreciation Useful life in months (for depreciation calculation)

Supplier fields: supplier_name, supplier_address, supplier_phone — stored inline, without a link to the Purchase/Vendors module.

Client portal:

  • visible_to_client = 1 — asset appears in the client portal
  • belongs_to — client IDs that can see the asset (CSV)
  • Contact must have the asset permission (permission_id = 7)

3. Asset actions (tabs in interface)

3a. Allocation

Where: asset record → Allocation button

Field Description
acction_to Employee receiving the asset
amount Allocated quantity (max = available stock)
acction_location Handover location
acction_reason Reason for allocation

Available stock after allocation = amount - total_allocation.

3b. Revoke

Where: asset record → Revoke button

System checks AJAX for the net allocated quantity for the selected staffid. You cannot revoke more than the employee has allocated.

3c. Broken

Where: asset record → Broken button

Marks units as damaged. Total quantity does NOT decrease — damaged units remain in inventory until repaired or disposed.

total_damages += amount → asset appears in the "Broken" tab.

3d. Warranty/Repair

Where: asset record → Warranty button

Converts damaged units → repaired.

Field Description
amount Repaired units (max = total_damages - total_warranty)
cost Repair cost (stored in acction_2, not in Expenses)

total_warranty += amount, total_damages -= amount.

3e. Lost

Where: asset record → Lost button

Permanent removal from inventory. amount -= amount, total_lost += amount.

3f. Disposal / Write-off (Liquidation)

Where: asset record → Liquidation button

Field Description
amount Disposed units
cost Recovery/sale value at disposal

amount -= amount, total_liquidation += amount.

3g. Add stock (Additional)

Where: asset record → Additional button

Increases inventory with new units (e.g.: additional purchase of the same type). amount += amount, cost = unit_price × added_amount.


4. Filter tabs (derived from counters)

Tab Condition
All Assets no filter
Not Pending total_allocation = 0
In Use total_allocation > 0
Liquidation total_liquidation > 0
Warranty total_warranty > 0
Lost total_lost > 0
Broken total_damages > 0

5. Depreciation report

Where: /admin/assets/depreciation

Filterable by group and by individual asset. Real-time calculation:

months_elapsed        = (today - date_buy) / (60×60×24×31)
monthly_depreciation  = (unit_price × amount) / depreciation
total_depreciation    = months_elapsed × monthly_depreciation
residual_value        = (unit_price × amount) - total_depreciation

No automatic accounting entries are generated — the report is informational.


Required permissions

Permission Access
assets → view View lists, details, reports
assets → create Create new asset
assets → edit All lifecycle actions (allocation, revoke, broken, warranty, lost, liquidation, additional)
assets → delete Delete asset + delete attached file
Asset Locations settings is_admin() exclusively

Gotchas

Problem Cause Solution
Cannot allocate — amount field is 0 Available stock = amount - total_allocation = 0 Add new stock (Additional) or revoke from another employee
"Warranty" repair does not appear total_damages = 0 or total_damages <= total_warranty First report units as Broken
Disposal (Liquidation) reduces quantity Correct behavior — Liquidation permanently decreases amount Use Broken (not Liquidation) if you intend to repair
Depreciation shows negative depreciation = 0 or amount = 0 on record Set depreciation (months) at creation
Asset not appearing in client portal visible_to_client = 0 or client not in belongs_to Set both fields on the asset record
Cannot delete location Location is used on existing assets Reassign assets to another location first

Module references

  • Fleet Management — vehicles (separate module, no link to Assets)
  • Expenses — expenses (not generated automatically from Assets)
  • HR — Staff — employees to whom assets are allocated
Tip

Schedule preventive maintenance from the asset record before equipment failures occur — proactive maintenance costs less than emergency repairs and prevents operational downtime that affects the teams depending on the asset.

Note

Mark retired assets as Inactive rather than deleting them. Deletion removes them from depreciation history, audit trails, and maintenance records. Deactivation preserves all historical data while removing the asset from active lists.