SalesReceipts
Create, update, delete, and query QuickBooks Sales Receipts.
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 Id of the sales receipt. | |
SyncToken | String | True | False | False |
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online. | |
MetaData_CreateTime | Datetime | True | True | True |
The time the record was created. | |
MetaData_LastUpdatedTime | Datetime | True | True | True |
The time the record was last updated. | |
DocNumber | String | False | True | True |
Reference number for the transaction. | |
TxnDate | Date | False | True | True |
The date when this transaction occurred. | |
DepartmentRef | String | False |
Departments.Id | False | False |
The Id of the department, which stores the location of the transaction as defined using location tracking in QuickBooks Online. |
DepartmentRef_Name | String | True |
Departments.Name | False | False |
The name of the department, which stores the location of the transaction as defined using location tracking in QuickBooks Online. |
PrivateNote | String | False | False | False |
The private note about the transaction. This note will not appear on the transaction records by default. | |
TxnStatus | String | False | False | False |
The status of the transaction. Depending on the transaction type it may have different values. For sales transactions, the acceptable values are defined in PaymentStatusEnum. For estimates, the values accepted are defined in QboEstimateStatusEnum. | |
LinkedTxnAggregate | String | False | False | False |
Zero or more linked transactions. | |
LineAggregate | String | False | False | False |
Zero or more lines for the transaction. | |
TxnTaxDetail_TxnTaxCodeRef | String | False |
TaxCodes.Id | False | False |
The transaction tax code. |
TxnTaxDetail_TotalTax | String | False | False | False |
Total tax calculated for the transaction, excluding any tax lines manually inserted into the transaction line list. | |
TxnTaxDetail_TaxLineAggregate | String | False | False | False |
An XML aggregate of tax line items. | |
CustomerRef | String | False |
Customers.Id | True | False |
The Id of the customer. |
CustomerRef_Name | String | True |
Customers.DisplayName | False | False |
The name of the customer. |
CustomerMemo | String | False | False | False |
The message to the customer. | |
BillAddr_Id | String | False | False | False |
The Id of the entity for the billing address, mainly used for modifying the address. This field is assigned by the data service. | |
BillAddr_Line1 | String | False | False | False |
First line of the address. | |
BillAddr_Line2 | String | False | False | False |
Second line of the address. | |
BillAddr_Line3 | String | False | False | False |
Third line of the address. | |
BillAddr_Line4 | String | False | False | False |
Fourth line of the address. | |
BillAddr_Line5 | String | False | False | False |
Fifth line of the address. | |
BillAddr_City | String | False | False | False |
City name. | |
BillAddr_Country | String | False | False | False |
Country name. | |
BillAddr_CountrySubDivisionCode | String | False | False | False |
Region within a country. For example, the state name for the USA and the province name for Canada. | |
BillAddr_PostalCode | String | False | False | False |
Postal code. For example, the zip code for the USA and Canada. | |
BillAddr_Note | String | False | False | False |
The note for the customer. | |
BillAddr_Lat | String | False | False | False |
Latitude coordinate of the geocoded address. | |
BillAddr_Long | String | False | False | False |
Longitude coordinate of the geocoded address. | |
ShipAddr_Id | String | False | False | False |
The Id of the entity for the shipping address, mainly used for modifying the address. This field is assigned by the data service. | |
ShipAddr_Line1 | String | False | False | False |
First line of the address. | |
ShipAddr_Line2 | String | False | False | False |
Second line of the address. | |
ShipAddr_Line3 | String | False | False | False |
Third line of the address. | |
ShipAddr_Line4 | String | False | False | False |
Fourth line of the address. | |
ShipAddr_Line5 | String | False | False | False |
Fifth line of the address. | |
ShipAddr_City | String | False | False | False |
City name. | |
ShipAddr_Country | String | False | False | False |
Country name. | |
ShipAddr_CountrySubDivisionCode | String | False | False | False |
Region within a country. For example, the state name for the USA and the province name for Canada. | |
ShipAddr_PostalCode | String | False | False | False |
Postal code. For example, the zip code for the USA and Canada. | |
ShipAddr_Note | String | False | False | False |
Note for the customer. | |
ShipAddr_Lat | String | False | False | False |
Latitude coordinate of the geocoded address. | |
ShipAddr_Long | String | False | False | False |
Longitude coordinate of the geocoded address. | |
ClassRef | String | False |
Class.Id | True | False |
The Id of the class associated with the transaction. |
ClassRef_Name | String | True |
Class.FullyQualifiedName | False | False |
The name of the class associated with the transaction. |
ShipMethodRef | String | False | False | False |
The Id of the shipping method associated with the transaction. | |
ShipMethodRef_Name | String | True | False | False |
The name of the shipping method associated with the transaction. | |
ShipDate | Date | False | False | False |
Date for delivery of goods or services. | |
TrackingNum | String | False | False | False |
The tracking number of the shipping provider for the delivery of the goods associated with the transaction. | |
TotalAmt | Decimal | False | True | False |
The total amount of the transaction. This includes the total of all the charges, allowances, and taxes. By default, this is recalculated and overriden based on total of the subitems. This field is calculated by QuickBooks business logic and cannot be written to QuickBooks. | |
PrintStatus | String | False | False | False |
The print status of the invoice. 使用できる値は次のとおりです。NotSet, NeedToPrint, PrintComplete デフォルト値はNotSetです。 | |
EmailStatus | String | False | False | False |
The email status of the invoice. 使用できる値は次のとおりです。NotSet, NeedToSend, EmailSent デフォルト値はNotSetです。 | |
BillEmail_Address | String | False | False | False |
The email address where the sales receipt is sent. | |
Balance | Decimal | True | True | True |
The balance reflecting any payments made against the transaction. | |
PaymentRefNum | String | False | False | False |
The reference number for the payment. | |
PaymentMethodRef | String | False | False | False |
The Id of the payment method. | |
PaymentMethodRef_Name | String | True |
PaymentMethods.Name | False | False |
The name of the payment method. |
DepositToAccountRef | String | False |
Accounts.Id | False | False |
The Id of the asset account where the payment money is deposited. If you do not specify this account, QBO uses the Undeposited Funds account. |
DepositToAccountRef_Name | String | True |
Accounts.Name | False | False |
A name that identifies the asset account where the payment money is deposited. If you do not specify this account, QBO uses the Undeposited Funds account. |
ApplyTaxAfterDiscount | Boolean | False | False | False |
This field sets whether discounts are applied before the tax is calculated. | |
CurrencyRef | String | False | False | False |
The Id of the currency used in the transaction. | |
CurrencyRef_Name | String | True | False | False |
The name of the currency used in the transaction. | |
ExchangeRate | Decimal | False | False | False |
Currency exchange rate. This field is valid only if the company file is set up to use the multicurrency feature. In QuickBooks, 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 |
Method in which tax is applied. This field is valid in the UK, AU, and CA editions. 使用できる値は次のとおりです。TaxExcluded, TaxInclusive, NotApplicable | |
HomeTotalAmt | Decimal | False | False | False |
Total amount of the transaction in the home currency. This field is valid in the UK, AU, and CA editions. |