I have one form in my project to calculate the Change from what a customer paid. There are fields of Subtotal, Tax, Total, Paid and Change. All the fields are set in Currency format. My users complain there is 1 cent difference in the Change field from the computer calculation occasionally. Here is the real example:
Subtotal: $47.50
Tax (5%): $2.38
Total: $49.88
Paid: $50
Change: $0.13
I know the problem is because of the round up in the Tax field (2.375 ---> 2.38). However, from the view point of users, they fell hte computer calculating it wrong. The change should be 0.12, instead of 0.13. I understand what they feel.
Is there any code I can command the Change field be calculate directly as (50-49.88)= 0.12 instead (50-49.875)
=0.125 --> and end up to be rounded up as 0.13?
I appreciate your help.
Vast
Subtotal: $47.50
Tax (5%): $2.38
Total: $49.88
Paid: $50
Change: $0.13
I know the problem is because of the round up in the Tax field (2.375 ---> 2.38). However, from the view point of users, they fell hte computer calculating it wrong. The change should be 0.12, instead of 0.13. I understand what they feel.
Is there any code I can command the Change field be calculate directly as (50-49.88)= 0.12 instead (50-49.875)
=0.125 --> and end up to be rounded up as 0.13?
I appreciate your help.
Vast