SalesReceiptLineItems
Manages individual line items in QuickBooks Sales Receipts, supporting creation, updates, deletion, and queries for detailed sales tracking.
Table Specific Information
SalesReceipts may be inserted, queried, or updated via the SalesReceipts or SalesReceiptLineItems tables. SalesReceipts may be deleted by using the SalesReceipts 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 only be used with the equals or = comparison. The available columns for SalesReceipts are Id, Date, TimeModified, ReferenceNumber, CustomerName, CustomerId, DepositAccount, and DepositAccountId. 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 SalesReceiptLineItems WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND ReferenceNumber LIKE '%12345%'
Insert
To add a SalesReceipt, specify the Customer column and at least one Line Item. All Line Item columns can be used for inserting multiple Line Items for a new SalesReceipt transaction. For example, the following will insert a new SalesReceipt with two Line Items:
INSERT INTO SalesReceiptLineItems#TEMP (CustomerName, ItemName, ItemQuantity) VALUES ('Cook, Brian', 'Repairs', 1) INSERT INTO SalesReceiptLineItems#TEMP (CustomerName, ItemName, ItemQuantity) VALUES ('Cook, Brian', 'Removal', 2) INSERT INTO SalesReceiptLineItems (CustomerName, ItemName, ItemQuantity) SELECT CustomerName, ItemName, ItemQuantity FROM SalesReceiptLineItems#TEMP
Columns
Name | Type | ReadOnly | References | ColumnSize | Description |
ID [KEY] | String | True | 255 |
A unique identifier for the line item, combining the sales receipt ID and line item ID for precise tracking. | |
SalesReceiptId | String | False | 255 |
The QuickBooks ID for the associated sales receipt, used to group line items under the correct transaction. | |
ReferenceNumber | String | False | 21 |
The reference number assigned to this sales receipt, helpful for identifying and organizing transactions. | |
TxnNumber | Integer | True |
A unique transaction number within QuickBooks, distinct from the ID, for additional reference. | ||
CustomerName | String | False | 1000 |
The name of the customer associated with this sales receipt, required when CustomerId is not provided. | |
CustomerId | String | False |
Customers.ID | 255 |
The QuickBooks ID of the customer linked to this sales receipt, required when CustomerName is not provided. |
Date | Date | False |
The date the transaction occurred, used for recording and reporting purposes. Setting this field can override date filters. | ||
ShipMethod | String | False | 1000 |
The shipping method chosen for the transaction, such as FedEx or UPS. | |
ShipMethodId | String | False | 255 |
The QuickBooks ID of the shipping method associated with this transaction. | |
ShipDate | Date | False |
The date when the items in this transaction are scheduled to be shipped. | ||
Memo | String | False | 5000 |
An internal note or memo related to this transaction, not visible to customers. | |
Class | String | False | 1000 |
A QuickBooks classification to categorize the transaction for tracking or reporting purposes. | |
ClassId | String | False |
Class.ID | 255 |
The QuickBooks ID of the class assigned to this transaction for categorization. |
DueDate | Date | False |
The date by which payment for the sales receipt is due, if applicable. | ||
TotalAmount | Decimal | True |
The total amount for this sales receipt, including all line items and applicable taxes. | ||
Message | String | False | 101 |
A note or message intended for the customer, often included on the printed or emailed sales receipt. | |
MessageId | String | False | 255 |
The QuickBooks ID of the customer-facing message for this transaction. | |
SalesRep | String | False | 5 |
The initials or identifier of the sales representative responsible for this transaction. | |
SalesRepId | String | False |
SalesReps.ID | 255 |
The QuickBooks ID of the sales representative associated with this transaction. |
Template | String | False | 100 |
The name of the template applied to this sales receipt for formatting purposes. | |
TemplateId | String | False |
Templates.ID | 255 |
The QuickBooks ID of the template used for this transaction. |
ExchangeRate | Double | False |
The currency exchange rate applied to this sales receipt, if it involves a foreign currency. | ||
FOB | String | False | 13 |
Indicates the shipping origin (Freight on Board) for this transaction. | |
BillingAddress | String | True |
The full billing address associated with this transaction, as recorded in QuickBooks. | ||
BillingLine1 | String | False | 500 |
The first line of the billing address. | |
BillingLine2 | String | False | 500 |
The second line of the billing address. | |
BillingLine3 | String | False | 500 |
The third line of the billing address. | |
BillingLine4 | String | False | 500 |
The fourth line of the billing address. | |
BillingLine5 | String | False | 41 |
The fifth line of the billing address. | |
BillingCity | String | False | 255 |
The city in the billing address. | |
BillingState | String | False | 255 |
The state or region in the billing address. | |
BillingPostalCode | String | False | 30 |
The postal code for the billing address. | |
BillingCountry | String | False | 255 |
The country in the billing address. | |
BillingNote | String | False | 41 |
Additional notes related to the billing address. | |
ShippingAddress | String | True |
The complete shipping address associated with this transaction, as recorded in QuickBooks. | ||
ShippingLine1 | String | False | 500 |
The first line of the shipping address. | |
ShippingLine2 | String | False | 500 |
The second line of the shipping address. | |
ShippingLine3 | String | False | 500 |
The third line of the shipping address. | |
ShippingLine4 | String | False | 500 |
The fourth line of the shipping address. | |
ShippingLine5 | String | False | 41 |
The fifth line of the shipping address. | |
ShippingCity | String | False | 255 |
The city in the shipping address. | |
ShippingState | String | False | 255 |
The state or region in the shipping address. | |
ShippingPostalCode | String | False | 30 |
The postal code for the shipping address. | |
ShippingCountry | String | False | 255 |
The country in the shipping address. | |
ShippingNote | String | False | 41 |
Additional notes related to the shipping address. | |
Subtotal | Decimal | True |
The subtotal amount for this transaction, calculated before taxes and discounts. | ||
Tax | Double | True |
The total sales tax applied to the transaction. | ||
TaxItem | String | False | 100 |
The name of the sales tax item applied to this transaction. | |
TaxItemId | String | False | 255 |
The QuickBooks ID of the sales tax item applied to this transaction. | |
TaxPercent | Double | True |
The percentage rate of sales tax applied to this transaction. | ||
IsPending | Boolean | False |
Indicates whether the transaction is pending completion or has been finalized. | ||
IsToBePrinted | Boolean | False |
Specifies if this transaction is marked for printing. | ||
IsTaxIncluded | Boolean | False |
Indicates whether tax is included in the line item amounts. Available only in specific regional editions. | ||
IsToBeEmailed | Boolean | False |
Indicates whether this transaction is marked to be emailed to the customer. Fails if no customer email is available. | ||
ItemLineId | String | True | 255 |
A unique identifier for each line item within the sales receipt. | |
ItemLineNumber | String | True | 255 |
The number representing the position of this line item within the sales receipt. | |
ItemName | String | False |
The name of the item associated with this line. | ||
ItemId | String | False |
Items.ID | 255 |
The QuickBooks ID of the item associated with this line. |
ItemGroup | String | False | 100 |
The name of the group that this item is part of, if applicable. | |
ItemGroupId | String | False |
Items.ID | 255 |
The QuickBooks ID of the group that this item is part of, if applicable. |
ItemDescription | String | False | 5000 |
A detailed description of the item in this line. | |
ItemQuantity | Double | False |
The quantity of this item or group specified in this line. | ||
ItemUnitOfMeasure | String | False | 31 |
The unit of measure for the item, selected from the item's available options. Requires QBXML Version 7.0 or later. | |
ItemRate | Double | False |
The rate charged per unit of this item. | ||
ItemRatePercent | Double | False |
The percentage rate applied to this item, if applicable. | ||
ItemTaxCode | String | False | 3 |
The tax code indicating whether the item is taxable or non-taxable. | |
ItemTaxCodeId | String | False | 255 |
The QuickBooks ID of the tax code applied to this item. | |
ItemAmount | Decimal | False |
The total amount for this line item, including quantity and rate. | ||
ItemInventorySiteName | String | False | 31 |
The name of the inventory site where this item is stored. Requires QBXML version 10.0 or later and the Advanced Inventory add-on. | |
ItemInventorySiteId | String | False | 255 |
The QuickBooks ID of the inventory site where this item is stored. | |
ItemSerialNumber | String | False | 5000 |
The serial number associated with this item. Requires QBXML version 11.0 or later and the Advanced Inventory add-on. | |
ItemLotNumber | String | False | 40 |
The lot number associated with this item. Requires QBXML version 11.0 or later and the Advanced Inventory add-on. | |
ItemExpirationDateForSerialLotNumber | String | True | 1099 |
The expiration date for the serial or lot number of this item. Supported in QuickBooks Desktop 2023 and SDK 16.0. | |
ItemClass | String | False | 1000 |
The class name categorizing this item for tracking and reporting purposes. | |
ItemClassId | String | False |
Class.ID | 255 |
The QuickBooks ID of the class associated with this item. |
ItemUOMSetFullName | String | False | 1000 |
The full name of the unit of measure set associated with this item. | |
ItemUOMSetListID | String | False | 1000 |
The QuickBooks ID of the unit of measure set associated with this item. | |
ItemIsGetPrintItemsInGroup | String | False | 1000 |
Indicates whether individual items in the group are printed on forms when true. | |
CheckNumber | String | False | 25 |
The check number associated with the payment, if applicable. | |
PaymentMethod | String | False | 100 |
The payment method used for this sales receipt. | |
PaymentMethodId | String | False | 255 |
The QuickBooks ID of the payment method used. | |
DepositAccount | String | False | 1000 |
The account where the payment from this sales receipt is deposited. | |
DepositAccountId | String | False |
Accounts.ID | 255 |
The QuickBooks ID of the deposit account. |
CustomerTaxCode | String | True | 3 |
The tax code assigned to the customer for this transaction. | |
CustomerTaxCodeId | String | True | 255 |
The QuickBooks ID of the customer’s tax code. | |
CustomFields | String | False |
Custom fields associated with this transaction, formatted as XML. | ||
EditSequence | String | True | 16 |
A versioning identifier for tracking updates to this line item. | |
TimeModified | Datetime | True |
The timestamp indicating when this sales receipt was last modified. | ||
TimeCreated | Datetime | True |
The timestamp indicating when this sales receipt was 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 |
ItemPriceLevel | String |
The price level associated with the item, if applicable. |
ItemOverrideAccount | String |
The name of the account overriding the default account for this item. Available during inserts and updates only. |
ItemOverrideAccountId | String |
The QuickBooks ID of the account overriding the default account for this item. Available during inserts and updates only. |