Introduction

 Top Next

ClarionQBConnect

(c) 2009, American Riviera Software Corp

Contact:

Paul MacFarlane paul@amerisoftcorp.com

This tool was created out of necessity. We tried other available interfaces between Clarion and QuickBooks and found them to be very tedious, very slow to develop, and very slow.

In reviewing the QB-SDK we found that the QB-XML interface provided a way to communicate in XML packets. We are not XML experts (more like XML hacks) and we found that the XML schema QuickBooks uses is quite extensive. We have found that based on the results, it is easy to hack the resulting XML data.

Our experience: After 3 months of working with a Clarion COM based product, we developed the initial/functional version of QBXml Connect and implemented this solution in about 2 weeks. Problem solved!

We have been using the core parts of this solution since 2006 and shared our method with just a couple of other developers.

We decided to further develop it as a third party tool because the need for a simple solution is still there.


What's Included

 Top Previous Next

So, what is included in QBXML Connect:

· ARSCQBX.tpl - this template maps the functions in QBARSC.DLL and calls the setAppInfo function.
· QBARSC.DLL - the DLL that does all the grunk work.
· QBARSC.LIB - for linking
· qbc*.clw, .inc - Class Source Files
· Examples - we're working on adding Examples as we go based on your requests.


Pricing and Support

Version 1 price will be $149 with free updates to v1.5 and v 2.0

Version 1.5 price will also be $149 but will not include free update to v2.0 (v 2 update will be $50)

Version 2.0 will be $199

From then on, all minor updates within a major version will be included. Major version updates will be $50

A Discussion Forum is located at: http://www.amerisoftcorp.com/phorum

Support via e-mail ( support@amerisoftcorp.com ) will be free.

Custom development is on an individual basis.


QB Info Supported

What data can you get, change, and post to QuickBooks ?

What versions of QuickBooks are supported?

See QuickBooks SDK Versions

See QuickBooks Editions

There are some functions that are supported in older versions, but the SDK was so limited it really isn't worth the frustration.

Here is what we are supporting in Version 1.

Data | Get Data | Extended Custom | Change | Add | Delete
Accounts - These are General Ledger Accounts | ü | ü | ü | ü |
Class - This is a transaction classification that is used for reporting, etc. | ü | na | ü | ü |
Customers | ü | ü | ü | ü | ü
Vendors | ü | ü | ü | ü |
General Journal - Journal Entries for just about anything. Commonly used to post entries reflecting a summary of detail on other systems. | ü |  | ü* | ü* |
Items - Basic List | ü | ü |  |  |
Invoices - Posting of Accounts receivable Invoices | ü |  | ü* | ü* |
Receive Payments | ü |  | ü* | ü* |
Sales Receipts | ü |  | ü* | ü* |
Templates (These are defined in QB for use with Invoices, etc.) | ü | na | na | na |
Items - Inventory | ü | ü | ü | ü | ü
Items - NonInventory | ü | ü | ü | ü | ü
Items - Service | ü | ü | ü | ü | ü
Items - OtherCharges | ü | ü | ü | ü | ü
Items - InventoryAssembly | ü | ü |  |  |
Items - FixedAssets | ü | ü | ü | ü | ü
Items - Discounts | ü | ü | ü | ü | ü
Items - Groups | ü | ü | ü | ü | ü
Items - Payment Types | ü | ü | ü | ü | ü
Items - SalesTax | ü | ü | ü | ü | ü
Items - SalesTaxgroups | ü | ü |  |  |
Items - Subtotals | ü | ü | ü | ü | ü
UnitOfMeasure | ü | ü |  |  |

* This is a transaction which includes a main entry and related detail entries. Transactions are handled differently that simple updates to master file type records.

Notes:

Extended UI (Custom) data reading is supported but updating or adding is currently not supported.

Deleting Data can be tricky. There are a lot of restrictions made by QB.

na = Not Applicable. QB does not allow this function.


QB Info Planned

Here is what we plan to add in the future.....

Data | Version
Company Info | 1.5
AP Bills | 1.5
AP Payments | 1.5
Bulk Updates of Customers, Vendors etc.... | 2.0
Synchronization Functions | 2.0
More to come.... | 2.0


How it Works

How it works and what it does.

Some basic rules:

· The classes prepare and interpret data sent to and retrieved from QuickBooks
· The classes update queues that are properties of the class.

The QuickBooks sdk works using Request and Response XML messages. Every request gets a response.

If the request is to retrieve a list of data such as a vendor list, the response is that vendor list (or an error message).

If the request is to Add or Update data such as a vendor or invoice, the response is the updated or added data.

So, there is a circular relationship between your application and QuickBooks and the classes are the connection between what you request and receive.

Some rules about QuickBooks data:

ListID - This is a unique ID like a table UID. It is 36 characters long and should NOT be edited. This is used to identify and reference everything.

EditSequence - This is used to determine the state of a record and if it has been updated by someone else. Do NOT edit.


Limitations

There are a few limitations.....

· Based on SDK Level 7.0 - SDK 8.0 will be supported when it is released.
· Still trying to work out some issues surrounding how to handle address data correctly. QuickBooks allows you to edit the data more than 1 way.
·


Revision History

Version History for ClarionQBConnection
Version 1.01 - Released on 8/03/2009
  • Completed Error messages suppressed and posted to an error queue (see help)
  • Fixed [BT#17] qbarsc.lib install olocation corrected for C6 install
  • Fixed [BT#16] Item Parsing Error (qbc_items)
  • Fixed [BT#15] Vendor Parsing Error (VendorType)
Version 1.00 - Released on 7/28/2009
  • Fixed [BT#12] Error parsing master Item list
  • Completed Filtering of Invoice Request by Customer
  • Completed Get Invoice by Reference (user defined invoice number)
  • Completed Added Multi-Dll example (exmData.app, exmProc.app, exmMain.app)
  • Fixed [BT#14] Added Customer CreditLine field parsing
  • Fixed [BT#13] Number format problems - changed to global settings
  • Completed Multi-Dll capability
  • Completed ExampJE - Journal Entry Example
  • Fixed [BT#11] Error adding Customer when OpenBalance and OpenBalance date NOT supplied
Version 0.99 - Released on 4/22/2009
  • Ability to specify support for specifical QuickBooks Editions
  • Completed Items - Class qbc_Items (qItems) now read only master list of items.
  • Completed Unit of Measure - Class qbUnitOM (qUnitofMeasure)
  • Completed Receive Payment - Posting - Class qbRecPMT (qReceivePayment)
  • Completed Legacy Compatible Template
  • Completed Items - Subtotal - Class qbc_ItemsSUB (qItemsSubtotal)
  • Completed Items - Sales Tax Group - Class qbc_ItemsSTG (qItemsSalesTaxGroup)
  • Completed Items - Sales Tax - Class qbc_ItemsSTX (qItemsSalesTax)
  • Completed Items - Service - Class qbc_ItemsSVC (qItemsService)
  • Completed Items - Payment - Class qbc_ItemsPMT (qItemsPayments)
  • Completed Items - OtherCharge - Class qbc_ItemsOTH (qItemsOtherCharges)
  • Completed Items - NonInventory - Class qbc_ItemsNON (qItemsNonInventory)
  • Completed Items - Inventory - Class qbc_ItemsINV (qItemsInventory)
  • Completed Items - Groups Class qbc_ItemsGRP (qItemsGroups)
  • Completed Items - Fixed Asset - Class qbc_ItemsFAS (qItemsFixedAssets)
  • Completed Items - Discount - Class qbc_ItemsDIS (qItemsDiscounts)
  • Completed Items - Assembly Class - Class qbc_itemINA (qItemAssembliy)
Version 0.98 - Released on 4/07/2009
  • Multi Add of Records in one Transaction
  • Fixed [BT#10] Located bug in GetAll method that would prevent data from being refreshed correctly.
  • Delete Method added to Masterfile Classes
  • Fixed [BT#9] DLL Processor continued after error condition causing another error
  • Fixed [BT#8] GetLevel DLL function caused GPF - failed to handle error codition correctly
  • Completed Modified Example CAVI to verify connection, etc before communicationg
  • Added TimeCreated and TimeModified to all Queues
  • Fixed [BT#7] Modified Parsing process with drastic speed improvement - Thanks Bob Roos
  • Completed Progress Displays can now be Enabled or Disabled
  • Completed Progress Displays on every Data type now.
Version 0.97 - Released on 3/12/2009
  • Movement to Queues now allows for consistency in adding transactions, etc.
  • Licensing Feature implemented - removes warnings
  • Form Update Support removed. No longer using dictionary tables so standard forms no longer work for editing Records which reside in Queues
  • Completed Get by ListID - You can now retrieve a specific record by it's ListID or TxnID. This is useful when you want to verify that you have the most current version of a record from QuickBooks
  • Convert all to Queues instead of Tables. Removes the need for dictionary tables and eliminates driver conflicts (TPS driver did not meet certain needs)
  • Completed Control qbXML Spec levels. Now tests the machine your application is running on to determine the highest level of interaction support. Automatically modifies the communication with QuickBooks to ensure success.
Version 0.96 - Released on 2/26/2009
  • Fixed [BT#6] Fixed issue in Example that causes records to not update
  • Fixed [BT#5] Corrected Connection configuration issues
  • Completed Now starts the QB UI Mode if UI is requested and not running
Version 0.95 - Released on 2/20/2009
  • Fixed [BT#4] Error in template for reference to Items class
  • Completed Build New Connection Example
  • Completed Updated Documentation
Version 0.94 - Released on 2/04/2009
  • Completed Removed the 4mb limit on returned data - now limit is available memory.
  • Completed Added Method to Connection Manager: GetAuth
  • Completed Added Method to Connection Manager: SetFileName
  • Completed Added Method to Connection Manager: SetConnectionType
  • Completed Added Method to Connection Manager: SetUserMode
  • Fixed [BT#3] Problems with connecting to QuickBooks - extensively modified the connection process to allow connections in a variety of modes to local, remote, and online QuickBooks data.
Version 0.90 - Released on 12/30/2008
  • Fixed [BT#2] Dictionary used by example applications not included in setup
  • Fixed [BT#1] Setup installing template in wrong folder
  • Completed Invoicing - Posting
  • Completed Items - Add, Query
  • Completed General Journal - Add, Query
  • Completed Vendors - Add, Query
  • Completed Customers - Add, Query
  • Completed Class - Add, Query
  • Completed Accounts - Add, Query


QB-SDK Versions

Many people believe support is all about the version of QuickBooks they have. This is inaccurate.

There are 3 (or 4) factors which determine compatibility....

1. The version of QuickBooks on the target machine.

2. The highest SDK level the version of QB on the target machine will support.

3. The highest level of the interface library installed on the target machine.

4. The required level of data requests you make.

Example:

You cannot install a library v7 on QuickBooks 2004. So, even though the library supports v7 data requests such as Adding an Account with a TaxLine, QB2004 does not, so the call will not work.

ClarionQuickBooksConnect determines what capability exists and adjusts it calls to exclude portions that would cause a failure.


QB Editions

QuickBooks Editions

There is support for QuickBooks Editions. Each has different features and limitations.

By default, Professional, Premier and Enterprise are supported.

To enable or disable a specific version you need to set certain properties in the Connection Class.

See GetAuth for more information.


Getting Started

Getting Started:

1. Register the template.
2. Open the Dictionary and Import QBC.TXD
3. Open your Application and add the Global Template, your license information.
4. On the Global File Control tab - check generate all File Declarations.
5. Use the code templates to load data from QuickBooks.
6. Add the Update templates to the OK button on an update form.


Templates

There is one global template and several code templates.

All templates are located in file (ARSCQBX.tpl) that should be registered during setup.


Global Template

The global template is used to define the classes you are going to use in your application. Only the classes for which you define a class name will be included.

License Key - Supplied by us when you purchase the templates.

application ID - this is typically left blank

application Name - this is used for logging and for authorization.

Below are the default class names. You can change them if you wish but be careful with any hand coded portions of your application.


Get All Code Template

Each type of data table in the QuickBooks schema that has a class, has a method to retrieve all the data from QuickBooks.

These code templates simple insert the correct calls to the classes to obtain the data.

We recommend that these be called before a browse is loaded or activated by the user.

There are CODE templates for each type of table to retrieve


Working with the Class Queues

Since there is an extensive use of Queues in CQBC, we'd like to provide some pointers in working with the Class Queues.

We do recommend reading/refreshing yourself on the Queue related topics in Clarion Help and User Guide.

· CQBC provides Queue TYPES which it uses internally and for you to use when defining your Queues to pass to CQBC.
· You can populate a record in your Queue with one from the Class Queue with a simple assignment MyQ = qClass.tRec


Sample Applications

Found in 3rdparty\Examples\ClarionQBConnect folder.

ExampInv - This is an example on how to create an Invoice and apply payments to invoices.....

ExampVend - This is an example on how to retrieve and edit master file data.

ExampCAVI - This example shows a QuickBooks Settings window to demonstrate the various options for connecting to QB. It also demonstrates the GetAuth method to pre-authorize the application with QuickBooks....

ExampJE - This example shows posting a Journal Entry

exmDATA.app, exmPROC.app, exmMAIN.app - Multi-dll example.


Class Reference

Class reference.

Clarion QuickBooks Connect Class Reference


Base Classes

qbc_Cont - default instance is "qConnect"

This class handles several aspects of communicating with QuickBooks and processing the results.

qbc_Base - the parent of all other classes.

A direct instance is not made.


qbc_Cont

qbc_Cont is the connection class. This class handles several aspects of communicating with QuickBooks and processing the results.

Methods

Init | Initializes and sets license and app info | PROCEDURE(*cstring rLicense,*cstring rappID, *cstring rappName)
Process | Causes pending request to be sent to QuickBooks | PROCEDURE
NextLine | Retrieves the next line of data from the results. | FUNCTION(),string
GetAttributeValue | xml interpretive function | FUNCTION (string xData, string aData),string
GetValue | xml interpretive function | FUNCTION (string xData, string aData),string
xmlEscape | xml interpretive function | FUNCTION (*string s),string
xmlUnEscape | xml interpretive function | FUNCTION (*string s),string
addNodeA | xml processing function | PROCEDURE(string nodeid, string nodevalue)
addNodeS | xml processing function | PROCEDURE(string nodeid, string nodevalue)
addString | xml processing function | PROCEDURE(string nodevalue)
SetHeader | xml processing function | PROCEDURE
SetFooter | xml processing function | PROCEDURE
SetUserMode | connection setting | PROCEDURE(long um)
SetConnectType | connection setting | PROCEDURE(long ct)
SetFileName | connection setting | PROCEDURE(cstring fname)
GetAuth | connection setting | FUNCTION(),long

Properties

xmlData | Data sent and received between the classes and QuickBooks | cstring(4000000)
appID | Rarely used and not well documented by Intuit - I believe it will distinguish applications with conflicting names. | cstring(10)
appName | The name you want to appear in the QuickBooks Integrated Application box | cString(40)
License | Code supplied by us. | cString(40)
errorevent | How the classes return error information to you. | byte
errormessage | An error message if an error event occurs | cstring(60)
AccessMode | Read Only or ReadWrite | long
UnAttended | The level of of interaction required | long
PersonalData | PersonalData requirements | long
QBESimple | Support SimpleStart Edition | long (1,0)
QBEPro | Support Professional Edition | long (1,0)
QBEPremier | Support Premier Edition | long (1,0)
QBEEnterprise | Support Enterprise Edition | long (1,0)
ForceAuthDialog | Cause the Authorization Dialog to appear at next GetAuth | long (1,0)


Method - SetUserMode

The User Mode had 3 value options. When you specify the UserMode you are requesting that QuickBooks interface only in this mode.

cqbc:UM_SingleUser

cqbc:UM_MultiUser

cqbc:UM_DoNotCare (default)

If you request SingleUser and QB is in MultiUser mode, your access will fail.

If you request MultiUser and QB is in SingleUser mode, your access will fail.

DoNotCare mode is the deault.

Why? There are some requests to QB that require certain modes (especially SingleUser).

For typical use this setting does not need to be changes.

Example call:

qConnect.SetUserMode(cqbc:UM_MultiUser)


Method - SetConnectionType

Connection Type defines by what interface you will be accessing the QB data.

cqbc:CT_unknown | This allows the QB interface to try and determine the connection itself
cqbc:CT_localQBD | This specifies that QB is installed locally and the local installation of QB will be accessing the data
cqbc:CT_remoteQBD | This specifies that the QB data is not under local control and that it is accessed on a shared machine
cqbc:CT_localQBDLaunchUI | (Default) This specifies that the Local user interface will be invoked as well as interfacing locally.
cqbc:CT_remoteQBOE | This is a QB Online installation.

So what makes "Local" and what makes it "Remote" ?

Local means you have access the the QB datafile. It could be on a shared server drive or on your machine.

Remote means you are accessing QB via it's shared Database method. This is a Client/Server mode.

LocalQBDLaunchUI is the default. Until the Application is authorized (which requires UI interaction in QB), no other method will work.

This options also implies that it will start QB if it's not running. I have found that to NOT be the case. You must start QB manually and login.

Using any of the other methods require that you specify a filename.

Example:

qConnect.SetConnectionType(cqbc:CT_localQBD)


Method - SetFileName

In some instances you can programmatically access more than 1 QB datafile.

In other instances (such as multiple versions of QB installed on the machine) the QB interface may not be able to determine what instance of QB to interface with.

If you specify a filename, the QB interface will determine the best way to open the file (and which version of QB to use).

Example:

MyCString = 'MyQBDatafileName.qbw'

qConnect.SetFilename( MyCString )


GetAuth

Get Authorization lets you specify the authorization you need your application to have with QB.

It also lets you establish that authorization ahead of accessing data.

GetAuth puts all previous calls for Usermode, ConnectionType, Filename, and more into effect and makes certain that they work by returning a true result.

There are 3 settings you can change before you make the call:

Access Mode

UnAttended mode

Personal Data Requirement

Example:

qConnect.AccessMode = cqbc:AccessReadWrite

qConnect.UnAttended = cqbc:UnAttendedOptional

qConnect.PersonalData = cqbc:PersonalDataOptional

if qbconn.GetAuth() then

! Proper rights granted or exist

else

message(qbconn.ErrorMessage,'Did not get authorization')

end

Normally you can make a call the GetAuth before you make other calls just to check that you have the needed rights.

QuickBooks Editions

Additionally there is support for QuickBooks Editions. Each has different features and limitations.

By default, Professional, Premier and Enterprise are supported.

To enable or disable a specific version you need to set certain properties in the Connection Class.

You can do that via a List or Transactions class reference (ie. qCustomers.conn ) or directly to the declared class (default: qConnect )

Example: I want to support SimpleStart or Professional ONLY.

qconnect.qbeSimple = 1

qconnect.qbePro = 1

qconnect.qbePremier = 0

qconnect.qbeEnterprise = 0

if qconnect.GetAuth() then

! Proper rights granted or exist

else

message(qbconn.ErrorMessage,'Did not get authorization')

end

Forcing the QuickBooks Authorization Dialog

At times you may want to force the authorization dialog box to display. You may want to have the user change options, charge login ID, etc.

To do this simply set the following:

qconnect.ForceAuthDialog = 1

before calling the GetAuth() method. ForceAuthDialog is ALWAYS reset to false after any call to GetAuth(), so you must specifically set it.


Property - Accessmode

This sets the read/write authorization for access. The default is ReadWrite

cqbc:AccessReadOnly

cqbc:AccessReadWrite

See GetAuth for an example


Property - UnAttended

The default is Optional

cqbc:UnAttendedRequired

cqbc:UnAttendedOptional

See GetAuth for an example


Property - PersonalData

Personal data is Customer Credit card numbers, Employee SSN and wage data, etc.

The default is Optional.

cqbc:PersonalDataRequired

cqbc:PersonalDataOptional

cqbc:PersonalDataNotNeeded

See GetAuth for an example


qbc_Base

qbc_base is the base class for all of the other classes. It requires a reference to an instance of the qbc_Cont object

Methods

Init | Initialized the class and reference to the Conn class | (*qbc_Cont CONN_ref)
GetAll | This method empties the local queues and loads the data from QB |
GetListID | This method retrieves/refreshes a specific record from QB into the class queue | (*cString rListID)
DeleteListID | Method to delete the record specified by the ListID | (*cString rListID)
UpdateRecords | Updates the passed Queue into Quickbooks | (*Qtype lrec)
EmptyTable | Empties the local queues |

Properties

Conn | a reference to the Conn class instance | type qbc_cont
errorevent | How the classes return error information to you. | byte
errormessage | An error message if an error event occurs | cstring(60)
IncludeExtendedData | if 1 Retrieves Extended Data Fields. Default = 0 | byte
IncludeActiveOnly | if 1 Retrieves only activate records. Default = 0 | byte
Filter_CustomerListID | Set the list ID of a customer for retrieving | cstring(37)
Filter_VendorListID |  | cstring(37)
Filter_OtherListID |  | cstring(37)
Filter_ReportType |  | cstring(37)
Filter_FromDate |  | date
Filter_ToDate |  | date


QuickBooks Lists

See qbc_base class reference.


Accounts

Commonly known as General Ledger Accounts

Class Type | qbc_Accounts
Default Class instance | qAccounts
Queue type | qbc_Account_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify (6.0)
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub-account, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub-account, this is the FullName of the parent. | ü | ü | ü
SubLevel | long |  | ü |  |
AccountType | cstring(21) |  | ü | ü | ü
SpecialAccountType | cstring(21) |  | ü |  |
AccountNumber | cstring(8) |  | ü | ü | ü
BankNumber | cstring(26) |  | ü | ü | ü
Desc | cstring(201) |  | ü | ü | ü
Balance | decimal(14,2) | Balance this account only | ü |  |
TotalBalance | decimal(14,2) | Balance including all sub-accounts | ü |  |
OpenBalance | decimal(14,2) |  |  | ü | ü
OpenBalanceDate | date |  |  | ü | ü
TaxLineID | long |  | ü | ü (7.0) | ü (7.0)
TaxLineName | cstring(257) |  | ü |  |
CashFlowClassification | cstring(21) |  | ü |  |

The Queue that contains the Account data is defined as:

qAccount.tRec

Once the call is made to retrieve the Accounts list, the following is the structure of the Queue:

qbc_Account_QType queue(qbc_Account_GType),type

end

See Coding Examples


Classes

Classes are Transaction Classifications and are used optionally throughout the QuickBooks schema.

Class Type | qbc_Classes
Default Class instance | qClasses
Queue type | qbc_Class_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify (na)
ListID | cSTRING(37) |  | ü |  |
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cSTRING(17) |  | ü |  |
NameName | cSTRING(32) |  | ü | ü |
FullName | cSTRING(160) |  | ü |  |
IsActive | cSTRING(2) | 1 or 0 | ü | ü |
ParentListID | cSTRING(37) | If this is a sub, this is the ListID of the parent. | ü | ü |
ParentFullName | cSTRING(160) | If this is a sub, this is the FullName of the parent. | ü | ü |
SubLevel | LONG |  | ü |  |

The Queue of records is accessed as:

qClasses.tRec


Customers

Class Type | qbc_Customers
Default Class instance | qCustomers
Queue type | qbc_Customer_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub-account, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub-account, this is the FullName of the parent. | ü | ü | ü
CompanyName | cstring(42) |  | ü | ü | ü
Salutation | cstring(16) |  | ü | ü | ü
FirstName | cstring(26) |  | ü | ü | ü
MiddleName | cstring(6) |  | ü | ü | ü
LastName | cstring(26) |  | ü | ü | ü
BillAddr1 | cstring(42) |  | ü | ü | ü
BillAddr2 | cstring(42) |  | ü | ü | ü
BillAddr3 | cstring(42) |  | ü | ü | ü
BillAddr4 | cstring(42) |  | ü | ü | ü
BillAddr5 | cstring(42) |  | ü | ü (6.0) | ü (6.0)
BillCity | cstring(32) |  | ü | ü | ü
BillState | cstring(22) |  | ü | ü | ü
BillPostalCode | cstring(14) |  | ü | ü | ü
BillCountry | cstring(32) |  | ü | ü | ü
BillAddressNote | cstring(42) |  | ü | ü (6.0) | ü (6.0)
ShipAddr1 | cstring(42) |  | ü | ü | ü
ShipAddr2 | cstring(42) |  | ü | ü | ü
ShipAddr3 | cstring(42) |  | ü | ü | ü
ShipAddr4 | cstring(42) |  | ü | ü | ü
ShipAddr5 | cstring(42) |  | ü | ü (6.0) | ü (6.0)
ShipCity | cstring(32) |  | ü | ü | ü
ShipState | cstring(22) |  | ü | ü | ü
ShipPostalCode | cstring(14) |  | ü | ü | ü
ShipCountry | cstring(32) |  | ü | ü | ü
ShipAddressNote | cstring(42) |  | ü | ü (6.0) | ü (6.0)
Phone | cstring(22) |  | ü | ü | ü
AltPhone | cstring(22) |  | ü | ü | ü
Fax | cstring(22) |  | ü | ü | ü
Email | cstring(1024) |  | ü | ü | ü
Contact | cstring(42) |  | ü | ü | ü
AltContact | cstring(42) |  | ü | ü | ü
CustomerTypeListID | cstring(37) |  | ü | ü | ü
CustomerTypeFullName | cstring(160) |  | ü | ü | ü
TermsListID | cstring(37) |  | ü | ü | ü
TermsFullName | cstring(32) |  | ü | ü | ü
SalesRepListID | cstring(37) |  | ü | ü | ü
SalesRepFullName | cstring(6) |  | ü | ü | ü
Balance | decimal(14,2) |  | ü |  |
TotalBalance | decimal(14,2) |  | ü |  |
OpenBalance | decimal(14,2) |  |  | ü |
OpenBalanceDate | date |  |  | ü |
SalesTaxCodeListID | cstring(37) |  | ü | ü | ü
SalesTaxCodeFullName | cstring(4) |  | ü | ü | ü
ItemSalesTaxListID | cstring(37) |  | ü | ü | ü
ItemSalesTaxFullName | cstring(32) |  | ü | ü | ü
ResaleNumber | cstring(16) |  | ü | ü | ü
AccountNumber | cstring(100) |  | ü | ü | ü
CreditLimit | decimal(14,2) |  | ü | ü | ü
PreferredPaymentMethodListID | cstring(37) |  | ü | ü | ü
PreferredPaymentMethodFullName | cstring(32) |  | ü | ü | ü
CreditCardInfoCreditCardNumber | cstring(26) |  | ü | ü | ü
CreditCardInfoExpirationMonth | cstring(3) |  | ü | ü | ü
CreditCardInfoExpirationYear | cstring(5) |  | ü | ü | ü
CreditCardInfoNameOnCard | cstring(42) |  | ü | ü | ü
CreditCardInfoCreditCardAddress | cstring(42) |  | ü | ü | ü
CreditCardInfoPostalCode | cstring(42) |  | ü | ü | ü
JobStatus | cstring(11) |  | ü | ü | ü
JobStartDate | date |  | ü | ü | ü
JobProjectedEndDate | date |  | ü | ü | ü
JobEndDate | date |  | ü | ü | ü
JobDesc | cstring(100) |  | ü | ü | ü
JobTypeListID | cstring(37) |  | ü | ü | ü
JobTypeFullName | cstring(160) |  | ü | ü | ü
Notes | cstring(4096) |  | ü | ü | ü
PriceLevelListID | cstring(37) |  | ü | ü | ü
PriceLevelFullName | cstring(32) |  | ü | ü | ü

The Queue that contains the Account data is defined as:

qCustomers.tRec &qbc_Customer_QType


Items

There are several types of Items used with QuickBooks and all are supported. But for typical lookup use you want a simple list of items.

Class Type | qbc_Items
Default Class instance | qItems
Queue type | qbc_Items_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add (na) | Modify (na)
ListID | cSTRING(37) |  | ü |  |
NameName | cSTRING(32) |  | ü |  |
FullName | cSTRING(160) |  | ü |  |
ItemType | cstring(21) | see below | ü |  |
IsActive | cstring(2) | 1 or 0 | ü |  |
SalesDesc | cstring(4096) |  | ü |  |
SalesPrice | decimal(14,2) |  | ü |  |

ItemType can be: Inventory, NonInventory, Service, Assembly, Discount, FixedAsset, Group, OtherCharge, Payments, Service, SalesTax, SalesTaxGroup, SubTotal


Items - Discounts

Discount codes are use on invoices, etc.

Class Type | qbc_ItemsDIS
Default Class instance | qItemsDiscounts
Queue type | qbc_ItemsDIS_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub, this is the FullName of the parent. | ü | ü | ü
SubLevel | long |  | ü |  |
ItemDesc | cstring(4096) |  | ü | ü | ü
SalesTaxCodeListID | cstring(37) |  | ü | ü | ü
SalesTaxCodeFullName | cstring(4) |  | ü | ü | ü
DiscountRate | decimal(7,3) |  | ü | ü | ü
DiscountRatePercent | decimal(7,3) |  | ü | ü | ü
AccountListID | cstring(37) |  | ü | ü | ü (7.0)
AccountFullName | cstring(160) |  | ü | ü | ü (7.0)
ApplyAccountToExisting | cstring(2) |  |  |  | ü (7.0)


Items - FixedAssets

Fixed Assets can be maintained.

Class Type | qbc_ItemFAS
Default Class instance | qItemsFixedAssets
Queue type | qbc_ItemsFAS_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
AcquiredAs | cstring(5) |  | ü | ü | ü
PurchaseDesc | cstring(51) |  | ü | ü | ü
PurchaseDate | date |  | ü | ü | ü
PurchaseCost | decimal(14,2) |  | ü | ü | ü
VendorOrPayeeName | cstring(51) |  | ü | ü | ü
AssetAccountListID | cstring(37) |  | ü | ü | ü
AssetAccountFullName | cstring(160) |  | ü | ü | ü
FixedAssetSalesDesc | cstring(51) |  | ü | ü | ü
FixedAssetSalesDate | date |  | ü | ü | ü
FixedAssetSalesPrice | decimal(14,2) |  | ü | ü | ü
FixedAssetSalesExpense | decimal(14,2) |  | ü | ü | ü
AssetDesc | cstring(51) |  | ü | ü | ü
Location | cstring(51) |  | ü | ü | ü
PONumber | cstring(31) |  | ü | ü | ü
SerialNumber | cstring(31) |  | ü | ü | ü
WarrantyExpDate | date |  | ü | ü | ü
NotesText | cstring(4096) |  | ü | ü | ü
AssetNumber | cstring(11) |  | ü | ü | ü
CostBasis | decimal(14,2) |  | ü | ü | ü
YearEndAccumDepreciation | decimal(14,2) |  | ü | ü | ü
YearEndBookValue | decimal(14,2) |  | ü |  |


Items - Groups

Groups are used to add a series of items to an invoice. Unlike an assembly, not all items need to be in stock.

Class Type | qbc_ItemGRP
Default Class instance | qItemsGroups
Queue Type | qbc_ItemsGRP_QType
Detail Queue Type | qbc_ItemsGRPD_QType

Queue Field Layout

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ItemDesc | cstring(4096) |  | ü | ü | ü
UnitOfMeasureSetListID | cstring(37) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetFullName | cstring(4) |  | ü | ü (7.0) | ü (7.0)
ForceUOMChange | cstring(2) | 1 or 0 | ü |  | ü (7.0)
IsPrintItemsInGroup | cstring(2) | 1 or 0 | ü | ü | ü
SpecialItemType | cstring(30) |  | ü |  |

Detail Queue Field Layout

Field | Type | Description | Query | Add | Modify
GrpID | cstring(37) |  | ü |  |
ListID | cstring(37) | Item ListID | ü | ü | ü
FullName | cstring(160) | Item FullName | ü | ü | ü
Quantity | decimal(14,2) | 1 or 0 | ü | ü | ü
UnitOfMeasure | cstring(37) |  | ü | ü (7.0) | ü (7.0)


Items - Inventory

Class Type | qbc_ItemINV
Default Class instance | qItemsInventory
Queue Type | qbc_ItemsINV_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub-account, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub-account, this is the FullName of the parent. | ü | ü | ü
SubLevel | long |  | ü | ü | ü
ManufacturerPartNumber | cstring(31) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetListID | cstring(37) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetFullName | cstring(4) |  | ü | ü (7.0) | ü (7.0)
ForceUOMChange | cstring(2) |  | ü |  | ü (7.0)
SalesTaxCodeListID | cstring(37) |  | ü | ü | ü
SalesTaxCodeFullName | cstring(4) |  | ü | ü | ü
SalesDesc | cstring(4096) |  | ü | ü | ü
SalesPrice | decimal(14,2) |  | ü | ü | ü
IncomeAccountListID | cstring(37) |  | ü | ü | ü (7.0)
IncomeAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
PurchaseDesc | cstring(4096) |  | ü | ü | ü
PurchaseCost | decimal(14,2) |  | ü | ü | ü
COGSAccountListID | cstring(37) |  | ü | ü | ü
COGSAccountFullName | cstring(160) |  | ü | ü | ü
PrefVendorListID | cstring(37) |  | ü | ü | ü
PrefVendorFullName | cstring(42) |  | ü | ü | ü
AssetAccountListID | cstring(37) |  | ü | ü | ü
AssetAccountFullName | cstring(160) |  | ü | ü | ü
ReorderPoint | decimal(7,2) |  | ü | ü | ü
QuantityOnHand | decimal(7,2) |  | ü | ü |
AverageCost | decimal(7,2) |  | ü |  |
QuantityOnOrder | decimal(7,2) |  | ü |  |
QuantityOnSalesOrder | decimal(7,2) |  | ü |  |
ApplyIARToExisting | cstring(2) |  | ü |  | ü (7.0)
TotalValue | decimal(14,2) |  | ü | ü |
InventoryDate | date |  | ü | ü |


Items - NonInventory

Class Type | qbc_ItemNON
Default Class instance | qItemsNonInventory
Queue Type | qbc_ItemsNON_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub, this is the FullName of the parent. | ü | ü | ü
SubLevel | long |  | ü | ü | ü
ManufacturerPartNumber | cstring(31) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetListID | cstring(37) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetFullName | cstring(4) |  | ü | ü (7.0) | ü (7.0)
ForceUOMChange | cstring(2) |  |  |  | ü (7.0)
SalesTaxCodeListID | cstring(37) |  | ü | ü | ü
SalesTaxCodeFullName | cstring(4) |  | ü | ü | ü
SalesOrDesc | cstring(4096) |  | ü | ü | ü
SalesOrPrice | decimal(14,2) |  | ü | ü | ü
SalesOrPerc | decimla(7,3) |  |  |  |
SalesOrAccountListID | cstring(37) |  | ü | ü | ü (7.0)
SalesOrAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
SpecialItemType | cstring(21) | ???? |  |  |
SalesDesc | cstring(4096) |  | ü | ü | ü
SalesPrice | decimal(14,2) |  | ü | ü | ü
IncomeAccountListID | cstring(37) |  | ü | ü | ü (7.0)
IncomeAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
PurchaseDesc | cstring(4096) |  | ü | ü | ü
PurchaseCost | decimal(14,2) |  | ü | ü | ü
ExpenseAccountListID | cstring(37) |  | ü | ü | ü (7.0)
ExpenseAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
PrefVendorListID | cstring(37) |  | ü | ü | ü
PrefVendorFullName | cstring(160) |  | ü | ü |
ApplyIARToExisting | cstring(2) | Apply Income Accounts to Existing Transactions |  |  | ü (7.0)
ApplyEARToExisting | cstring(2) | Apply Expense Accounts to Existing Transactions |  |  | ü (7.0)


Items - Inventory Assembly

Assemblys are used to add a series of items to an invoice where all components are required.

Class Type | qbc_ItemINA
Default Class instance | qItemsInvAssembly
Queue Type | qbc_ItemsINA_QType
Detail Queue Type | qbc_ItemsINAD_QType

Queue Field Layout

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub-account, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub-account, this is the FullName of the parent. | ü | ü | ü
SubLevel | long |  | ü |  |
UnitOfMeasureSetListID | cstring(37) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetFullName | cstring(4) |  | ü | ü (7.0) | ü (7.0)
SalesTaxCodeListID | cstring(37) |  | ü | ü | ü
SalesTaxCodeFullName | cstring(4) |  | ü | ü | ü
SalesDesc | cstring(4096) |  | ü | ü | ü
SalesPrice | decimal(14,2) |  | ü | ü | ü
IncomeAccountListID | cstring(37) |  | ü | ü | ü (7.0)
IncomeAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
PurchaseDesc | cstring(4096) |  | ü | ü | ü
PurchaseCost | decimal(14,2) |  | ü | ü | ü
COGSAccountListID | cstring(37) |  | ü | ü | ü
COGSAccountFullName | cstring(160) |  | ü | ü | ü
PrefVendorListID | cstring(37) |  | ü | ü | ü
PrefVendorFullName | cstring(42) |  | ü | ü | ü
AssetAccountListID | cstring(37) |  | ü | ü | ü
AssetAccountFullName | cstring(160) |  | ü | ü | ü
BuiltPoint | decimal(7,2) |  | ü | ü | ü
QuantityOnHand | decimal(7,2) |  | ü | ü |
AverageCost | decimal(7,2) |  | ü |  |
QuantityOnOrder | decimal(7,2) |  | ü |  |
QuantityOnSalesOrder | decimal(7,2) |  | ü |  |
ForceUOMChange | cstring(2) |  |  |  | ü (7.0)
ApplyIARToExisting | cstring(2) |  |  |  | ü (7.0)
ClearItemsInGroup | cstring(2) |  |  |  | ü
TotalValue | decimal(14,2) |  |  | ü |
InventoryDate | date |  |  | ü |

Detail Queue Field Layout

Field | Type | Description | Query | Add | Modify
AssemID | cstring(37) |  | ü |  |
ListID | cstring(37) | Item ListID | ü | ü | ü
FullName | cstring(160) | Item FullName | ü | ü | ü
Quantity | decimal(14,2) | 1 or 0 | ü | ü | ü


Items - OtherCharge

Class Type | qbc_ItemOTH
Default Class instance | qItemsOtherCharges
Queue Type | qbc_ItemsOTH_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub, this is the FullName of the parent. | ü | ü | ü
SubLevel | long |  | ü |  | ü
SalesTaxCodeListID | cstring(37) |  | ü | ü | ü
SalesTaxCodeFullName | cstring(4) |  | ü | ü | ü
SalesOrDesc | cstring(4096) |  | ü | ü | ü
SalesOrPrice | decimal(14,2) |  | ü | ü | ü
SalesOrPerc | decimal(7,3) |  | ü | ü |
SalesOrAccountListID | cstring(37) |  | ü | ü | ü (7.0)
SalesOrAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
SalesDesc | cstring(4096) |  | ü | ü | ü
SalesPrice | decimal(14,2) |  | ü | ü | ü
IncomeAccountListID | cstring(37) |  | ü | ü | ü (7.0)
IncomeAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
PurchaseDesc | cstring(4096) |  | ü | ü | ü
PurchaseCost | decimal(14,2) |  | ü | ü | ü
ExpenseAccountListID | cstring(37) |  | ü | ü | ü (7.0)
ExpenseAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
PrefVendorListID | cstring(37) |  | ü | ü | ü
PrefVendorFullName | cstring(160) |  | ü | ü |
SpecialItemType | cstring(21) |  | ü |  |
ApplyAccountRefToExisiting | cstring(2) |  |  |  | ü (7.0)
ApplyIARToExisting | cstring(2) | Apply Income Accounts to Existing Transactions |  |  | ü (7.0)
ApplyEARToExisting | cstring(2) | Apply Expense Accounts to Existing Transactions |  |  | ü (7.0)


Items - Payments

Class Type | qbc_ItemPMT
Default Class instance | qItemsPayments
Queue type | qbc_ItemsPMT_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ItemDesc | cstring(4096) |  | ü | ü | ü
DepositToListID | cstring(37) |  | ü | ü | ü
DepositToFullName | cstring(160) |  | ü | ü | ü
PaymentMethodListID | cstring(37) |  | ü | ü | ü
PaymentMethodFullName | cstring(32) |  | ü | ü | ü


Items - Service

Enter topic text here.

Class Type:

Default Class instance:

Class Type | qbc_ItemSVC
Default Class instance | qItemsService
Queue Type | qbc_ItemsSVC_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
FullName | cstring(160) |  | ü |  |
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ParentListID | cstring(37) | If this is a sub-account, this is the ListID of the parent. | ü | ü | ü
ParentFullName | cstring(160) | If this is a sub-account, this is the FullName of the parent. | ü | ü | ü
SubLevel | long |  | ü | ü | ü
ManufacturerPartNumber | cstring(31) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetListID | cstring(37) |  | ü | ü (7.0) | ü (7.0)
UnitOfMeasureSetFullName | cstring(4) |  | ü | ü (7.0) | ü (7.0)
ForceUOMChange | cstring(2) |  | ü |  | ü (7.0)
SalesTaxCodeListID | cstring(37) |  | ü | ü | ü
SalesTaxCodeFullName | cstring(4) | ??? | ü | ü | ü
SalesOrDesc | cstring(4096) |  | ü | ü | ü
SalesOrPrice | decimal(14,2) |  | ü | ü | ü
SalesOrPerc | decimal(7,3) |  | ü | ü | ü
SalesOrAccountListID | cstring(37) |  | ü | ü | ü (7.0)
SalesOrAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
SalesDesc | cstring(4096) |  | ü | ü | ü
SalesPrice | decimal(14,2) |  | ü | ü | ü
IncomeAccountListID | cstring(37) |  | ü | ü | ü (7.0)
IncomeAccountFullName | cstring(160) |  | ü | ü | ü (7.0)
PurchaseDesc | cstring(4096) |  | ü | ü | ü
PurchaseCost | decimal(14,2) |  | ü | ü | ü
ExpenseAccountListID | cstring(37) |  | ü | ü | ü
ExpenseAccountFullName | cstring(160) |  | ü | ü | ü
PrefVendorListID | cstring(37) |  | ü | ü | ü
PrefVendorFullName | cstring(42) |  | ü | ü | ü
ApplyAccountRefToExisiting | cstring(2) |  |  |  | ü (7.0)
ApplyIARToExisting | cstring(2) |  |  |  | ü (7.0)
ApplyEARToExisting | decimal(14,2) |  |  |  | ü (7.0)


Items - SalesTax

Class Type | qbc_ItemSTX
Default Class instance | qItemsSalesTax
Queue type | qbc_ItemsSTX_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ItemDesc | cstring(4096) |  | ü | ü | ü
TaxRate | decimal(7,3) |  | ü | ü | ü
TaxVendorListID | cstring(37) |  | ü | ü | ü
TaxVendorFullName | cstring(42) |  | ü | ü | ü


Items - SalesTaxGroup

Class Type | qbc_ItemSTG
Default Class instance | qItemsSalesTaxGroup
Queue Type | qbc_ItemsSTG_QType
Detail Queue Type | qbc_ItemsSTGD_QType

Queue Field Layout

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ItemDesc | cstring(4096) |  | ü | ü | ü
ItemSalesTaxListID | cstring(37) |  | ü | ü | ü
ItemSalesTaxFullName | cstring(4) |  | ü | ü | ü

Detail Queue Field Layout

Field | Type | Description | Query | Add | Modify
TaxGroupID | cstring(37) |  | ü |  |
ListID | cstring(37) | Item ListID | ü | ü | ü
FullName | cstring(160) | Item FullName | ü | ü | ü


Items - Subtotal

Subtotals are invoice line items that cause subtotaling of the items preceeding it.

Class Type | qbc_ItemSUB
Default Class instance | qItemsSubtotal
Queue type | qbc_ItemsSUB_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
IsActive | cstring(2) | 1 or 0 | ü | ü | ü
ItemDesc | cstring(4096) |  | ü | ü | ü
SpecialItemType | cstring(26) |  | ü (6.0) |  |


Vendors

Class Type | qbc_Vendors
Default Class instance | qVendors
Queue type | qbc_Vendors_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
NameName | cstring(32) |  | ü | ü | ü
IsActive | cstring(2) | 1 or 0 | ü |  |
CompanyName | cstring(42) |  | ü | ü | ü
Salutation | cstring(16) |  | ü | ü | ü
FirstName | cstring(26) |  | ü | ü | ü
MiddleName | cstring(6) |  | ü | ü | ü
LastName | cstring(26) |  | ü | ü | ü
Addr1 | cstring(42) |  | ü | ü | ü
Addr2 | cstring(42) |  | ü | ü | ü
Addr3 | cstring(42) |  | ü | ü | ü
Addr4 | cstring(42) |  | ü | ü | ü
Addr5 | cstring(42) |  | ü | ü (6.0) | ü (6.0)
City | cstring(32) |  | ü | ü | ü
State | cstring(22) |  | ü | ü | ü
PostalCode | cstring(14) |  | ü | ü | ü
Country | cstring(32) |  | ü | ü | ü
AddressNote | cstring(42) |  | ü | ü (6.0) | ü (6.0)
Phone | cstring(22) |  | ü | ü | ü
AltPhone | cstring(22) |  | ü | ü | ü
Fax | cstring(22) |  | ü | ü | ü
Email | cstring(1024) |  | ü | ü | ü
Contact | cstring(42) |  | ü | ü | ü
AltContact | cstring(42) |  | ü | ü | ü
NameOnCheck | cstring(42) |  |  |  |
AccountNumber | cstring(100) |  | ü | ü | ü
Notes | cstring(4096) |  | ü | ü | ü
VendorTypeListID | cstring(37) |  | ü | ü | ü
VendorTypeFullName | cstring(160) |  | ü | ü | ü
TermsListID | cstring(37) |  | ü | ü | ü
TermsFullName | cstring(31) |  | ü | ü | ü
CreditLimit | decimal(14,2) |  | ü | ü | ü
VendorTaxIdent | cstring(16) |  | ü | ü | ü
IsVendorEligibleFor1099 | cstring(2) |  | ü | ü | ü
Balance | decimal(14,2) |  | ü | ü |
BillingRateListID | cstring(37) |  | ü | ü (6.0) | ü (6.0)
BillingRateFullName | cstring(31) |  | ü | ü (6.0) | ü (6.0)
OpenBalance | decimal(14,2) |  |  | ü |
OpenBalanceDate | date |  |  | ü |


Unit of Measure

Unit of Measure is available at SDK level 7.0

Class Type | qbc_UnitOM
Default Class instance | qUnitOM
Queue type | qbc_UnitOM_QType

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify (na)
ListID | cSTRING(37) |  | ü |  |
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cSTRING(17) |  | ü |  |
NameName | cSTRING(32) |  | ü | ü |
IsActive | cstring(2) | 1 or 0 | ü | ü |
UnitOfMeasureType | cstring(32) |  | ü | ü |
BaseUnitName | cstring(32) |  | ü | ü |
BaseUnitAbbr | cstring(32) |  | ü | ü |
RelatedUnitName | cstring(32) |  | ü | ü |
RelatedUnitAbbr | cstring(32) |  | ü | ü |
RelatedUnitRatio | decimal(14,2) |  | ü | ü |
DefaultUsedFor | cstring(32) |  | ü | ü |
DefaultUnit | cstring(32) |  | ü | ü |


Extended Data

Many of the QB Masterfiles allow for Custom Fields to be added to the UI. You can access that data if you want.

By default, extended data is NOT retrieved. To enable retrieval, do the following before any call to GetAll....

qCustomer.IncludeExtendedData = 1

This only needs to be done once throughout your whole session.

Class Type |
Default Class instance | q????.ExtData
Queue type | qbc_CustomerExt_QType queue(qbc_DataExt_GType)

Queue Field Layout and Descriptions:

Field | Type | Description | Query | Add | Modify
ListID | cSTRING(37) |  | ü |  |
OwnerID | cstring(41) |  | ü |  |
DataExtName | cstring(32) |  | ü |  |
DataExtType | cSTRING(13) |  | ü |  |
DataExtValue | cSTRING(251) |  | ü |  |

Public v Private Extended Data Fields.

We currently support ONLY PUBLIC (OwnerID = '0') Extended Data Fields.

We currently DO NOT SUPPORT UPDATING


Transactions

See qbc_base class reference.

Filtering Transactions

Transactions can be filter by setting the following properties before calling the GetAll method.

Property | Type | Description | Query
Filter_CustomerListID | cstring(37) | Specify a customer listID | ü
Filter_VendorListID | cstring(37) |  | ü
Filter_OtherListID | cstring(37) |  | ü
Filter_ReportType | cstring(37) |  | ü
Filter_FromDate | date |  |
Filter_ToDate | date |  |


General Journal Entries

General Journal Entries or frequently used to make adjusting entries into the General Ledger.

A common use is to record the effects of a transaction that occurs outside QuickBooks.

*Filtering does not apply to the GetAll method.

Class Type | qbc_GenJrnl
Default Class instance | qGenJrnl
Queue Type | qbc_JE_Header_QType
Detail Queue Type | qbc_JE_Detail_QType

Here is the procedure for Posting a Journal Entry to Quickbooks

1. Declare local copies of the required Queue and Group. The types are defined the the class.

MyDtl QUEUE(qbc_JE_Detail_QType ),PRE(MyDtl)

END

MyHdr GROUP(qbc_JE_Header_QType),PRE(MyHdr)

END

2. Initiate and prepare the class for adding the transaction.

qGenJrnl.AddPrep(MyHdr,MyDtl) ! Prepare for a new invoice

3. Repeat adding lines to the Detail Queue.

! Add Detail Lines to Queue

MyDtl.AccountListID = ! The GL Account ListID

MyDtl.AccountFullName = ! The FullName

MyDtl.Amount =

MyDtl.MemoText =

MyDtl.EntityListID =

MyDtl.EntityFullName =

MyDtl.ClassListID =

MyDtl.ClassFullName =

MyDtl.BillableStatus =

add(myDtl)

4. Add Information to the Header

MyHdr.TxnDate = lDate

MyHdr.RefNumber = lReference

5. Post the Invoice

qGenJrnl.AddTransaction(MyHdr,MyDtl) ! post it

6. Clear and prepare for another Invoice

qGenJrnl.AddPrep(MyHdr,MyDtl)

---------------------------------------------------

Queue Field Layout

Field | Type | Description | Query | Add | Modify
TxnID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
TxnNumber | long |  | ü | ü | ü
TxnDate | date |  | ü | ü | ü
RefNumber | cstring(12) |  | ü | ü | ü
IsAdjustment | cstring(2) | 1 or 0 | ü |  | ü (7.0)

Detail Queue Field Layout

Field | Type | Description | Query | Add | Modify
TxnID | cstring(37) |  | ü |  |
TxnLineID | cstring(37) |  | ü | ü | ü
DebitCredit | cstring(2) |  | ü | ü | ü
AccountListID | cstring(37) |  | ü | ü | ü
AccountFullName | cstring(160) |  | ü | ü (7.0) | ü (7.0)
Amount | decimal(14,2) |  |  |  |
MemoData | cstring(4096) |  |  |  |
EntityListID | cstring(37) |  |  |  |
EntityFullName | cstring(210) |  |  |  |
ClassListID | cstring(37) |  |  |  |
ClassFullName | cstring(160) |  |  |  |
BillableStatus | cstring(21) |  |  |  |


Invoices (Receivables)

The Invoice Class is for posting invoices to accounts receivable. Partial payments may be applied during invoice creation. If the invoice is paid in full at origination, it is recommended that you use Sales Receipts instead.

Class Type | qbc_Invoice
Default Class instance | qInvoice
Queue Type | qbc_Invoice_QType
Detail Queue Type | qbc_InvDetail_QType

Queue Field Layout

Field | Type | Description | Query | Add | Modify
TxnID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
TxnNumber | long |  | ü |  |
CustomerListID | cstring(37) |  | ü | ü | ü
CustomerFullName | cstring(210) |  | ü | ü | ü
ClassListID | cstring(37) |  | ü | ü | ü
ClassFullName | cstring(160) |  | ü | ü | ü
ARAccountListID | cstring(37) |  | ü | ü | ü
ARAccountFullName | cstring(160) |  | ü | ü | ü
TemplateListID | cstring(37) |  | ü | ü | ü
TemplateFullName | cstring(32) |  | ü | ü | ü
TxnDate | date |  | ü | ü | ü
RefNumber | cstring(12) |  | ü | ü | ü
BillAddr1 | cstring(42) |  | ü | ü | ü
BillAddr2 | cstring(42) |  | ü | ü | ü
BillAddr3 | cstring(42) |  | ü | ü | ü
BillAddr4 | cstring(42) |  | ü | ü | ü
BillAddr5 | cstring(42) |  | ü | ü (6.0) | ü (6.0)
BillCity | cstring(32) |  | ü | ü | ü
BillState | cstring(22) |  | ü | ü | ü
BillPostalCode | cstring(14) |  | ü | ü | ü
BillCountry | cstring(32) |  | ü | ü | ü
BillNote | cstring(42) |  | ü | ü (6.0) | ü (6.0)
ShipAddr1 | cstring(42) |  | ü | ü | ü
ShipAddr2 | cstring(42) |  | ü | ü | ü
ShipAddr3 | cstring(42) |  | ü | ü | ü
ShipAddr4 | cstring(42) |  | ü | ü | ü
ShipAddr5 | cstring(42) |  | ü | ü (6.0) | ü (6.0)
ShipCity | cstring(32) |  | ü | ü | ü
ShipState | cstring(22) |  | ü | ü | ü
ShipPostalCode | cstring(14) |  | ü | ü | ü
ShipCountry | cstring(32) |  | ü | ü | ü
ShipNote | cstring(42) |  | ü | ü (6.0) | ü (6.0)
IsPending | cstring(2) |  | ü | ü | ü
IsFinanceCharge | cstring(2) |  | ü |  |
PONumber | cstring(26) |  | ü | ü | ü
TermsListID | cstring(37) |  | ü | ü | ü
TermsFullName | cstring(32) |  | ü | ü | ü
DueDate | date |  | ü | ü | ü
SalesRepListID | cstring(37) |  | ü | ü | ü
SalesRepFullName | cstring(6) |  | ü | ü | ü
FOB | cstring(14) |  | ü | ü | ü
ShipDate | date |  | ü | ü | ü
ShipMethodListID | cstring(37) |  | ü | ü | ü
ShipMethodFullName | cstring(16) |  | ü | ü | ü
SubTotal | decimal(14,2) |  | ü |  |
ItemSalesTaxListID | cstring(37) |  | ü | ü | ü
ItemSalesTaxFullName | cstring(32) |  | ü | ü | ü
SalesTaxPercentage | decimal(7,3) |  | ü |  |
SalesTaxTotal | decimal(14,2) |  | ü |  |
AppliedAmount | decimal(14,2) |  | ü |  |
BalanceRemaining | decimal(14,2) |  | ü |  |
MemoText | cstring(4096) |  | ü | ü | ü
IsPaid | cstring(2) | 1 or 0 | ü |  |
CustomerMsgListID | cstring(37) |  | ü | ü | ü
CustomerMsgFullName | cstring(102) |  | ü | ü | ü
IsToBePrinted | cstring(2) | 1 or 0 | ü | ü | ü
IsToBeEmailed | cstring(2) | 1 or 0 | ü | ü (6.0) | ü (6.0)
CustomerSalesTaxCodeListID | cstring(37) |  | ü | ü | ü
CustomerSalesTaxCodeFullName | cstring(37) |  | ü | ü | ü
SuggestedDiscountAmount | decimal(14,2) |  | ü |  |
SuggestedDiscountDate | date |  | ü |  |
Other | cstring(30) |  | ü | ü (6.0) | ü (6.0)
LinkedTxnID | cstring(37) |  | ü | ü |
LinkedTxnType | cstring(21) |  | ü |  |
LinkedTxnDate | date |  | ü |  |
LinkedRefNumber | cstring(21) |  | ü |  |
LinkedLinkType | cstring(21) |  | ü |  |
LinkedAmount | decimal(14,2) |  | ü |  |

Detail Queue Field Layout *****

Field | Type | Description | Query | Add | Modify
TxnID | cstring(37) | This is not a QB field - this relates to the main transaction | ü |  |
GroupTxnLineID | cstring(37) |  | ü |  | ü
ItemGroupListID | cstring(37) |  | ü |  | ü
ItemGroupFullName | cstring(32) |  | ü |  | ü
GroupDesc | cstring(4096) |  | ü |  |
GroupQuantity | decimal(7,2) |  | ü |  | ü
GroupUOM | cstring(32) |  | ü |  | ü
GroupORUOMListID | cstring(37) |  | ü |  | ü
GroupORUOMFullName | cstring(32) |  | ü |  | ü
IsPrintItemsIngroup | cstring(2) |  | ü |  |
TotalAmount | decimal(14,2) |  | ü |  |
TxnLineID | cstring(37) |  | ü | ü | ü
ItemListID | cstring(37) |  | ü |  | ü
ItemFullName | cstring(160) |  | ü |  | ü
Desc | cstring(4096) |  | ü |  | ü
Quantity | decimal(7,2) |  | ü |  | ü
UnitOfMeasure | cstring(32) |  | ü |  | ü
OverrideUOMListID | cstring(37) |  | ü |  | ü
OverrideUOMFullName | cstring(32) |  | ü |  | ü
Rate | decimal(14,2) |  | ü | ü | ü
RatePercent | decimal(7,3) |  | ü | ü | ü
ClassListID | cstring(37) |  | ü | ü | ü
ClassFullName | cstring(160) |  | ü | ü | ü
Amount | decimal(14,2) |  | ü | ü | ü
ServiceDate | date |  | ü | ü | ü
SalesTaxCodeListID | cstring(37) |  | ü |  | ü
SalesTaxCodeFullName | cstring(4) |  | ü |  | ü
OverrideItemAccountListID | cstring(37) |  |  |  | ü
OverrideItemAccountFullName | cstring(160) |  |  |  | ü
Other1 | cstring(30) |  | ü |  | ü (6.0)
Other2 | cstring(30) |  | ü |  | ü (6.0)

Filtering applies to the following:

Property | Type | Description | Query
Filter_CustomerListID | cstring(37) | Specify a customer listID | ü
Filter_VendorListID | cstring(37) |  |
Filter_OtherListID | cstring(37) |  |
Filter_ReportType | cstring(37) |  |
Filter_FromDate | date |  | ü
Filter_ToDate | date |  | ü

Additional Methods:

Method | Parameters | Description | Query
GetRefNumber | (*cString refID) | Get an Invoice by reference (invoice number) | ü


Receive Payments

The Receive Payment Class is used to apply payments in 3 ways.....

1. Applied directly to Open Invoices - you must supply the TxnID's of the invoices to apply to in the detail queue

2. AutoApply=True - The amount is applied to an invoice of a matching amount. If not found it is applied to the oldest invoice first.

3. AutoApply=False - The amount is posted unapplied in the customers account.

Class Type | qbc_RecPMT
Default Class instance | qReceivePayments
Queue Type | qbc_RecPMT_Header_QType
Detail Queue Type | qbc_RecPMT_Detail_QType

Queue Field Layout

Field | Type | Description | Query | Add | Modify (6.0)
TxnID | cstring(37) |  | ü |  | ü
TimeCreated | cstring(26) |  | ü |  |
TimeModified | cstring(26) |  | ü |  |
EditSequence | cstring(17) |  | ü |  | ü
TxnNumber | cstring(17) |  | ü |  |
CustomerListID | cstring(37) |  | ü | ü | ü
CustomerFullName | cstring(210) |  | ü | ü | ü
ARAccountListID | cstring(37) |  | ü | ü | ü
ARAccountFullName | cstring(160) |  | ü | ü | ü
TxnDate | date |  | ü | ü | ü
RefNumber | cstring(12) |  | ü | ü | ü
TotalAmount | decimal(14,2) |  | ü | ü | ü
PayMethodListID | cstring(37) |  | ü | ü | ü
PayMethodFullName | cstring(32) |  | ü | ü | ü
MemoText | cstring(4096) |  | ü | ü | ü
DepositAccountListID | cstring(37) |  | ü | ü | ü
DepositAccountFullName | cstring(160) |  | ü | ü | ü
CCICreditCardNumber | cstring(26) |  | ü | ü (4.1) | ü (7.0)
CCIExpirationMonth | cstring(3) |  | ü | ü (4.1) | ü (7.0)
CCIExpirationYear | cstring(5) |  | ü | ü (4.1) | ü (7.0)
CCINameOnCard | cstring(42) |  | ü | ü (4.1) | ü (7.0)
CCICreditCardAddress | cstring(42) |  | ü | ü (4.1) | ü (7.0)
CCIPostalCode | cstring(19) |  | ü | ü (4.1) | ü (7.0)
CCICommercialCardCode | cstring(25) |  | ü | ü (4.1) | ü (7.0)
CCITransactionMode | cstring(16) |  | ü | ü (6.0) | ü (7.0)
CCICreditCardTxnType | cstring(16) |  | ü | ü (7.0) | ü (7.0)
CCRResultCode | cstring(19) |  | ü | ü (4.1) | ü (7.0)
CCRResultMessage | cstring(61) |  | ü | ü (4.1) | ü (7.0)
CCRCreditCardTransID | cstring(25) |  | ü | ü (4.1) | ü (7.0)
CCRMerchantAcctNo | cstring(33) |  | ü | ü (4.1) | ü (7.0)
CCRAuthorizationCode | cstring(13) |  | ü | ü (4.1) | ü (7.0)
CCRAVSStreet | cstring(5) |  | ü | ü (4.1) | ü (7.0)
CCRAVSZip | cstring(5) |  | ü | ü (4.1) | ü (7.0)
CCRCardSecCodeMatch | cstring(2) |  | ü | ü (6.0) | ü (7.0)
CCRReconBatchID | cstring(85) |  | ü | ü (4.1) | ü (7.0)
CCRPaymentGroupCode | cstring(19) |  | ü | ü (4.1) | ü (7.0)
CCRPaymentStatus | cstring(11) |  | ü | ü (4.1) | ü (7.0)
CCRTxnAuthorizationTime | cstring(26) |  | ü | ü (4.1) | ü (7.0)
CCRTxnAuthorizationStamp | decimal(14,0) |  | ü | ü (4.1) | ü (7.0)
CCRClientTransID | cstring(17) |  | ü | ü (6.0) | ü (7.0)
UnusedPayment | decimal(14,2) |  | ü |  |
UnusedCredits | decimal(14,2) |  | ü |  |
IsAutoApply | cstring(2) | 1 or 0 |  | ü |

Detail Queue Field Layout

Field | Type | Description | Query | Add | Modify (6.0)
PMTTxnID | cstring(37) |  | ü |  |
TxnID | cstring(37) | Invoice TxnID | ü | ü | ü
TxnType | cstring(31) |  | ü |  |
TxnDate | date |  | ü |  |
RefNumber | cstring(22) |  | ü |  |
PaymentBalanceAmount | decimal(14,2) |  | ü |  |
Amount | decimal(14,2) |  | ü | ü | ü
CreditTxnID | cstring(37) |  |  | ü | ü
AppliedAmount | decimal(14,2) |  |  | ü | ü
DiscountAmount | decimal(14,2) |  | ü | ü | ü
DiscountAccountListID | cstring(37) |  | ü | ü | ü
DiscountAccountFullName | cstring(160) |  | ü | ü |


Sales Receipts

Enter topic text here.


Reports

Enter topic text here.


Aging Report

The Aging Report class returns the rows and columns of the report and can vary depending on the options selected and the actual resulting data.


Other References

Enter topic text here.


Coding Examples - How Do I ....?

The following coding examples are an outline of the calls to the Classes to get each task completed.


Adding a Customer

Customer Example: ExampCAVI - Customer Screen triggered by Add Customer Button

* This does not demonstrate data entry

AddNewCustomer routine ! Demonstrates Adding a Customer

data

MyCust queue(qbc_Customer_QType) ! Define the Q/Structure we need

end

code

Free(MyCust) ! Just make sure the Q is empty

MyCust.NameName = '7 Day Nursery'

MyCust.IsActive = '1'

MyCust.CompanyName = '7 Day Nursery Corporation'

MyCust.Salutation = 'Bob'

MyCust.FirstName = 'Robert'

MyCust.MiddleName = 'B'

MyCust.LastName = 'Smith'

MyCust.BillAddr1 = '123 Any Street'

MyCust.BillCity = 'myTown'

MyCust.BillState = 'CA'

MyCust.BillPostalCode = '93117'

MyCust.BillAddressNote = 'Address for Billings'

add(MyCust)

! You can add another at this point.

clear(MyCust)

MyCust.NameName = '3 Day Blinds'

MyCust.IsActive = 't'

MyCust.CompanyName = '3 Day Blinds Corporation'

MyCust.Salutation = 'Joe'

MyCust.FirstName = 'Joseph'

MyCust.MiddleName = 'B'

MyCust.LastName = 'There'

MyCust.BillAddr1 = '123 TheOther Street'

MyCust.BillCity = 'HisTown'

MyCust.BillState = 'CA'

MyCust.BillPostalCode = '93001'

MyCust.BillAddressNote = 'Address for Billings'

add(MyCust)

! Process the adds....

qCustomers.UpdateRecords(MyCust)

message(format(records(MyCust)),'unposted')


Updating a Customer

Customer Example: ExampCAVI -> BrowseCustomer -> button "Change Status"

To update a customer you must pass the revised data to the UpdateRecords method.

Since we are updating an object we are required to include the ListID and the EditSequence fields - otherwise it won't work.

ChangeCustomerActiveStatus routine ! Demonstrates Updating a Customer

data

MyCust queue(qbc_Customer_QType)

end

code

Free(MyCust) ! Just make sure the Q is empty

! Locate the ListID of the Customer - it list case we a getting it from the currently seleted record in a list box

get(qCustomers.tRec,choice(?Browse:1))

MyCust = qCustomers.tRec ! This makes a copy the Customer record in MyCust Q

! Change it's Active Status

if MyCust.IsActive = '1' then

MyCust.IsActive = '0'

else

MyCust.IsActive = '1'

end

add(MyCust)

! Process the Update....

qCustomers.UpdateRecords(MyCust)

if records(MyCust) then

message(format(records(MyCust)) & ' records were not posted','Notice!')

end


Deleting a Customer

Customer Example. The ListID passed to the DeleteListID Method does not have to be part of a structure.

ExampCAVI -> BrowseCustomers -> Delete button embed code

! Deleting a Customer

! Locate the ListID of the Customer - it list case we a getting it from the currently selected record in a list box

get(qCustomers.tRec,choice(?Browse:1))

! Call the DeleteListID method passing the ListID we selected - the value passed is a cstring

if ~qCustomers.DeleteListID(qCustomers.tRec.ListID) then

message(qCustomers.conn.errormessage,'Error Deleting')

end

! refresh our window so that th display Queue is updated

ThisWindow.Reset(1)


Posting an Invoice (Receivable)

Here is the procedure for Posting an Invoice to Quickbooks

1. Declare local copies of the required Queue and Group. The types are defined the the class.

MyDtl QUEUE(qbc_Inv_Detail_Type),PRE(MyDtl)

END

MyHdr GROUP(qbc_Inv_Header_Type),PRE(MyHdr)

END

2. Initiate and prepare the class for adding the transaction.

qInvoice.AddPrep(MyHdr,MyDtl) ! Prepare for a new invoice

3. Repeat adding lines to the Detail Queue.

! Add Detail Lines to Queue

MyDtl.ItemListID = LineItem ! This is the ListID of an Item

!MyDtl.ItemFullName =

MyDtl.Desc = LineDescription

MyDtl.Quantity = LineQuantity ! Number of items

MyDtl.Rate = LineRate ! Price per item

!MyDtl.RatePercent =

!MyDtl.ClassListID =

!MyDtl.ClassFullName =

MyDtl.Amount = LineAmount ! Total Line

!MyDtl.ServiceDate =

!MyDtl.SalesTaxCodeListID =

!MyDtl.SalesTaxCodeFullName =

!MyDtl.Other1 =

!MyDtl.Other2 =

add(myDtl)

4. Add Information to the Header

MyHdr.CustomerListID = lCustomerID ! This is the ListID of the Customer

!MyHdr.CustomerFullName =

!MyHdr.ClassListID =

!MyHdr.ClassFullName =

!MyHdr.ARAccountListID =

!MyHdr.ARAccountFullName =

!MyHdr.TemplateListID =

!MyHdr.TemplateFullName =

MyHdr.TxnDate = lDate

MyHdr.RefNumber = lReference

!MyHdr.BillAddr1 =

!MyHdr.BillAddr2 =

!MyHdr.BillAddr3 =

!MyHdr.BillAddr4 =

!MyHdr.BillAddr5 =

!MyHdr.BillCity =

!MyHdr.BillState =

!MyHdr.BillPostalCode =

!MyHdr.BillCountry =

!MyHdr.BillNote =

!MyHdr.ShipAddr1 =

!MyHdr.ShipAddr2 =

!MyHdr.ShipAddr3 =

!MyHdr.ShipAddr4 =

!MyHdr.ShipAddr5 =

!MyHdr.ShipCity =

!MyHdr.ShipState =

!MyHdr.ShipPostalCode =

!MyHdr.ShipCountry =

!MyHdr.ShipNote =

!MyHdr.IsPending =

!MyHdr.IsFinanceCharge =

MyHdr.PONumber = lPONumber

!MyHdr.TermsListID =

!MyHdr.TermsFullName =

!MyHdr.DueDate =

!MyHdr.SalesRepListID =

!MyHdr.SalesRepFullName =

!MyHdr.FOB =

!MyHdr.ShipDate =

!MyHdr.ShipMethodListID =

!MyHdr.ShipMethodFullName =

!MyHdr.ItemSalesTaxListID =

!MyHdr.ItemSalesTaxFullName =

MyHdr.MemoText = MyMemo

!MyHdr.CustomerMsgListID =

!MyHdr.CustomerMsgFullName =

!MyHdr.IsToBePrinted =

!MyHdr.IsToBeEmailed =

!MyHdr.CustomerSalesTaxCodeListID =

!MyHdr.CustomerSalesTaxCodeFullName =

!MyHdr.Other =

!MyHdr.LinkedTxnID =

5. Post the Invoice

qInvoice.AddTransaction(MyHdr,MyDtl) ! post it

6. Clear and prepare for another Invoice

qInvoice.AddPrep(MyHdr,MyDtl)

.


Invoice Query by Customer

Invoice (Receivable) Query by Customer (Filtering)

 Top Previous Next

You can perform filtered invoice queries using filters. The filters allowed for invoices are:

· Customer
· Date Range

You can also combine these filters.

1. Determine and set the filters:

qInvoice.Filter_CustomerListID = qCustomer.ListID ! Or any other source of the ListID for the customer

qInvoice.Filter_FromDate = today() ! Here we are getting invoices only for today - but we need to set the range

qInvoice.Filter_ToDate = today()

2. Now call the method to retrieve the invoices

qInvoice.GetAll()

3. The invoice data is in the class queues (qInvoice.thdr and qInvoice.tDtl)


Error Handling

We have implemented, as part of the main connection class, a queue to hold error messages.

The queue is defined with 2 fields as:

ClassName cstring(41)

ErrorMsg cstring(251)

Every time an error occurs, an entry is added to the queue.

by default the error queue is defined as:

qConnect.ErrorQ

To quickly determine if there are errors to process:

if qConnect.HasErrors() then

! handle them

end

More to come on this topic.


DLL Functions

DLL Functions

Functions:

Note: All strings are CSTRINGs. You MUST allocate enough space in the string returned data.

QBXml( XMLData ),long | Pass a request in XMLData. No data is returned in XMLData. The result is the size of the data. A cstring is declared of sufficient size. This is a CORE function
QBXmlGetData( *cSTRING ),long | The resulting data from the QBXML request is returned in the cstring variable. The variale must be of sufficient size - at least as big as the value returned by QBXml. This is a CORE function.
QBXmlFile( InputFile, OutputFile ), long | Pass an Input XML file and return the data into file OutputFile.
QBXmlVer1( Results ), long | This calls the QB interface and returns the version information in Results
QBXmlVer2( Results ), long | Same as Ver1
QBXml_debugon(), long | Causes the display of diag info
QBXml_debugoff(), long | Turns off displays
QBXml_setAppInfo(qbxml_license, qbxml_appName, qbxml_appID ) | This function sets the appName and appID. These fields can be entered into the Global App template. The template makes the call at the start of the application.
QBXmlFindReplace(DataString, FindText, ReplaceText ), long | Search and replace
QBXmlSetFile( *cSTRING ),long | Sets the filename for the QuickBooks datafile
QBxmlLastError( *cSTRING ),long | Returns a description of the last error to occur.
QBXmlSetUserMode( *long ),long | set the Usermode
QBXmlGetUserMode(),long | Returns the current use mode
QBXmlSetConnType( *long ),long | Sets the connection type
QBXmlGetConnType(),long | Returns the current connection type
QBXmlGetAuth(*LONG, *LONG,*LONG, *LONG),long | Get's authorization from QuickBooks and establishes that authroization.


Definitions