SalesReceipts
Handles QuickBooks Sales Receipts, supporting creation, updates, deletion, and queries for tracking point-of-sale transactions.
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 SalesReceipts WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND ReferenceNumber LIKE '%12345%'
Insert
To add a SalesReceipt, specify the Customer and at least one Line Item. The ItemAggregate columns may be used to specify an XML aggregate of Line Item data. The columns that may be used in these aggregates are defined in the SalesReceiptLineItems table and it starts with Item. For example, the following will insert a new SalesReceipt with two Line Items:
INSERT INTO SalesReceipts (CustomerName, ItemAggregate) VALUES ('Cook, Brian', '<SalesReceiptLineItems> <Row><ItemName>Repairs</ItemName><ItemQuantity>1</ItemQuantity></Row> <Row><ItemName>Removal</ItemName><ItemQuantity>2</ItemQuantity></Row> </SalesReceiptLineItems>')
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 |
A unique identifier for the sales receipt, essential for tracking and referencing transactions in QuickBooks. | |
ReferenceNumber | String | False | 21 |
The reference number assigned to the sales receipt, often used for external or internal tracking. | |
TxnNumber | Integer | True |
The transaction number uniquely identifying this sales receipt within QuickBooks, separate from the ID. | ||
CustomerName | String | False | 1000 |
The full name of the customer associated with this sales receipt. Required if CustomerId is not provided. | |
CustomerId | String | False |
Customers.ID | 255 |
The unique QuickBooks identifier for the customer associated with this sales receipt. Required if CustomerName is not provided. |
Date | Date | False |
The date of the transaction, determining when the sales receipt was recorded. If queried, can override other date filters. | ||
ShipMethod | String | False | 1000 |
The method of shipment for this transaction, such as FedEx or USPS. | |
ShipMethodId | String | False | 255 |
The QuickBooks identifier for the shipping method associated with this transaction. | |
ShipDate | Date | False |
The date on which the items in this sales receipt are scheduled for shipment. | ||
Memo | String | False | 5000 |
A freeform text field for notes or comments about this sales receipt, visible in internal records. | |
Class | String | False | 1000 |
A reference to the class categorizing this transaction for tracking or reporting purposes. | |
ClassId | String | False |
Class.ID | 255 |
The QuickBooks identifier for the class associated with this transaction. |
DueDate | Date | False |
The date by which payment for this transaction is expected or due. | ||
TotalAmount | Decimal | True |
The total monetary value of this transaction, including items and applicable taxes. | ||
Message | String | False | 101 |
A message or note intended for the customer, often included on printed receipts. | |
MessageId | String | False | 255 |
The QuickBooks identifier for the customer-facing message associated with this transaction. | |
SalesRep | String | False | 5 |
The initials or identifier of the sales representative associated with this transaction. | |
SalesRepId | String | False |
SalesReps.ID | 255 |
The QuickBooks identifier for the sales representative linked to this transaction. |
Template | String | False | 100 |
The name of a QuickBooks template applied to format this transaction. | |
TemplateId | String | False |
Templates.ID | 255 |
The QuickBooks identifier for the template applied to this transaction. |
ExchangeRate | Double | False |
The exchange rate between the transaction's currency and the company's home currency at the time of the transaction. | ||
FOB | String | False | 13 |
Indicates the origin point (Freight on Board) for the shipment, often used for shipping agreements. | |
BillingAddress | String | True |
The complete billing address associated with this transaction. | ||
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 full shipping address for this transaction. | ||
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 gross total of all line items before taxes or discounts are applied. | ||
Tax | Double | True |
The total sales tax applied to the transaction. | ||
TaxItem | String | False | 100 |
The specific tax item used to calculate the sales tax for this transaction. | |
TaxItemId | String | False | 255 |
The QuickBooks identifier for the tax item used. | |
TaxPercent | Double | True |
The percentage rate applied for sales tax on this transaction. | ||
IsPending | Boolean | False |
Indicates whether the transaction is still pending or has been completed. | ||
IsToBePrinted | Boolean | False |
Specifies if this transaction should be printed. | ||
IsTaxIncluded | Boolean | False |
Indicates if tax is already included in the transaction amount. Available only in UK and CA editions. | ||
IsToBeEmailed | Boolean | False |
Indicates if this transaction is set to be emailed. Fails if no email address is provided for the customer. | ||
ItemCount | Integer | True |
The number of line items included in this transaction. | ||
ItemAggregate | String | False | 5000 |
A consolidated representation of all line item details, used when inserting sales receipts with items. | |
CheckNumber | String | False | 25 |
The check number associated with this payment, if applicable. | |
PaymentMethod | String | False | 100 |
The method of payment used, such as cash, check, or credit card. | |
PaymentMethodId | String | False | 255 |
The QuickBooks identifier for the payment method. | |
DepositAccount | String | False | 1000 |
The name of the account where this payment is deposited. | |
DepositAccountId | String | False |
Accounts.ID | 255 |
The QuickBooks identifier for the deposit account. |
CustomerTaxCode | String | True | 3 |
The tax code assigned to the customer for this transaction. | |
CustomerTaxCodeId | String | True | 255 |
The QuickBooks identifier for the customer's tax code. | |
CustomFields | String | False |
Custom fields associated with this transaction, formatted as XML. | ||
EditSequence | String | True | 16 |
A versioning identifier that updates with each modification to ensure data integrity. | |
TimeModified | Datetime | True |
The timestamp for when this sales receipt was last updated. | ||
TimeCreated | Datetime | True |
The timestamp for when this sales 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 |
Includes all item-specific columns for use during transaction insertion or updates. |