VehicleMileage
Manages QuickBooks Vehicle Mileage, supporting creation, updates, deletion, and queries for mileage tracking. Requires QBXML Version 6.0 or higher.
Table Specific Information
Select
The following filters support server-side execution. Other filters are executed client-side.
QuickBooks allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns can only be used with the equals or = comparison. The available columns for the VehicleMileage table are Id, Name, and TimeModified. TimeModified may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range. Name may be used with the = or LIKE conditions to establish a starts-with, ends-with, or contains syntax. For example:
SELECT * FROM VehicleMileage WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND Name LIKE '%12345%'
Insert
To insert a VehicleMileage entry, specify an existing VehicleRef and either TotalMiles or both OdometerStart and OdometerEnd.Columns
| Name | Type | ReadOnly | References | ColumnSize | Description |
| ID [KEY] | String | True | 255 |
The unique identifier assigned to the vehicle mileage transaction. | |
| VehicleRef_FullName | String | False | 100 |
The full name of the vehicle used in the mileage transaction. Each vehicle name must be unique within QuickBooks. | |
| VehicleRef_ListID | String | False | 255 |
The unique identifier for the referenced vehicle used in the mileage transaction. | |
| CustomerRef_FullName | String | False | 1000 |
The full name of the customer associated with the vehicle mileage transaction. Specify only CustomerRef_FullName or CustomerRef_ListID when inserting or updating records. | |
| CustomerRef_ListID | String | False |
Customers.ID | 255 |
The unique identifier of the customer associated with the vehicle mileage transaction. Specify only CustomerRef_FullName or CustomerRef_ListID when inserting or updating records. |
| ItemRef_FullName | String | False |
The full name of the item (service or other charge) associated with the mileage transaction. Specify only ItemRef_FullName or ItemRef_ListID when inserting or updating records. | ||
| ItemRef_ListID | String | False |
Items.ID | 255 |
The unique identifier of the item (service or other charge) associated with the mileage transaction. Specify only ItemRef_FullName or ItemRef_ListID when inserting or updating records. |
| ClassRef_FullName | String | False | 1000 |
The full name of the class associated with the vehicle mileage transaction. Specify only ClassRef_FullName or ClassRef_ListID when inserting or updating records. | |
| ClassRef_ListID | String | False |
Class.ID | 255 |
The unique identifier of the class associated with the vehicle mileage transaction. Specify only ClassRef_FullName or ClassRef_ListID when inserting or updating records. |
| TripStartDate | String | False |
The start date of the trip. If left blank during insertion, QuickBooks uses the current date at the time of the transaction. | ||
| TripEndDate | String | False |
The end date of the trip. If left blank during insertion, QuickBooks uses the current date at the time of the transaction. | ||
| OdometerStart | Integer | False |
The odometer reading at the start of the trip. If TotalMiles is specified, OdometerStart and OdometerEnd cannot be provided. | ||
| OdometerEnd | Integer | False |
The odometer reading at the end of the trip. If TotalMiles is specified, OdometerStart and OdometerEnd cannot be provided. | ||
| TotalMiles | Double | False |
The total miles traveled during the trip. If specified, OdometerStart and OdometerEnd cannot be provided. | ||
| Notes | String | False | 5000 |
Additional notes or comments about the trip or mileage transaction. | |
| BillableStatus | String | False | 13 |
Indicates the billing status of the vehicle mileage. Options include Billable, NotBillable, or HasBeenBilled. The allowed values are Billable, NotBillable, HasBeenBilled. | |
| StandardMileageRate | Double | False |
The standard mileage rate allowed by the tax authority for calculating vehicle expenses at the time of the transaction. | ||
| StandardMileageTotalAmount | Double | False |
The total amount calculated by multiplying the total trip miles by the standard mileage rate in effect. | ||
| BillableRate | Double | False |
The rate used to bill the mileage to a customer in a billable mileage transaction. This rate is typically defined in the associated service or other charge item referenced in the ItemRef columns. | ||
| BillableAmount | Decimal | False |
The total billable amount calculated by multiplying the total trip miles by the billable rate specified in the item referenced in the ItemRef columns. | ||
| EditSequence | String | True | 16 |
A unique string used to track revisions to this vehicle mileage transaction, ensuring it reflects the most current version. | |
| TimeCreated | Datetime | True |
The date and time when this vehicle mileage transaction was created, formatted as YYYY-MM-DD HH:MM:SS. | ||
| TimeModified | Datetime | True |
The date and time when this vehicle mileage transaction was last modified, formatted as YYYY-MM-DD HH:MM:SS. |