Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error changing category in Stocks.php (v 4.06.6)
01-30-2012, 07:44 PM,
#1
Error changing category in Stocks.php (v 4.06.6)
Hi:
Attempting to change the stock category for one item gave us the following error:

Database Error : The stock cost journal could not be inserted because
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 14
Database SQL Failure : The SQL that was used to create the stock cost journal and failed was
INSERT INTO gltrans (type, typeno, trandate, periodno, account, narrative, amount) VALUES ( 0, '925', '2012-01-30', '34', '', 'BSPE12 Change stock category', '0'

Even if the error was displayed, It DID change the stock category.

Stock category has all GL accounts properly set, so I can't understand why the SQL insert has an empty account.

NO record was inserted to gltrans table.
Regards,
Pak Ricard
Reply
01-31-2012, 06:52 AM,
#2
RE: Error changing category in Stocks.php (v 4.06.6)
Would be worth checking that the old category and the new category have the same GL stock account - this journal is meant to keep the stock value in the GL the same as the the category GL report. Overall it would not be a biggie as all the stock accounts combined should be ok.

I will try to knock over this, the price issue and the PO lines issue this weekend.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
01-31-2012, 08:25 AM,
#3
RE: Error changing category in Stocks.php (v 4.06.6)
I fixed missing ')' in insert SQLs not too long ago. There were many of them in this file.
Reply
01-31-2012, 09:52 AM, (This post was last modified: 01-31-2012, 09:54 AM by phil.)
#4
RE: Error changing category in Stocks.php (v 4.06.6)
On line 418 of Stocks.php

'" . $NewStockAccount . "'

should be:

'" . $NewStockAct . "'

will apply to svn later

Ricard, you may well have an out of balance TB as a result of this... check Z_index.php for out of balance GL trans - you will need to either delete the one legged entry and repost or add the other leg and repost.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
01-31-2012, 01:40 PM,
#5
RE: Error changing category in Stocks.php (v 4.06.6)
Thanks Phil: I checked gltrans just after the error and no records were added to gltrans, so should be OK.
Regards,
Pak Ricard
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)