Taxes Round Down Rather than Up

shanehicks

New Member
I cannot speak for other currencies but In USD our change uses a 2-digit amount. I've noticed that when I calculate the tax portion. I manually ran this payment and recorded it from a Stripe Invoice which rounded up taxes to the nearest whole cent ($10.13). Because of this, payments created a $0.01 credit on the account.

150*6.75%=10.125

Screenshot 2022-04-05 080658.jpg
 
Hi,

I am currently running a local test to then work on a fix.

Thanks for reporting it.
 
Hi,

I have found it was an issue with how javascript language does some calculations with numbers and simple operations.
Aparently, for javascript:
1.0675 - 1 = 0.0674999999999999

I have already solved this issue.

So, just to be clear to know if there are other issues to be fixed for the invoice, would it be possible for you to open a support ticket with us at www.clientexec.com or email us to [email protected] providing there, access to your installation and invoice related to the issue?

Specifically, I would really like to know:

- When you review the list of invoices, which price is it displaying? $160.12 or $160.13
- Stripe actually charged $160.12 or $160.13 ?

If the answer to both questions is $160.13, then that part is fine. The fix I have made is for what you can see in the section where you can edit the invoice, to properly calculate the taxes, avoiding that issue I previously mentioned with javascript not properly calculating the subtraction.

- Was there actually a credit balance of $0.01 added to the client? If so, which version of Clientexec are you using? Because as per what I can see in our code, it should not be happening now. Maybe it was something recently fixed too.
 
Back
Top