Home Forums Support Balance & Amount Rounding

This topic contains 2 replies, has 2 voices, and was last updated by  Hillel Coren 6 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19898

    johnlowsg
    Participant

    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

    #19904

    johnlowsg
    Participant

    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.

    • This reply was modified 6 months, 2 weeks ago by  johnlowsg.
    #19910

    Hillel Coren
    Keymaster

    Thanks for sharing the solution!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Posted in: