SalesReceipts
Create, Query, Update, and Delete QuickBooks SalesReceipts. You can add SalesReceipts via the SalesReceiptLineItems table.
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
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, ReferenceNumber, CustomerName, CustomerId, DepositAccount and DepositAccountId. In addition, the pseudo-columns StartModifiedDate, EndModifiedDate, StartTxnDate, and EndTxnDate may also be specified.
Insert
Note: There are two ways to insert a SalesReceipts. See SalesReceiptLineItems for another example of how to insert a SalesReceipts.
In order to add a SalesReceipt, a Customer and at least one Line Item must be specified. 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 as # columns. 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>')
QuickBooks Online
The QuickBooks Online API does not support updates. In addition, several columns are not available including Template columns, DueDate, SalesRep columns, ShipMethod columns, FOB, Tax columns, and Currency columns.
Columns
| Name | Type | Description | ReadOnly |
| ID [KEY] | String |
The unique identifier. | True |
| ReferenceNumber | String |
Transaction reference number. This may be set to refnumber*, *refnumber, and *refnumber* in the WHERE clause of a SELECT statement to search by StartsWith, EndsWith, and Contains. Refnum1:refnum2, refnum1:, and :refnum1 may also be used to denote a range. | False |
| TxnNumber | String |
The transaction number. An identifying number for the transaction, but not the QuickBooks generated ID. | True |
| CustomerName | String |
Customer name this transaction is recorded under. This is required to have a value when inserting. | False |
| CustomerId | String |
Customer id this transaction is recorded under. | False |
| Date | Date |
Transaction date. If it is set in the WHERE clause of a SELECT query, the pseudo-columns StartDate and EndDate are overwritten with the value. If using QuickBooks Online, this is required to have a value when inserting. | False |
| ShipMethod | String |
Shipping method. | False |
| ShipMethodId | String |
Shipping method. | False |
| ShipDate | Date |
Shipping date. | False |
| Memo | String |
Memo regarding this transaction. | False |
| Class | String |
A reference to the class of transaction. | False |
| ClassId | String |
A reference to the class of transaction. | False |
| DueDate | Date |
The date when payment is due. | False |
| TotalAmount | Double |
Total amount for this transaction. | True |
| Message | String |
Message to customer. | False |
| MessageId | String |
Message to customer. | False |
| SalesRep | String |
Reference to (initials of) sales rep. | False |
| SalesRepId | String |
Reference to the sales rep. | False |
| Template | String |
The name of an existing template to apply to the transaction. | False |
| TemplateId | String |
The ID of an existing template to apply to the transaction. | False |
| ExchangeRate | Double |
Currency exchange rate for this Sales Receipt. | False |
| FOB | String |
Freight On Board: The place to ship from. | False |
| BillingAddress | String |
Full billing address returned by QuickBooks. | True |
| BillingLine1 | String |
First line of the billing address. | False |
| BillingLine2 | String |
Second line of the billing address. | False |
| BillingLine3 | String |
Third line of the billing address. | False |
| BillingLine4 | String |
Forth line of the billing address. | False |
| BillingLine5 | String |
Fifth line of the billing address. | False |
| BillingCity | String |
City name for the billing address. | False |
| BillingState | String |
State name for the billing address. | False |
| BillingPostalCode | String |
Postal code for the billing address. | False |
| BillingCountry | String |
Country for the billing address. | False |
| ShippingAddress | String |
Full shipping address returned by QuickBooks. | True |
| ShippingLine1 | String |
First line of the shipping address. | False |
| ShippingLine2 | String |
Second line of the shipping address. | False |
| ShippingLine3 | String |
Third line of the shipping address. | False |
| ShippingLine4 | String |
Forth line of the shipping address. | False |
| ShippingLine5 | String |
Fifth line of the shipping address. | False |
| ShippingCity | String |
City name for the shipping address. | False |
| ShippingState | String |
State name for the shipping address. | False |
| ShippingPostalCode | String |
Postal code for the shipping address. | False |
| ShippingCountry | String |
Country for the shipping address. | False |
| Subtotal | Double |
Gross subtotal. This doesn't include tax/amount already paid. | True |
| Tax | Double |
Total sales tax applied to this transaction. | True |
| TaxAgency | String |
Agency or group sales tax is paid to. Note that you cannot set this value while updating. | False |
| TaxAgencyId | String |
Agency or group sales tax is paid to. Note that you cannot set this value while updating. | False |
| TaxPercent | Double |
Percentage charged for sales tax. | True |
| IsPending | Boolean |
Transaction status (whether this transaction has been completed or it is still pending). | False |
| IsToBePrinted | Boolean |
Whether this transaction is to be printed. | False |
| IsTaxIncluded | Boolean |
Determines if tax is included in the transaction amount. | False |
| IsToBeEmailed | Boolean |
When true, if no email address is on file for the customer the transaction will fail. | False |
| ItemCount | Integer |
The count of item entries for this transaction. | True |
| ItemAggregate | String |
An aggregate of the Line Item data which can be used for adding a SalesReceipts and its Line Item data. | False |
| CheckNumber | Integer |
Check number. | True |
| PaymentMethod | String |
Payment method. | False |
| PaymentMethodId | String |
Payment method. | False |
| DepositAccount | String |
Account name where this payment is deposited. | False |
| DepositAccountId | String |
Account name where this payment is deposited. | False |
| CustomerTaxCode | String |
The tax code specific to this customer. | True |
| CustomerTaxCodeId | String |
The tax code specific to this customer. | True |
| CustomFields | String |
Custom fields returned from QuickBooks formatted into XML. | False |
| EditSequence | String |
An identifier for this copy of the object, used for versioning. | True |
| TimeModified | Datetime |
When the SalesReceipt was last modified. | True |
| TimeCreated | Datetime |
When the SalesReceipt was created. | True |
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 |
All LineItem specific columns may be used in insertions. | |
| StartTxnDate | String |
Earliest transaction date to search for. | |
| EndTxnDate | String |
Latest transaction date to search for. | |
| StartModifiedDate | String |
Earliest modified date to search for. | |
| EndModifiedDate | String |
Latest modified date to search for. | |
| IncludeLineItems | String |
Whether or not to include line items in the response for a SELECT. The allowed values are True, False. |