I am working with quickbooks 2009 and am getting the following errors when trying to export data to quickbooks:

First I get:

QB responded to a request with error #500 (The query request has not been fully completed. There was a required element ("Inventory Asset") that could not be found in QuickBooks.)

for each order. Then I get:

QB responded to a request with error #3231 (The request has not been processed.)

Very grateful for any help.

Comments

hvitebjorn’s picture

Fixed this issue (thanks j_ten_man). Solution: Make sure the following accounts are enabled in QB - Merchandize Sales, Merchant Account Fees, Inventory Asset.

But still getting errors:

First, a bunch of error #500 saying

QB responded to a request with error #500 (The query request has not been fully completed. There was a required element ("Raj_WideZZagScarves_Orange/PinkMulti") that could not be found in QuickBooks.)

Where the actual element names (like “Raj_WideZZagScarves_Orange/PinkMulti “ above) are all the different SKUs from ubercart. Then, a bunch of

QB responded to a request with error #3231 (The request has not been processed.)

Then, a bunch of

Failed to export order #28 because some or all of the purchased products could not be created/found in QB.

and

Order #61 failed to get exported to QB because the user did not exist in (failed to create properly) inside QB.

Looks like some exports failed because all customers weren't exported correctly (looks like less than half the customers were exported correctly), and the remaining orders failed because no products were created/exported.

So what I have in QB after running the export is some of the customers (email addresses only), none of the inventory and no transactions.

Any ideas?

j_ten_man’s picture

This is the exact error I was getting. I know you saw this issue, but just to make a note of it here: http://drupal.org/node/327820. So the model is what it says is the error, but that isn't really the issue. I think the issue is due to taxes not being turned on (I know it doesn't make sense at all). Look at the requirements at about line 461 and make sure they are for sure enabled.

hvitebjorn’s picture

Yes I do have sales tax turned on. The response from QB to the first query is included below.

Looks like the requests to add the inventory is being built (around line 380) and added to the queue with

$_SESSION['qb_pending_requests'][] = $new;

(around line 490), but never executed. Help?

<QBXML>
<QBXMLMsgsRs>
<AccountQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK" retCount="1" />
<AccountQueryRs requestID="2" statusCode="0" statusSeverity="Info" statusMessage="Status OK" retCount="1" />
<AccountQueryRs requestID="3" statusCode="0" statusSeverity="Info" statusMessage="Status OK" retCount="1" />
<PreferencesQueryRs requestID="4" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<PreferencesRet>
<PurchasesAndVendorsPreferences>
<IsUsingInventory>true</IsUsingInventory>
<DaysBillsAreDue>10</DaysBillsAreDue>
<IsAutomaticallyUsingDiscounts>false</IsAutomaticallyUsingDiscounts>
</PurchasesAndVendorsPreferences>
<SalesTaxPreferences>
<DefaultItemSalesTaxRef>
<ListID>80000008-1231529343</ListID>
<FullName>CA sales tax</FullName>
</DefaultItemSalesTaxRef>
<PaySalesTax>Quarterly</PaySalesTax>
<DefaultTaxableSalesTaxCodeRef>
<ListID>80000001-1231364797</ListID>
<FullName>Tax</FullName>
</DefaultTaxableSalesTaxCodeRef>
<DefaultNonTaxableSalesTaxCodeRef>
<ListID>80000002-1231364797</ListID>
<FullName>Non</FullName>
</DefaultNonTaxableSalesTaxCodeRef>
</SalesTaxPreferences>
</PreferencesRet>
</PreferencesQueryRs>
<ItemInventoryQueryRs requestID="5" statusCode="500" statusSeverity="Warn" statusMessage="The query request has not been fully completed. There was a required element ("wewt1") that could not be found in QuickBooks." retCount="0" />
<ItemInventoryQueryRs requestID="6" statusCode="500" statusSeverity="Warn" statusMessage="The query request has not been fully completed. There was a required element ("wewt4") that could not be found in QuickBooks." retCount="0" />
<ItemInventoryQueryRs requestID="7" statusCode="500" statusSeverity="Warn" statusMessage="The query request has not been fully completed. There was a required element ("sjspsb") that could not be found in QuickBooks." retCount="0" />
....
....
...

hvitebjorn’s picture

duplicate

j_ten_man’s picture

Do you have a copy of the requests for wewt1, wewt4, etc.? Could you just put one of those out here and I'll take a look at that and see if I can figure it out.

hvitebjorn’s picture

Thanks, here's the initial request:

<?xml version="1.0"?>
<?qbxml version="5.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<AccountQueryRq metaData="MetaDataOnly" requestID="1">
<FullName>Merchandise Sales</FullName>
</AccountQueryRq>
<AccountQueryRq metaData="MetaDataOnly" requestID="2">
<FullName>Merchant Account Fees</FullName>
</AccountQueryRq>
<AccountQueryRq metaData="MetaDataOnly" requestID="3">
<FullName>Inventory Asset</FullName>
</AccountQueryRq>
<PreferencesQueryRq requestID="4">
<IncludeRetElement>SalesTaxPreferences</IncludeRetElement>
<IncludeRetElement>PurchasesAndVendorsPreferences</IncludeRetElement>
</PreferencesQueryRq>
<ItemInventoryQueryRq metaData="MetaDataAndResponseData" requestID="5">
<FullName>wewt1</FullName>
<IncludeRetElement>ListID</IncludeRetElement>
<IncludeRetElement>Name</IncludeRetElement>
<IncludeRetElement>SalesPrice</IncludeRetElement>
<IncludeRetElement>EditSequence</IncludeRetElement>
</ItemInventoryQueryRq>
<ItemInventoryQueryRq metaData="MetaDataAndResponseData" requestID="6">
<FullName>wewt4</FullName>
<IncludeRetElement>ListID</IncludeRetElement>
<IncludeRetElement>Name</IncludeRetElement>
<IncludeRetElement>SalesPrice</IncludeRetElement>
<IncludeRetElement>EditSequence</IncludeRetElement>
</ItemInventoryQueryRq>
<ItemInventoryQueryRq metaData="MetaDataAndResponseData" requestID="7">
<FullName>sjspsb</FullName>
<IncludeRetElement>ListID</IncludeRetElement>
<IncludeRetElement>Name</IncludeRetElement>
<IncludeRetElement>SalesPrice</IncludeRetElement>
<IncludeRetElement>EditSequence</IncludeRetElement>
</ItemInventoryQueryRq>
<ItemInventoryQueryRq metaData="MetaDataAndResponseData" requestID="8">
<FullName>piojkjd10</FullName>
<IncludeRetElement>ListID</IncludeRetElement>
<IncludeRetElement>Name</IncludeRetElement>
<IncludeRetElement>SalesPrice</IncludeRetElement>
<IncludeRetElement>EditSequence</IncludeRetElement>
</ItemInventoryQueryRq>
<ItemInventoryQueryRq metaData="MetaDataAndResponseData" requestID="9">
<FullName>wklsc1</FullName>
<IncludeRetElement>ListID</IncludeRetElement>
<IncludeRetElement>Name</IncludeRetElement>
<IncludeRetElement>SalesPrice</IncludeRetElement>
<IncludeRetElement>EditSequence</IncludeRetElement>
</ItemInventoryQueryRq>
...
...
...

hvitebjorn’s picture

Fixed this issue, it was due to the memory limit for PHP was set to 48M which was too low.

millenniumtree’s picture

This should go into the 'requirements' system. imageapi_gd uses a requirements system in imageapi_gd.install to gently suggest that the user bump up the memory limit to 96M. Maybe uc_qb should do the same?

Here, for example, is the code that does it in imageapi_gd (for Drupal 6.x)

    $memory_limit = ini_get('memory_limit');
    if (parse_size($memory_limit) < parse_size('96M')) {
      $requirements['imagecache_memory_limit'] = array(
        'title' => $t('ImageAPI GD Memory Limit'),
        'value' => $memory_limit,
        'severity' => REQUIREMENT_WARNING,
        'description' => $t('It is highly recommended that you set you PHP memory_limit to 96M to use ImageAPI GD. A 1600x1200 images consumes ~45M of memory when decompressed and there are instances where ImageAPI GD is operating on two decompressed images at once.'),
      );
    }