SalesReceipts
Represents sales receipts at the header level, recording point-of-sale transactions where payment is received immediately.
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.
Select
All filterable columns support the following operators:
- =
- !=
- >=
- <=
- >
- <
- IN
- LIKE
- CONTAINS
The driver processes other filters client-side within the driver.
Insert
To add a SalesReceipt, specify the Customer, TotalAmt, and at least one Line Item. The LineAggregate column may be used to specify an XML aggregate of Line Item data. Each _ denotes hierarchy. Use <Line> at the base level. The contents of LineAggregate will be sent to the API as is. All values for each field in the aggregate should adhere to the API's specifications (e.g. for dates in format yyyy-MM-dd, for date times in format yyyy-MM-dd'T'HH:mm:sszzz). The columns that may be used in the aggregates begin with the prefix 'Line_' to indicate they are part of the line item. Use the Line_ column along with the DocNumber to indicate which lines go with which SalesReceipts. For example:
INSERT INTO SalesReceipts (CustomerRef, TotalAmt, LineAggregate)
VALUES ('21', '0.03', '
<Line><Amount>0.01</Amount><DetailType>SalesItemLineDetail</DetailType><SalesItemLineDetail><ItemRef>2</ItemRef></SalesItemLineDetail></Line>
<Line><Amount>0.02</Amount><DetailType>SalesItemLineDetail</DetailType><SalesItemLineDetail><ItemRef>3</ItemRef></SalesItemLineDetail></Line>
')
Columns
| Name | Type | ReadOnly | References | Filterable | Sortable | Description |
| Id [KEY] | String | True | True | True |
The unique identifier (Id) that is assigned by QuickBooks Online to this sales-receipt transaction. It is used to retrieve or reference the sales receipt programmatically and is required for updates or deletions. | |
| SyncToken | String | True | False | False |
The version control token for this sales-receipt transaction that is used to prevent conflicting updates. QuickBooks Online increments this token each time the transaction is modified, and only the latest token is accepted for edits. | |
| MetaData_CreateTime | Datetime | True | True | True |
The date and time stamp (Coordinated Universal Time) when QuickBooks Online created this sales-receipt transaction. | |
| MetaData_LastUpdatedTime | Datetime | True | True | True |
The date and time stamp (Coordinated Universal Time) when this sales-receipt transaction was last modified in QuickBooks Online. | |
| CustomFieldAggregate | String | False | False | False |
An XML aggregate that is serialized into a single string containing all custom fields that are associated with this sales-receipt transaction. This collection can include multiple CustomField elements with Name, Type, StringValue, and other sub-elements. | |
| DocNumber | String | False | True | True |
The reference number that is assigned to the sales-receipt transaction. If no number is provided, QuickBooks Online assigns the next number in sequence according to the company's numbering preferences. | |
| TxnDate | Date | False | True | True |
The posting date that is entered by the user when this sales-receipt transaction occurred. This date determines the accounting period and may differ from the creation date. | |
| DepartmentRef | String | False |
Departments.Id | False | False |
The unique Id of the department that is linked to this sales-receipt transaction when location tracking is enabled in QuickBooks Online. |
| DepartmentRef_Name | String | True |
Departments.Name | False | False |
The display name of the department that is linked to this sales-receipt transaction when location tracking is enabled in QuickBooks Online. |
| PrivateNote | String | False | False | False |
An internal note recorded on this sales-receipt transaction that is intended for internal use and does not appear on customer-facing forms by default. | |
| LinkedTxnAggregate | String | False | False | False |
An XML aggregate that is serialized into a single string representing all transactions that are linked to this sales-receipt transaction. Each LinkedTxn element typically includes the Id, Type, and an optional sequence number of the related transaction such as an Invoice or Payment. | |
| LineAggregate | String | False | False | False |
An XML aggregate that is serialized into a single string representing all line items that are associated with this sales-receipt transaction. Each line element typically includes Line/Id, Line/LineNum, Line/Amount, Line/DetailType, and Line/Description, as well as nested detail elements such as SalesItemLineDetail or GroupLineDetail. | |
| TxnTaxDetail_TxnTaxCodeRef | String | False |
TaxCodes.Id | False | False |
The unique Id of the overall tax code that is applied to the sales-receipt transaction. |
| TxnTaxDetail_TotalTax | String | False | False | False |
The total tax amount that QuickBooks Online calculates for the sales-receipt transaction, excluding any tax lines that are manually inserted into the transaction line list. | |
| TxnTaxDetail_TaxLineAggregate | String | False | False | False |
An XML aggregate that is serialized into a single string representing all tax line items that QuickBooks Online calculates or applies to this sales-receipt transaction. | |
| CustomerRef | String | False |
Customers.Id | True | False |
The unique Id of the customer that is linked to this sales-receipt transaction. |
| CustomerRef_Name | String | True |
Customers.DisplayName | False | False |
The display name of the customer that is linked to this sales-receipt transaction. |
| CustomerMemo | String | False | False | False |
The message that is entered for the customer and that appears on the sales receipt and in the printed or emailed copy. | |
| BillAddr_Id | String | False | False | False |
The unique Id of the billing address entity that is assigned by QuickBooks Online and that is used when modifying the address. | |
| BillAddr_Line1 | String | False | False | False |
The first line of the billing address that is entered for the customer. | |
| BillAddr_Line2 | String | False | False | False |
The second line of the billing address that is entered for the customer. | |
| BillAddr_Line3 | String | False | False | False |
The third line of the billing address that is entered for the customer. | |
| BillAddr_Line4 | String | False | False | False |
The fourth line of the billing address that is entered for the customer. | |
| BillAddr_Line5 | String | False | False | False |
The fifth line of the billing address that is entered for the customer. | |
| BillAddr_City | String | False | False | False |
The city name that is entered for the billing address. | |
| BillAddr_Country | String | False | False | False |
The country name that is entered for the billing address. | |
| BillAddr_CountrySubDivisionCode | String | False | False | False |
The region within the country for the billing address. For example, this value is the state name for the USA and the province name for Canada. | |
| BillAddr_PostalCode | String | False | False | False |
The postal code that is entered for the billing address. For example, this value is the ZIP code for the USA and the postal code for Canada. | |
| BillAddr_Lat | String | False | False | False |
The latitude coordinate that is associated with the geocoded billing address when location data is available. | |
| BillAddr_Long | String | False | False | False |
The longitude coordinate that is associated with the geocoded billing address when location data is available. | |
| ShipAddr_Id | String | False | False | False |
The unique Id of the shipping address entity that is assigned by QuickBooks Online and that is used when modifying the address. | |
| ShipAddr_Line1 | String | False | False | False |
The first line of the shipping address that is entered for the customer. | |
| ShipAddr_Line2 | String | False | False | False |
The second line of the shipping address that is entered for the customer. | |
| ShipAddr_Line3 | String | False | False | False |
The third line of the shipping address that is entered for the customer. | |
| ShipAddr_Line4 | String | False | False | False |
The fourth line of the shipping address that is entered for the customer. | |
| ShipAddr_Line5 | String | False | False | False |
The fifth line of the shipping address that is entered for the customer. | |
| ShipAddr_City | String | False | False | False |
The city name that is entered for the shipping address. | |
| ShipAddr_Country | String | False | False | False |
The country name that is entered for the shipping address. | |
| ShipAddr_CountrySubDivisionCode | String | False | False | False |
The region within the country for the shipping address. For example, this value is the state name for the USA and the province name for Canada. | |
| ShipAddr_PostalCode | String | False | False | False |
The postal code that is entered for the shipping address. For example, this value is the ZIP code for the USA and the postal code for Canada. | |
| ShipAddr_Lat | String | False | False | False |
The latitude coordinate that is associated with the geocoded shipping address when location data is available. | |
| ShipAddr_Long | String | False | False | False |
The longitude coordinate that is associated with the geocoded shipping address when location data is available. | |
| ClassRef | String | False |
Class.Id | False | False |
The unique Id of the class that is associated with this sales-receipt transaction for class tracking and reporting. |
| ClassRef_Name | String | True |
Class.FullyQualifiedName | False | False |
The display name of the class that is associated with this sales-receipt transaction. |
| ShipMethodRef | String | False | False | False |
The unique Id of the shipping method that is associated with this sales-receipt transaction. | |
| ShipMethodRef_Name | String | True | False | False |
The display name of the shipping method that is associated with this sales-receipt transaction. | |
| ShipDate | Date | False | False | False |
The date that is entered for the delivery of goods or services associated with this sales-receipt transaction. | |
| TrackingNum | String | False | False | False |
The tracking number for the shipping provider that is entered for the delivery of goods associated with this sales-receipt transaction. | |
| TotalAmt | Decimal | False | True | False |
The total amount of the sales-receipt transaction. This amount includes the total of all charges, allowances, and taxes applied within the transaction. By default, this is recalculated and overridden based on the total of the sub-items. This field is calculated by QuickBooks Online business logic and cannot be written to QuickBooks Online. | |
| PrintStatus | String | False | False | False |
The print status of the sales-receipt transaction (for example, NotSet, NeedToPrint, PrintComplete). The allowed values are NotSet, NeedToPrint, PrintComplete. The default value is NotSet. | |
| EmailStatus | String | False | False | False |
The email status of the sales-receipt transaction (for example, NotSet, NeedToSend, EmailSent). The allowed values are NotSet, NeedToSend, EmailSent. The default value is NotSet. | |
| BillEmail_Address | String | False | False | False |
The email address where the sales receipt is sent. | |
| Balance | Decimal | True | True | True |
The balance that reflects any payments that have been made against this sales-receipt transaction. | |
| PaymentRefNum | String | False | False | False |
The reference number that is provided for the payment on this sales-receipt transaction. | |
| PaymentMethodRef | String | False | False | False |
The unique Id of the payment method that is associated with this sales-receipt transaction. | |
| PaymentMethodRef_Name | String | True |
PaymentMethods.Name | False | False |
The display name of the payment method that is associated with this sales-receipt transaction. |
| DepositToAccountRef | String | False |
Accounts.Id | False | False |
The unique Id of the asset account where the payment money is deposited. If you do not specify this account, QuickBooks Online uses the Undeposited Funds account. |
| DepositToAccountRef_Name | String | True |
Accounts.Name | False | False |
The display name of the asset account where the payment money is deposited. If you do not specify this account, QuickBooks Online uses the Undeposited Funds account. |
| ApplyTaxAfterDiscount | Boolean | False | False | False |
Indicates whether QuickBooks Online applies discounts before or after calculating tax on this sales-receipt transaction. | |
| CurrencyRef | String | False | False | False |
The unique Id of the currency that is used in the sales-receipt transaction. | |
| CurrencyRef_Name | String | True | False | False |
The display name of the currency that is used in the sales-receipt transaction. | |
| ExchangeRate | Decimal | False | False | False |
The currency exchange rate that QuickBooks Online applies to convert this sales-receipt transaction amount to the home currency. This field is valid only when the company file is set up to use the multicurrency feature. In QuickBooks Online, exchange rates are always recorded as the number of home currency units it takes to equal one foreign currency unit. This field is available for the UK, AU, and CA editions. | |
| GlobalTaxCalculation | String | False | False | False |
The method by which QuickBooks Online applies sales tax to this sales-receipt transaction. This field is valid in the UK, AU, and CA editions. The allowed values are TaxExcluded, TaxInclusive, NotApplicable. | |
| HomeTotalAmt | Decimal | False | False | False |
The total amount of the sales-receipt transaction in the home currency. This amount includes the total of all charges, allowances, and taxes applied within the transaction. This field is valid in the UK, AU, and CA editions. | |
| TransactionLocationType | String | False | False | False |
The account location type that is used in this sales-receipt transaction. This field is valid only in the FR editions. The allowed values are WithinFrance, FranceOverseas, OutsideFranceWithEU, OutsideEU. | |
| ProjectRef | String | False | True | False |
The unique Id of the project that is associated with this sales-receipt transaction. | |
| RecurDataRef | String | True | False | False |
The unique Id of the reference to the recurring transaction template from which this sales receipt was created. This captures which recurring transaction template the sales receipt originated from. | |
| FreeFormAddress | Boolean | False | False | False |
Indicates how the shipping address (ShipAddr) is stored for this sales-receipt transaction. The value of this flag is system defined based on whether the shipping address was formatted or unformatted at object creation time. | |
| HomeBalance | Decimal | True | False | False |
A convenience field that contains the amount in Balance expressed in terms of the home currency for this sales-receipt transaction. | |
| TxnSource | String | True | False | False |
The field that is used internally by QuickBooks Online to specify the originating source of a credit card transaction. | |
| DeliveryInfo_DeliveryType | String | True | False | False |
The type of delivery for this sales-receipt transaction. This delivery type is used to confirm that an email has been sent via the send operation. The allowed values are Email. | |
| DeliveryInfo_DeliveryTime_DateTime | String | True | False | False |
The delivery date and time that is recorded for this sales-receipt transaction. | |
| CreditCardPaymentAggregate | String | True | False | False |
An XML aggregate that is serialized into a single string containing all information about a credit card payment for this sales-receipt transaction. This collection can include processor response elements such as status, authorization codes, and transaction identifiers. |