You will be able to start and end trips, record what was spent on an asset, a trip or a driver, charge a driver's advance when the driver paid from it, and settle what remains. Pop Dispatch records all of this and moves no money.
Before you start #
- The
dispatch_fleetlicense flag is on. Every Pop Dispatch license includes Fleet, and the trial runs for 30 days. - Amounts are whole minor units with a currency code. Without a
currency, Pop Dispatch uses your business currency. - The people (drivers) and assets you refer to exist.
Steps #
- Start a trip with
POST /fleet/trips:asset_idis required. Addperson_id,job_id,purpose,origin,destinationand the startingodometer. An asset with a trip already running returnsconflict. - End it with
POST /fleet/trips/:id/end, adding the closingodometerand, when you have it,gps_distance_m. The odometers become meter readings with sourcetrip. - Record an expense with
POST /fleet/expenses:kind,amount_centsand, as needed,asset_id,trip_id,person_id,work_order_id,vendor_id,incurred_on. - Type the
tax_centsfrom the receipt. Pop Dispatch stores the figure you give and works nothing out. It cannot be more than the amount. - Set
paid_bytocompany,driveroraccount. Adriverexpense needsperson_id. - Send
from_advance: truewhen the driver paid out of an advance. The expense is saved and anexpense_chargeentry for the same amount, as a negative, goes on that driver's advance ledger. - Fix a mistake with
POST /fleet/expenses/:id/voidand an optionalreason. The expense stays on the list marked void. - Keep the ledger with
POST /fleet/advances: sendperson_id, akindofadvance,repaymentoradjustment, andamount_cents. A repayment is stored as a reduction whatever sign you send. - Read it with
GET /fleet/advances?person_id=.... The answer holds the balance per currency, every entry, and a warning when a balance is open. - Close a balance with
POST /fleet/advances/settleandperson_id. Onesettlemententry per currency brings each balance to zero.
Expense kinds #
fuel, toll, fine, parking, repair, tyre, permit, insurance, allowance and other. Fuel comes from a fuel fill (see the fuel economy article), so an expense of kind fuel cannot be sent on its own.
What voiding does #
Voiding an expense that was charged to an advance adds an adjustment entry that returns the balance to where it was. A fuel expense mirrors a fuel fill, so correct the fill instead.
The advance ledger #
The ledger only grows. You fix an entry by adding an adjustment, never by editing. The balance is the sum of the entries. A negative balance means the driver spent more than was advanced. Settlement writes the closing entry and an advance.settled event. No payment is made, so make the payment outside Pop Dispatch.
Technical details
- Entry kinds:
advance,expense_charge,repayment,adjustment,settlement. An advance adds, and a charge or repayment reduces. - A reimbursable expense is one the driver paid.
reimbursabledefaults to true fordriverand cannot be set for the other payers. - Events:
expense.recorded,expense.voided,advance.issued,advance.settled. - A trip's
gps_distance_mis an estimate and never changes the odometer.
If something goes wrong #
feature_not_licensed(403),licence_read_only(403): writes are blocked.validation_failed(422): the tax is above the amount, the amount is negative,person_idis missing for a driver expense, the currency is unknown,from_advanceis sent without a driver payer, or an entry has the wrong sign.invalid_date(422):incurred_onorrecorded_onneeds the form YYYY-MM-DD.conflict(409): the expense is already void, mirrors a fuel fill, a trip is already running or ended, or there is no open balance to settle.not_found(404): an asset, person, trip or vendor id does not exist.