Free trial
Colour

A driver leaves with an open advance

Check what a leaving driver still holds, record repayments or adjustments, and settle the balance in the ledger.

For
OwnerFleet managerAccountant
Hosting
Any hosting
Devices
All devices
Business
Fleet

Checked against Pop Dispatch 0.1.0

Situation #

A driver is leaving and the advance ledger shows a balance: money given to them that has not been accounted for. The Fleet screens arrive with the web console, so the steps use the API.

What keeps working #

  • Reading the ledger and every other Fleet record.
  • Expenses the driver already paid, and the rest of the team's advances.
  • Nothing in Pop Dispatch pays or collects money. The ledger records what happened. You move money in your own banking or payroll.

Steps in order #

  1. Call GET /fleet/advances?person_id={id}. The answer holds balances per currency, needs_settlement (true while any balance is open), warnings with a line such as "Ravi still holds an open advance of 150.00 EUR. Settle it before they leave.", and every entries row, newest first.
  2. Read the entries. Each has a kind: advance, expense_charge, repayment, adjustment or settlement. Expense receipts the driver brought back are charged to the advance when the expense is recorded as paid by the driver.
  3. Record what came back with POST /fleet/advances and {"person_id": 7, "kind": "repayment", "amount_cents": 4000}. A repayment always reduces the balance.
  4. Fix a wrong entry with kind: "adjustment" and a signed amount_cents (negative reduces the balance). Entries are never edited or deleted, so an adjustment is the correction.
  5. Use currency when the amount is in a currency other than the tenant's. Each currency has its own balance.
  6. Settle with POST /fleet/advances/settle and {"person_id": 7}. One settlement entry per currency brings each balance to zero. The answer lists what was settled.

How to confirm it worked #

  • GET /fleet/advances?person_id={id} shows needs_settlement: false, empty balances and no warning.
  • The ledger has a settlement entry dated today.
  • An advance.settled event is queued for your webhooks and connectors with the person, the date and the settled amounts. See "Fleet API and events".

What to do afterwards #

  • Settling brings the ledger to zero. It does not collect the balance, so take any shortfall from final pay or invoice it in your own books.
  • Keep the person's record for your files. Export the ledger with GET /fleet/export/advances.
  • Send the advance.settled event to your accounting connector if you use one.
Technical details
  • Amounts are integer minor units (amount_cents) with a currency code.
  • Settling when there is no open balance returns conflict (409): "There is no open balance to settle."
  • Needs the dispatch_fleet licence flag for writes. Reads stay open when the licence is read-only.