Balance & Amount Rounding

Hi,

Been trying to solve this rounding issue…

The invoice amount shown on the invoice page is correct i.e. $778.80.

However, after saving the amount became $778.00, in the tables and everywhere, except on the pdf and invoice page.

In debug mode => request_request => array… the balance is shown as “balance”:“779.00”… and amount is shown as “amount”:“778.00”

Then, queries for put is shown correctly as in…

update invoices set updated_at = ‘2019-03-06 19:47:18’, discount = ‘20’, amount = ‘778.8’, balance = ‘778.8’, is_amount_discount = ‘0’, partial = ‘0’, is_public = ‘1’ where id = ‘1’

It’s self-hosted on version 4.5.9.

Please advise.

Much thanks
John Low

Update… Managed to solve the problem found in config/database.php line 62-64…

‘options’ => [
\PDO::ATTR_EMULATE_PREPARES => true
]

Now, all’s working fine.

Thanks.

Thanks for sharing the solution!