reading boolean (bit) type fields resutls in incorrent data |
Author |
Message |
|
Posted : 2007-03-27 09:45:22 |
when reading boolean fields like Invoice.IsPaid or SalesOrderLine.SalesOrderLineIsManuallyClosed then it does not return the correct value. when looking in QB the IsManuallyClosed field is set to true, however when using the VB Demo app to query the order the field shows as false.
Is there something special that i am missing to read these fields correctly. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-03-27 11:45:42 |
|
|
|
|
Posted : 2007-03-27 20:07:54 |
sry I had to go out and wanted to get something up here quickly before leaving, hence the quick explanation. here is a longer explanation
I have a Quickbooks datafile with 1 sales order which has 10 lines. Looking at the order in the QUickbooks interface it shows that 3 of the lines are manually closed.
When viewing the salesorderline table using the vb demo app supplied with QODBC, it shows that the salesorderlineIsManuallyClosed field has a value of 0 (false) for all 10 lines. I would expect it to show a 1 (true) for the 3 lines that show as closed in Quickbooks interface.
The problem is intermittant and not just related to the IsManuallyClosed field. I have also noticed that other boolean type fields like IsPaid on the Invoice table also report 0 when they should be 1.
This problem happens most often on transactions that have just been inserted using QODBC. I have not yet found a reliable way of getting an accurate result. Even putting UNOPTIMIZED on the sql statement does not always return the correct value. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-03-27 20:26:33 |
IsPaid is a Invoice flag and not a InvoiceLine flag. Likewise IsManuallyClosed and IsFullyInvoiced are SalesOrder flags and not SalesOrderLine flags. These flags are all header table flags even though they can be seen in their transaction line tables, just like shipping addresses which obviously are not in every sales order line etc. Both InvoiceLine and SalesOrderLine contain most of the columns of their header tables along with the actual transaction line details.
The behaviour of the Intuit qbXML SDK is not the same as within QuickBooks. These flags are only true when the whole Invoice is Paid or the whole SalesOrder is invoiced, not individual lines. |
|
|
|
|
Posted : 2007-03-27 20:42:39 |
when I look at the SalesOrderLine table I see the following fields (i have qualified with the table name for clarity)
SalesOrderLine.IsManuallyClosed
SalesOrderLine.SalesOrderLineIsManuallyClosed
It is this second field that I am referring to. due to the field name having the SalesOrderLine prefix I assume that this field is in fact a field on the line rather than a header table field.
I have a similar problem with the IsPaid on the Invoice table (note - invoice table, not the line table in this case) |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-03-27 21:07:10 |
I just closed the first line of this Sales Order:
and then immediately queried the SalesOrderLines for S.O. Number 1006 and SalesOrderLineIsManuallyClosed is true (1) as expected for the first line.
|
|
|
|
|
Posted : 2007-03-29 10:23:20 |
here is some screenshots from our system. it is running QODBC v6.0.0.176 and QuickBooks Premier 2004/2005 NZ.
this first shot shows the Sales Order in Quickbooks with the closed lines. note one line is not closed.
the second picture is a query against the same database for order 396. note that all the SalesOrderLineIsManuallyClosed fields show false.
is this a problem that was present in the older quickbooks but has since been fixed? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-03-29 10:53:02 |
|
|
|