Zen Cart Logo

Quickbook Sync

Views: 91,783

Results 101 to 120 of 283
13 Oct 2009, 06:51
#101
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Quickbook Sync

deere20 -- Customers can be added or not added depending on your settings and whether or not you choose to add all existing customers when you installed the mod using the setting in the SQL update file. Got your PM -- I'll help you via email further.

fatbird -- Someone PMed me and suggested that your problem might have to do with mb_string -- apparently this function isn't enabled with all versions of PHP. QBSync relies heavily on mb_string, so you'll need to verify that it is installed for your version of PHP. More info here:

http://www.php.net/mbstring

16 Oct 2009, 10:21
#102
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

I'm setting up QB Sync v 2 with a new version of QB Pro 2008 (UK). I've followed the installation guide and have sucessfully run a Web Services sync session. However, no data seems to get into Quickbooks and the error log shows:

There is an invalid reference to QuickBooks Account quot;Cost of Goods Soldquot; in the Items.  QuickBooks error message: Invalid argument.  The specified record does not exist in the list.

Any ideas?

16 Oct 2009, 22:12
#103
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Quickbook Sync

The accounts you setup in ZC must match in QB. Go to Admin->Configuration->QBSync and change this value to whatever account you have setup in quickbooks.

19 Oct 2009, 20:31
#104
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

Thanks for the advice. The names were slightly different, rectified now. The next problem I have is that only 52 items from my inventory are being imported, but without stock quantities and none of the sales receipts. Is there a switch somewhere to force the import of all items and sales receipts?

20 Oct 2009, 06:18
#105
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Quickbook Sync

pglock -- Strange that only 52 items were imported. Yes, there is a switch to force items and orders and customers to export the first time. After that, all new items and orders are marked as 0 (not imported) and will be exported as long as you set it up to do so in ZC Admin->Config->QBSync. This was done when you installed the SQL patch, and instructions are in the manual -- basically anything set to 0 will export and then change to 1 once exported. See the manual and the SQL patch for more details....

BUT....I'd wager a guess that this is not your problem. It sounds like the first 52 items are exporting, and then there is an error, and it can't proceed. The order of operations is to export customers, then items, then orders. So it seems to me as though your customers exported fine, but then during the item export something went wrong. Check your logs in ZC Admin -- I'll bet there is an error on the last one that caused it to stop exporting. Remember -- if ANYTHING doesn't match up in QB with what you have in ZC, you'll get errors. Make sure you've got all your bases covered with matching.

21 Oct 2009, 20:23
#106
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

I've gone through the logs and the database. It seems there are no customers being imported. The products that have imported have a '1' in the quickbooks field (the desired behaviour). There is nothing in the logs, the session completes normally with no errors.

Any ideas?

22 Oct 2009, 01:54
#107
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Quickbook Sync

Make sure Admin->Configuration->QB Sync->add products to quickbooks is set to 2

Then, check the value of quickbooks in table orders. After the 52nd one that imported is the next one "0" or is it "1"? It will only export if the 53rd and on are "0" NOT "1" like the ones that have already exported.

If that doesn't fix it, try change the 53rd product (they go in order by id) value for quickbooks to "1". This will skip the product that is causing the problem, and then the rest of the products should export normally. Not sure why that 53rd one is causing a problem... If that fixes it, you may want to post the table data for that product, as I may be able to figure out why it won't import and fix a bug.

One last thought -- are you sure that all the accounts are matched correctly? Perhaps you changed one of the settings inbetween the 52nd and 53rd item and now the accounts don't match ZC to QB.

Strange that you don't get an error though...

By the way, now that I think about it -- items may be added first before customers...can't quite remember. Obviously orders would be last though! Its been awhile since I worked on this mod!

22 Oct 2009, 21:07
#108
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

I think I'm gradually getting to the bottom of this. The records in 'zen_products' that the import chokes on have 'manufacturer_id' as NULL rather than the default '0'. I've forced all entries to '0' and now the import seems to be progressing further. I'll update when the 000's of records are either imported or it bombs again...

23 Oct 2009, 18:37
#109
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

pglock:

I'll update when the 000's of records are either imported or it bombs again...
It's still importing, times out now and again but restarts ok. One other 'gotcha' that I've found is that Quickbooks doesn't like customer names with a ':' in them e.g. 'Attn: P Smith'. I've changed all those as well.

23 Oct 2009, 18:42
#110
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

One other question while I'm waiting for the first import to complete. If one of the tables hasn't imported correctly, as I suspect that not all the products made it through one timeout, can I just reimport by setting the table entry to 'quickbooks' to '0'?

25 Oct 2009, 23:04
#111
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

The import of items has completed, customers bombed out with an error of ```
2008 MySQL client ran out of memory
in:
[SELECT * FROM zen_quickbooks_log WHERE ticket = '0e77c6150b99cf0a5534c88343b4acc2' ORDER BY id DESC]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Since then each time I kick off a qwc session I get an authentication error of ```
the operation has timed out

The other thing I got was a message from Quickbooks that I was approaching the list limit of 14,500. Not sure if this could be a problem given that in the tables I have 11,649 customers, 11,625 orders and 1,776 products :oops:

26 Oct 2009, 07:57
#112
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Quickbook Sync

pglock:

The quickbooks value will not change to 1 unless a successful export has occurred, so don't worry about it. When you restart QBSync, it will pick up where it left off.

Yes, timeouts do happen sometimes -- I've noticed the same thing. We can't do much about this, as our servers control this. But, its only a minor annoyance and won't occur very often with small exports if you continue to use QBSync regularly.

Yes, you are correct. The way it was written it should have problems if the manufacturer is set to NULL. To fix it find this line:

$manuf = $this->db->Execute('SELECT * FROM '.TABLE_MANUFACTURERS.' WHERE manufacturers_id = '.$products->fields['manufacturers_id']);

and add this line just before it:

if (QBS_PREFERRED_VENDOR == 1 && $products->fields['manufacturers_id'] != NULL)

Then find this line twice:

if (QBS_PREFERRED_VENDOR == 1)

and change it both times to this line:

if (QBS_PREFERRED_VENDOR == 1 && $products->fields['manufacturers_id'] != NULL)

I'll change this code the next time I work on this, but if anyone else if having this problem in the meantime, that is the fix.

Another bug you found was with the : in the customer name. To fix that, find this line:

$listName = strtoupper(str_replace(array('{lastname}','{firstname}','{zc_customerid}'),array($customer->fields['customers_lastname'],$customer->fields['customers_firstname'], $zenCustID),QBS_CUSTOMER_NAME_FORMAT));

and change it to this

$listName = strtoupper(str_replace(array('{lastname}','{firstname}','{zc_customerid}',':'),array($customer->fields['customers_lastname'],$customer->fields['customers_firstname'], $zenCustID,''),QBS_CUSTOMER_NAME_FORMAT));

Then you need to go through the whole code and search for this:

strtoupper(str_replace(array('{lastname}','{firstname}','{zc_customerid}')

Everytime you find an instance of this, you need to do the same thing you did for the last change -> add ,':' to the end of the first array, and add ,'' to the end of the second array. This should fix this issue. Again, I'll make these changes the next time i get a chance to work on this, but in the meantime, that is how to fix this problem.

Lastly, the error you are describing is caused when the email error log is sent. It looks like too much memory is being used when this email is being sent. Try turning off email error reporting. However, this won't fix your problem -- it will just alleviate the symptom. Something else is causing a problem, otherwise it wouldn't be sending the error log in the first place. However, if I were a betting man, I would guess that your problem is that your server isn't allowing you to access enough memory for all the SQL communication required for QBSync to work considering how many customers, orders, and items you have. Try turning off Continuing Sync, as this should significantly reduce the number of SQL queries required for QBSync to work.

27 Oct 2009, 10:14
#113
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

Thanks for the comprehensive reply. I'll work through the changes and turn CS off for now. A more fundamental issue is that QB Pro 2008 only supports a total of 14,500 items so I'll have to cut down the number of items to be imported before trying again.

07 Nov 2009, 19:08
#114
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

A quick update. I've worked out how to solve the 14,500 problem by merging the older customer records together and only importing the last year and this years sales [our year end is August] by applying the following SQL to the database:

UPDATE `zen_orders` SET `quickbooks` = 0 WHERE `date_purchased` > 2008-09-01

Now for the code changes you suggested...

08 Nov 2009, 19:31
#115
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

I think it's time to look for some more help. I've managed to import customers from the last two years and a full item list. It also appears that the transactions from the last two years have imported as the quickbooks entry for all records in zen_orders is now set to '1'.

However, no transactions show up in QB.

There are multiple errors in the logs, mostly to do with missing payment methods and tax codes. I've updated Quickbooks where necessary and made the linkages in qbMatch.

I'm still seeing errors (log attached). Any ideas? Or is it time to start paying for some consulting?

08 Nov 2009, 23:26
#116
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Quickbook Sync

It looks like your problem lies in matching. There is no sales tax called "Sales Tax:" in your QB file. Check your sales tax name in QB and change it on the matching page. It must match exactly.

29 Nov 2009, 15:42
#117
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

I'm still at it, trying to get the matching to work. The current problem is that I get this error:

Error:There is an invalid reference to QuickBooks SalesReceiptLine
SalesTaxCode "TAX" in the SalesReceipt line.  QuickBooks error message:
Invalid argument.  The specified record does not exist in the list.

But I have added a line in QBsync match for TAX => Standard Sales.

Our store is based in the UK so our tax rates are either 15% VAT or Zero-Rated. In QB, I have set 'Standard Sales' to be VAT at 15% and 'Zero-Rated Sales' to be exempt from tax. My match table looks like:

Pass Through = Name

Zen Cart	Quickbooks
TAX           Standard Sales
NON 	         Zero-Rated Sales
Sates Tax: Zero-Rated Sales
UK VAT      Standard Sales
*               Standard Sales

To me, this looks like the only entires for 'SalesTaxCode' that should be passed to QB are 'Standard Sales' or 'Zero-Rated Sales'. Any idea why is 'TAX' being passed through?

29 Nov 2009, 19:58
#118
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Quickbook Sync

First, thanks to the original author the_ancient and the 2.0 author srturner47 for all their work bringing this mod to us.

I've been able to get it working and it now imports customers and products correctly, but it has an error I can not work out with bringing the invoices into QB.

When the XML is constructed for the invoice you do the following:

<CustomerRef>
                        ');
                if ($Cust_List_ID == '')
                        $xml .= ('							<FullName>'.removeaccents($fullName,209).'</FullName>
                                 ');
                else
                        $xml .= ('							<ListID>'.$Cust_List_ID.'</ListID>
                                 ');
                $xml .= ('			
</CustomerRef>

The customer list ID is correctly filled in(80000005-1259481024), but when it tries to sync with QB it gives the following error:

SimpleXMLElement Object
(
    [QBXMLMsgsRs] => SimpleXMLElement Object
        (
            [CustomerModRs] => SimpleXMLElement Object
                (
                    [@attributes] => Array
                        (
                            [statusCode] => 3120
                            [statusSeverity] => Error
                            [statusMessage] => Object quot;80000005-1259481024quot; specified in the request cannot be found.  QuickBooks error message: Invalid argument.  The specified record does not exist in the list.

I can provide more details if you need them.

Thanks.

Bill

29 Nov 2009, 20:20
#119
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: Quickbook Sync

sorry, typo in post #117 'Sates Tax' should be 'Sales Tax'/

30 Nov 2009, 03:51
#120
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Quickbook Sync

bpryor:

I've been able to get it working and it now imports customers and products correctly, but it has an error I can not work out with bringing the invoices into QB.

Forget that post. What I think I've figured out is that when that order was first sent it had an error, so the ListID was put in the Zencart DB, but it actually didn't succeed so when it tried to update it the ListID had not been added to QB.

I am still having problems but I think until I get the other errors figured out, mostly to do with matching, I can't trust the other errors.

BTW, I still cannot figure out how to determine exactly what a shipping method's name is in QB, so it's turning out to be almost impossible to get Zencart and QB to match.