Commit ab02bcd1 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Fix float precision for numbers < 1

parent ec724ce6
......@@ -214,7 +214,7 @@ trackmybank.getStringAmount = function(amount) {
comma = number.length;
}
}
return parseFloat(number).toPrecision(comma + 2);
return parseFloat(number).toPrecision(comma + (comma >= 2 ? 2 : 1));
};
trackmybank.getTotal = function(nbSubTr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment