ItemReceipts
Handles QuickBooks Item Receipts, supporting creation, updates, deletion, and queries for tracking goods received.
Table Specific Information
ItemReceipts may be inserted, queried, or updated via the ItemReceipts, ItemReceiptExpenseItems or ItemReceiptLineItems tables. ItemReceipts may be deleted by using the ItemReceipts 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 only be used with the equals or = comparison. The available columns for ItemReceipts are Id, Date, ReferenceNumber, VendorName, VendorId, Payee, PayeeId, Account, AccountId, and TimeModified. TimeModified and Date may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range. VendorName and ReferenceNumber may be used with the = or LIKE conditions to establish a starts-with, ends-with, or contains syntax. For example:
SELECT * FROM ItemReceipts WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND VendorName LIKE '%Patton Hardware Supplies%' AND ReferenceNumber LIKE '12345%'
Insert
To add an ItemReceipt, specify the 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 Item or Expense Item data. The columns that may be used in these aggregates are defined in the ItemReceiptLineItems and ItemReceiptExpenseItems tables and it starts with Item. For example, the following will insert a new ItemReceipt with two Line Items:
INSERT INTO ItemReceipts (VendorName, Date, ItemAggregate) VALUES ('Patton Hardware Supplies', '1/1/2011', '<ItemReceiptLineItems> <Row><ItemName>Repairs</ItemName><ItemQuantity>1</ItemQuantity></Row> <Row><ItemName>Removal</ItemName><ItemQuantity>2</ItemQuantity></Row> </ItemReceiptLineItems>')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 item receipt. | |
VendorName | String | False | 1000 |
The name of the vendor associated with the item receipt. Either VendorName or VendorId must be provided when inserting a new item receipt. | |
VendorId | String | False |
Vendors.ID | 255 |
The unique identifier of the vendor associated with the item receipt. Either VendorName or VendorId must be provided when inserting a new item receipt. |
Date | Date | False |
The date when the item receipt transaction was created or recorded. | ||
ReferenceNumber | String | False | 21 |
A reference number assigned to the item receipt transaction for identification purposes. | |
AccountsPayable | String | False |
Accounts.ID | 1000 |
The name of the accounts payable account associated with the item receipt. |
AccountsPayableId | String | False | 255 |
The unique identifier of the accounts payable account associated with the item receipt. | |
Memo | String | False | 5000 |
An optional memo or note describing the item receipt transaction. | |
Amount | Decimal | True |
The total monetary value of the item receipt. | ||
TxnNumber | Integer | True |
A unique transaction number assigned to distinguish this transaction from others, apart from the Quickbooks generated ID. | ||
ExchangeRate | Double | False |
The exchange rate used to convert the transaction's currency into the home currency of the QuickBooks file. Requires QBXML Version 8.0 or higher. | ||
IsTaxIncluded | Boolean | False |
Specifies whether the transaction amount includes tax. This field is available only in international editions of QuickBooks. | ||
ItemCount | Integer | True |
The number of item entries in the item receipt. | ||
ItemAggregate | String | False | 5000 |
An aggregate of all line item data, allowing the addition of an item receipt along with its line items. | |
ExpenseItemCount | Integer | True |
The number of expense line items in the item receipt. | ||
ExpenseItemAggregate | String | False | 5000 |
An aggregate of all expense line item data, allowing the addition of an item receipt along with its expense items. | |
TransactionCount | Integer | True |
The number of linked transactions associated with the item receipt. | ||
TransactionAggregate | String | True | 5000 |
An aggregate of data for all linked transactions associated with the item receipt. | |
CustomFields | String | False |
Any custom fields associated with this item receipt, formatted as XML. | ||
EditSequence | String | True | 16 |
An identifier used for version control of this object in QuickBooks. | |
TimeModified | Datetime | True |
The date and time when the item receipt was last updated. | ||
TimeCreated | Datetime | True |
The date and time when the item receipt was initially created. |
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 fields that can be used in insertions. |
Expense* | String |
Represents all expense-item-specific fields that can be used in insertions. |
LinkToTxnId | String |
The identifier of a transaction (such as a purchase order) to link this item receipt to. This is only available for inserts. |