MT#10061 Fix rounding for invoices.

changes/52/552/1
Irina Peshinskaya 11 years ago
parent 9a06328baf
commit 4ffac12e47

@ -132,7 +132,7 @@
base = 10;
full = Math.int(amount / 100);
# -2 because now amount is in cents, so we need to shift to signs amount, additional to current 2.
cent = ( ( amount - full ) * ( base.power( money_signs - 2) ) );
cent = ( ( amount - full*100 ) * ( base.power( money_signs - 2) ) );
cents = String.new(cent);
cents = cents.format("%.0f",cents);
cents_format_string = "%0" _ money_signs _ "d";

Loading…
Cancel
Save