Open tofdragon opened 8 years ago
@tofdragon If you want to use a different decimal value, use settings:
accounting.settings = { number: { decimal: "*"}}
and then, when you do
accounting.unformat(123*456) = 123.456
Use the accouting.js file instead of the accounting.min.js There seems to be some issue with the accounting.min.js, it does not handle this correctly
@Lakshmi-Sharma Thank you for your advice
I have to modify the source code to
var formatNumber = lib.formatNumber = lib.format = function(number, precision, thousand, decimal) { ....................... //add decimal parameter number = unformat(number, decimal); ....................... }
The basic test is normal。But don't know how the author's intention, don't know is a bug, or the authors have other meanings
@tofdragon If you change it in the settings, you shouldn't have to add it as a parameter.
@Lakshmi-Sharma This is a global, in a page will have multiple influence each other
source: var formatNumber = lib.formatNumber = lib.format = function(number, precision, thousand, decimal) { ....................... number = unformat(number); ....................... }
Why don't unformat passing parameters to a decimal? unformat(number, decimal) ? decimal Is not equal to . 。There will be a problem