You will be able to read the full running cost of one asset for a period, see each component on its own line, and see the cost per kilometer or mile. Every component has exactly one source, so nothing is counted twice.
Before you start #
- The
dispatch_fleetlicense flag is on (Business plan, an add-on for Starter and Pro, included in the 14-day trial). - For depreciation, the asset record holds
purchase_cents,purchased_on,useful_life_monthsand, if any,residual_cents. - Meter readings exist, so the distance can be worked out.
Steps #
- Send
GET /fleet/assets/:id/tco. Addfromandtoas YYYY-MM-DD dates. Without them the period is the last year to today. - Read
components: one line per component, each with its amount in minor units. - Read
total_cents,distance_mandper_unit_x100, the cost per display unit of distance in hundredths of the minor unit. - Check
estimatedandnotesbefore you quote the figures. - Open
unsourced_expenses, the ids of expenses that need a fuel log or a work order behind them, and fix them.
The components and their one source #
| Component | Source | Dated by |
|---|---|---|
| Depreciation | The asset record, straight line from purchase cost to residual over the useful life | Each day of the period |
| Fuel | Fuel logs | Fill date |
| Maintenance | Work orders for repairs on the asset | Service date |
| Tires | The purchase cost of each tire | The date it was first fitted |
| Insurance | Cost on insurance documents | Issue date |
| Permits and fees | Cost on permit, registration, tax, emissions and inspection documents | Issue date |
| Tolls | Expenses of kind toll | Date incurred |
| Fines | Expenses of kind fine | Date incurred |
| Other costs | Expenses of kind parking, allowance and other | Date incurred |
A voided document or expense adds nothing.
Unsourced expenses #
An expense of kind fuel, repair, tyre, permit or insurance is a view of something that has its own source. When it links to a fuel log or a work order, the source is already counted. When it links to neither, Pop Dispatch lists its id in unsourced_expenses and leaves it out of the total. The note reads "{n} expenses have no fuel log or work order behind them, so they stay out of the total." Log the fuel or link the work order, and the cost enters the total through its source.
The distance #
The distance is the odometer change over the period, taken from the meter log. Trip distances are never added up for this. When a period edge falls between two readings, Pop Dispatch interpolates, sets estimated to true and adds the note "Estimated: a period edge had no meter reading." With no readings, distance_m is empty and there is no per-distance figure.
Technical details
- Depreciation uses a life in days of months multiplied by 30.4375 and rounded. Only the days of the period that fall inside the life count. No depreciation is charged when the purchase cost is at or below the residual.
- Distances are meters.
distance_displayanddistance_unitshow the asset's unit. - Amounts are integer minor units.
If something goes wrong #
not_found(404): no asset has that id.validation_failed(422):tois beforefrom.- A component shows zero: check that its source exists and that its date falls in the period.