TDV Adapter for QuickBooks

Build 22.0.8462

PurchaseOrders

Create, update, delete, and query QuickBooks Purchase Orders.

Table Specific Information

Purchase orders may be inserted, queried, or updated via the PurchaseOrders or PurchaseOrderLineItems tables. PurchaseOrders may be deleted by using the PurchaseOrders 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 Desktop allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns can typically be used with only the equals or = comparison. The available columns for PurchaseOrders are Id, Date, TimeModified, VendorName, and VendorId. 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 PurchaseOrders WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND ReferenceNumber LIKE '%12345%'

Insert

To add a PurchaseOrder, specify the Vendor 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 PurchaseOrderLineItems table and it starts with Item. For example, the following will insert a new PurchaseOrder with two Line Items:

INSERT INTO PurchaseOrders (VendorName, ItemAggregate) 
VALUES ('A Cheung Limited', 
'<PurchaseOrderLineItems>
<Row><ItemName>Repairs</ItemName><ItemQuantity>1</ItemQuantity></Row>
<Row><ItemName>Removal</ItemName><ItemQuantity>2</ItemQuantity></Row>
</PurchaseOrderLineItems>')

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

The unique identifier in the format PurchaseOrderId.

VendorName String False 1000

Vendor name this purchase order is issued to. Either VendorName or VendorId must have a value when inserting.

VendorId String False

Vendors.ID

255

Vendor Id this purchase order is issued to. Either VendorName or VendorId must have a value when inserting.

VendorMessage String False 99

Message to appear to vendor.

ReferenceNumber String False 21

The transaction reference number.

TxnNumber Integer True

The transaction number. An identifying number for the transaction, different from the QuickBooks-generated Id.

Date Date False

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.

DueDate Date False

Date when payment is due.

ShipMethod String False 1000

Shipping method.

ShipMethodId String False

ShippingMethods.ID

255

Shipping method.

ExpectedDate Date False

Date when the shipment is expected.

Memo String False 5000

Memo regarding this transaction.

Class String False 1000

A reference to the class of the transaction.

ClassId String False

Class.ID

255

A reference to the class of the transaction.

Terms String False 100

Payment terms.

TermsId String False 255

Payment terms.

TotalAmount Decimal True

Total amount for this purchase order.

Template String False 100

The name of an existing template to apply to the transaction.

TemplateId String False

Templates.ID

255

The Id of an existing template to apply to the transaction.

CurrencyName String False 64

Name of the currency code used for this purchase order. QBXML version must be set to 8.0 or higher to use this field.

CurrencyId String False

Currency.ID

255

Id of the currency code used for this purchase order. QBXML version must be set to 8.0 or higher to use this field.

ItemCount Integer True

The number of line items.

ItemAggregate String False 5000

An aggregate of the Line item data which can be used for adding a purchase orders and its line item data.

IsFullyReceived Boolean True

If IsFullyReceived is true, all the items in the purchase order have been received and none were closed manually.

IsManuallyClosed String False 10

Whether or not the purchase order is closed.

IsToBePrinted Boolean False

Whether this transaction is to be printed.

IsToBeEmailed Boolean False

Indicates whether the transaction is to be emailed.

IsTaxIncluded Boolean False

Indicates whether the dollar amounts in the line items include tax or not.

SalesTaxCodeName String False 3

The type of sales tax that will be charged for this purchase order.

SalesTaxCodeId String False

SalesTaxCodes.ID

255

The type of sales tax that will be charged for this purchase order.

FOB String False 1000

Freight on board: The place to ship from.

VendorAddress String True

Full vendor address returned by QuickBooks.

VendorLine1 String False 500

First line of the vendor address.

VendorLine2 String False 500

Second line of the vendor address.

VendorLine3 String False 500

Third line of the vendor address.

VendorLine4 String False 500

Fourth line of the vendor address.

VendorLine5 String False 41

Fifth line of the vendor address.

VendorCity String False 255

City name for the vendor address of the vendor.

VendorState String False 255

State name for the vendor address of the vendor.

VendorPostalCode String False 30

Postal code for the vendor address of the vendor.

VendorCountry String False 255

Country for the vendor address of the vendor.

VendorNote String False 41

Note for the vendor address of the vendor.

ShipToEntityName String False 1000

A reference to an entity (a customer, a vendor or an employee) to whom shipment is to be made. This may also be a customer job.

ShipToEntityId String False 255

A reference to an entity (a customer, a vendor or an employee) to whom shipment is to be made. This may also be a customer job.

ShippingAddress String True

Full shipping address returned by QuickBooks.

ShippingLine1 String False 500

First line of the shipping address.

ShippingLine2 String False 500

Second line of the shipping address.

ShippingLine3 String False 500

Third line of the shipping address.

ShippingLine4 String False 500

Fourth line of the shipping address.

ShippingLine5 String False 41

Fifth line of the shipping address.

ShippingCity String False 255

City name for the shipping address.

ShippingState String False 255

State name for the shipping address.

ShippingPostalCode String False 30

Postal code for the shipping address.

ShippingCountry String False 255

Country for the shipping address.

ShippingNote String False 41

Note for the shipping address.

ExchangeRate Double False

Indicates the exchange rate for the transaction.

Other1 String False 25

Predefined QuickBooks custom field.

Other2 String False 29

Predefined QuickBooks custom field.

CustomFields String False

Custom fields returned from QuickBooks and formatted into XML.

EditSequence String True

An identifier used for versioning for this copy of the object.

TimeModified Datetime True

When the purchase order was last modified.

TimeCreated Datetime True

When the purchase order 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
Item* String

All line-item-specific columns may be used in insertions.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462