Add a mileage claim
mileage_addRecord a business trip as an expense, priced as distance x rate. Give exactly one of km or miles. Returns the saved id with the rate used, where that rate came from and the money, in the rate's own currency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| km | No | Distance in kilometres. Give exactly one of km or miles | |
| date | No | ISO date, default today | |
| miles | No | Distance in miles. Give exactly one of km or miles | |
| region | No | Which built-in table rate to use: PL 1.15 PLN/km, UK 0.45 GBP/mile, US 0.70 USD/mile, EU 0.30 EUR/km. Default US for miles, EU for km. Each is one flat approximate rate per region with no effective dates, no vehicle or engine class and no first-10000-mile band, so it is NOT a tax calculation | |
| project | No | Bill the trip to a client or project - use the same name you use in time-tracker and expense_add. Without it the drive is invisible to expense_summary by project and to expense_to_invoice | |
| purpose | Yes | Why the trip was made, e.g. client meeting in Krakow | |
| billable | No | Whether the trip is rebilled to the client. Default true, so a mileage claim reaches expense_to_invoice unless you pass false | |
| currency | No | Currency for your own rate. Only accepted together with rate_per_km; a table rate keeps the table currency | |
| rate_per_km | No | Your own rate per supplied unit, overriding the table. Pass it whenever you need your exact scheme rather than the approximate table rate |