Topic: more stuff to look at

Just loaded the latest from unstable, to my test site, and I still have a problem with the price list

At Sales, Reports and Analysis, Price Listing: I set Currency Filter, it works ok, and I set sales type, but the report shows the regular retail price not the price in the sales type selected.

Any Ideas?

I also had a problem making a sale to a customer that was to get the special price in this Price List, but I could not make it work right, but now when I go to Direct Invoice, I get this error: (bellow)  Please let me know what you think?

DATABASE ERROR : could not get POS definition
error code : 1064
error message : 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 'AND pos.pos_location=loc.loc_code AND pos.pos_account=acc.account_code' at line 1
sql that failed was : SELECT pos.*, loc.location_name, acc.bank_account_name, acc.account_code FROM 1_sales_pos as pos,1_locations as loc,1_bank_accounts as acc WHERE id= AND pos.pos_location=loc.loc_code AND pos.pos_account=acc.account_code

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: more stuff to look at

Well, I've just tried to reproduce both the problems, but with no effect.
More info is needed to track it down. Have you pricelist  problems also on stable FA version? At what moment the database error appears?
To use new functionality in unstable you need to upgrade database structure with changes in alter2.1.sql file. Keep in mind that this file can be used directly only for db table set with prefix 0_. If you want to use it to upgrade tables for company 1_ you have to change the prefixes manually.

Janusz

Re: more stuff to look at

itronics wrote:

Well, I've just tried to reproduce both the problems, but with no effect.
More info is needed to track it down. Have you pricelist  problems also on stable FA version?

Yes, I have had this problem all along. 

To use new functionality in unstable you need to upgrade database structure with changes in alter2.1.sql file. Keep in mind that this file can be used directly only for db table set with prefix 0_. If you want to use it to upgrade tables for company 1_ you have to change the prefixes manually.

I thought this might be the case, I made the change, the direct invoice works again.

Janusz

ough

Janusz, yor still have admin rights at fatest.almacennaval.com, you can poke around and try some of this, Price List is z-employee, customer is Markus Dohlen, product is 105B,

There seems to be something funny going on at Inventory Item Sales prices, Item 105B,

Anyway let me know what you think?

AM

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: more stuff to look at

Yes, you are right. Price for [base pricelist/home currency] has bigger priority than price for [user pricelist/home currency]. Just fixed in main CVS trunk (file sales_db.inc), to be merged with unstable branch in near future.
Thanx.

Janusz

Re: more stuff to look at

Janusz

I still have problem with this unstable, I run the alter2.1 on 0_ and 1_

but I still get this error,  What do you think?

DATABASE ERROR : could not get POS definition
error code : 1064
error message : 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 'AND pos.pos_location=loc.loc_code AND pos.pos_account=acc.account_code' at line 1
sql that failed was : SELECT pos.*, loc.location_name, acc.bank_account_name, acc.account_code FROM 1_sales_pos as pos,1_locations as loc,1_bank_accounts as acc WHERE id= AND pos.pos_location=loc.loc_code AND pos.pos_account=acc.account_code

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: more stuff to look at

You had badly updated db structure (there was no POS definitions). Beside this you have not updated all needed source files (fatal error on Direct Invoice page). Please clean up the site before next tests.

Janusz

Re: more stuff to look at

Hello Janusz

Not sure how I got badly updated db structure, I first run alter2.1 with update_db.php, got a small error, so went to myadmin and and pasted it in the sql window, I did get a some small error but... I did 0_ first then 1_ next

What do you think would be the best way to handle this db?

I will update scripts later and come back later,

AM

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: more stuff to look at

There always can be problem after partially not successful upgrade. When some of tables are updated and the rest defined in upgrade script  are not, new errors appear because the properly updated tables cannot be updated again. So the best method is to have backup file prepared in Backup and Restore page before upgrading. Then if something goes wrong you can restore database before next try.

I've just found that on Backup and Restore page we had false success message even if something goes wrong during upgrade. This was confusing and today I uploaded to unstable cvs better version of backup utility. Now after upgrade failure you will have info at which line of source file the problem begun. This is useful of course if you use backup/restore utility to upgrade FA database. If you are using phpmyadmin to do it you have mysql error displayed anyway.

9 (edited by alvin 11/11/2008 12:40:16 am)

Re: more stuff to look at

OK, I went back to see what went wrong with alter2.1, the tables were created ok but none of the rows inserted, ?

I will do a little hand work for now and get back, to ya

AM

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

10 (edited by alvin 11/11/2008 02:26:53 am)

Re: more stuff to look at

I updated the scripts, updated the db by hand, know I get this error at direct sales

Division by zero in file: /hsphere/local/home/alvin101/fatest.almacennaval.com/sales/includes/sales_db.inc at line 106
Division by zero in file: /hsphere/local/home/alvin101/fatest.almacennaval.com/sales/includes/sales_db.inc at line 114

I get the same error at price list, and the list shows 0's

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.