Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Double read as integer, prices multiplied by 10000

Stan Derksen   ( User )

Commented 3 years ago

Currently all my prices are multiplied by 10000. It looks like Akaunting reads the double as an integer, as the doubles are stored with a precision of 4 zeros. (1.00 will be stored as 1.0000 in the database and the server reads 10000 so it translates it to 10000.00).

PHP: 7.4
Akaunting: 2.0.25
MySQL: 5.7.31-cll-lve

Stan Derksen   ( User )

Commented 3 years ago

This is only for invoices, my bank accounts show the correct number.

Stan Derksen   ( User )

Commented 3 years ago

Correction: bank accounts are the only place that shows it correctly. E.g. transfers also shows the wrong amount.

Stan Derksen   ( User )

Commented 3 years ago

Additional information: this problem happens on my server with MySQL. On my old server with MariaDB this does not happen.

Denis Dulici   ( Admin )

Commented 3 years ago

Can you try to update your MySQL version?

Stan Derksen   ( User )

Commented 3 years ago

I cannot. It's a shared server.

Stan Derksen   ( User )

Commented 3 years ago

Also, Akaunting's requirement page does not list a MySQL version as requirement.

Stan Derksen   ( User )

Commented 3 years ago

Any other solution?

Denis Dulici   ( Admin )

Commented 3 years ago

Ask your hosting provider to install and enable mysqlnd (MySQL Native Driver).

Stan Derksen   ( User )

Commented 3 years ago

Thanks, that helped! The PHP extension mysqlnd was already enabled, however: I needed to disable pdo_mysql and enable nd_pdo_mysql.

Please login or register to leave a response.

Showing 1 to 10 of 10 discussions