Forum

Double read as integer, prices multiplied by 10000

Yayınlanan kategoriDevelopment
  • Stan Derksen    ( User ) 2 months 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 ) 2 months ago
    This is only for invoices, my bank accounts show the correct number.
  • Stan Derksen    ( User ) 2 months ago
    Correction: bank accounts are the only place that shows it correctly. E.g. transfers also shows the wrong amount.
  • Stan Derksen    ( User ) 2 months ago
    Additional information: this problem happens on my server with MySQL. On my old server with MariaDB this does not happen.
  • Denis Duliçi    ( Admin ) 2 months ago
    Can you try to update your MySQL version?
  • Stan Derksen    ( User ) 2 months ago
    I cannot. It's a shared server.
  • Stan Derksen    ( User ) 2 months ago
    Also, Akaunting's requirement page does not list a MySQL version as requirement.
  • Stan Derksen    ( User ) 2 months ago
    Any other solution?
  • Denis Duliçi    ( Admin ) 2 months ago
    Ask your hosting provider to install and enable mysqlnd (MySQL Native Driver).
  • Stan Derksen    ( User ) 2 months ago
    Thanks, that helped! The PHP extension mysqlnd was already enabled, however: I needed to disable pdo_mysql and enable nd_pdo_mysql.

Lütfen, cevap vermek için giriş yapın veya kayıt olun.