ODBC Driver for QuickBooks

Build 24.0.9175

Bills

Handles the management of QuickBooks Bills, including creating, updating, deleting, and querying data for expense tracking.

Table Specific Information

Bills may be inserted, queried, or updated via the Bills, BillExpenseItems, or BillLineItems tables. Bills may be deleted by using the Bills table.

This table has a Custom Fields column. See the Custom Fields page for more information.

Select

By default, SupportEnhancedSQL is set to true, and the following will be honored if present. Other filters will be executed client side. If SupportEnhancedSQL is set to false, only the following filters will be honored.

QuickBooks allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns can typically be used with only the equals or = comparison. The available columns for Bills are Id, Date, ReferenceNumber, VendorName, VendorId, AccountsPayable, AccountsPayableId, IsPaid, and TimeModified. TimeModified and Date may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range. ReferenceNumber may be used with the = or LIKE conditions to establish a starts-with, ends-with, or contains syntax. For example:

SELECT * FROM Bills WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND ReferenceNumber LIKE '%12345%'

Insert

You can also use BillLineItems and BillExpenseItems to insert a bill.

To add a Bill, specify a Vendor, Date, and at least one Expense or Line Item. The ItemAggregate and ExpenseAggregate columns may be used to specify an XML aggregate of Line or Expense Item data. The columns that may be used in these aggregates are defined in the BillLineItems and BillExpenseItems tables and it starts with Item and Expense. For example, the following will insert a new Bill with two Line Items:

INSERT INTO Bills (VendorName, Date, ItemAggregate) 
VALUES ('Cal Telephone', '1/1/2011', 
'<BillLineItems>
<Row><ItemName>Repairs</ItemName><ItemQuantity>1</ItemQuantity></Row>
<Row><ItemName>Removal</ItemName><ItemQuantity>2</ItemQuantity></Row>
</BillLineItems>')
To insert subitems, set the ItemName field to the FullName of the item; for example, '<Row><ItemName>Subs:Carpet</ItemName><ItemQuantity>0</ItemQuantity></Row>'

Columns

Name Type ReadOnly References ColumnSize Description
ID [KEY] String True 255

The unique identifier for the bill in QuickBooks.

VendorName String False 1000

The name of the vendor associated with this bill. Either VendorName or VendorId must be provided when inserting.

VendorId String False

Vendors.ID

255

The unique identifier for the vendor associated with this bill. Either VendorName or VendorId must be provided when inserting.

ReferenceNumber String False 21

A reference number for the bill transaction, used for identification and tracking.

Date Date False

The date of the transaction. If specified in the WHERE clause of a SELECT query, it overrides the pseudo columns StartDate and EndDate.

Amount Decimal True

The total amount of the bill. This value is calculated by QuickBooks based on the line items or expense line items.

TxnNumber Integer True

A manually assigned transaction number to identify this bill separately from the Quickbooks generated ID.

DueDate Date False

The date when payment for this bill is due.

Terms String False 100

The payment terms associated with this bill, such as Net30 or COD.

TermsId String False 255

The unique identifier for the payment terms associated with this bill.

AccountsPayable String False 1000

The name of the accounts payable account associated with this bill.

AccountsPayableId String False

Accounts.ID

255

The unique identifier for the accounts payable account associated with this bill.

Memo String False 5000

A memo or note providing additional details about this bill.

IsPaid Boolean True

Indicates whether this bill has been paid. Returns true if paid, otherwise false.

ExchangeRate Double False

The exchange rate used to convert this bill's currency to the home currency of the QuickBooks company file.

IsTaxIncluded Boolean False

Specifies whether tax is included in the transaction amount. This field is available only in international editions of QuickBooks.

ItemCount Integer True

The total number of line items associated with this bill.

ItemAggregate String False 5000

An aggregate of the line item data, used to add a bill and its line item data in a single operation.

ExpenseItemCount Integer True

The total number of expense line items associated with this bill.

ExpenseItemAggregate String False 5000

An aggregate of the expense line item data, used to add a bill and its expense line item data in a single operation.

TransactionCount Integer True

The total number of related transactions linked to this bill.

TransactionAggregate String True 5000

An aggregate of the linked transaction data associated with this bill.

CurrencyName String False 64

The name of the currency used for this bill.

CurrencyId String False

Currency.ID

1000

The unique identifier for the currency used for this bill.

CustomFields String False

Custom fields returned from QuickBooks, formatted as XML.

TimeModified Datetime True

The timestamp of the last modification made to this bill.

TimeCreated Datetime True

The timestamp of when this bill was originally created.

OpenAmount Decimal True

The current outstanding balance for the vendor associated with this bill.

Pseudo-Columns

Pseudo Column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Item* String

Represents all line-item-specific columns that can be used during insertion to specify line item details for this bill.

Expense* String

Represents all expense-item-specific columns that can be used during insertion to specify expense item details for this bill.

LinkToTxnId String

The unique identifier of a transaction, such as a purchase order, to link this bill to. This transaction must be open, and linking requires a minimum QBXML Version 4.0.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9175