price-format / Jquery-Price-Format

jQuery Price Format Plugin is useful to format input fields and HTML elements as prices. For example, if you type 123456, the plugin updates it to US$ 1,234.56. It is costumizable, so you can use other prefixes, separators, suffixes, plus sign, minus sign and so on. Check out the examples below.
http://price-format.github.io/Jquery-Price-Format/
MIT License
239 stars 118 forks source link

Converts 0.10 to 0.01 #66

Open blacksaheb opened 7 years ago

blacksaheb commented 7 years ago

Hi I am using this plug-in and I have number 0.10 but plug-in converts it to 0.01, Please help need urgent solution.

ricardorueda commented 7 years ago

I have this problem too. Is there any solution?

cuducos commented 7 years ago

Hi @blacksaheb and @ricardorueda — can you provide more details? Otherwise we'll get in the infamous here it works look:

2017-08-28 10_43_46

What OS and browser are you using? Which versions? How are you inputing data (typing, pasting, JS editing the value attribute, etc.)? When the mask fails (on page loading, on type, on paste, etc.)?

ricardorueda commented 7 years ago

@cuducos

I found the error. My query in the database returns the value without 0 (zero). The functionality is ok. Thank you so much.

cuducos commented 7 years ago

@blacksaheb are you still with this issue?

ricardorueda commented 7 years ago

@cuducos

no, thanks

cuducos commented 7 years ago

@ricardorueda: actually I was asking @blacksaheb. Are you replying on their behalf or just got confused? (Don't worry, that might happen with all of us!)

blacksaheb commented 7 years ago

@cuducos, I will let you know tomorrow, coz I don't remember what I have done to fix it

On Aug 28, 2017 10:50 PM, "Eduardo Cuducos" notifications@github.com wrote:

@ricardorueda https://github.com/ricardorueda: actually I was asking @blacksaheb https://github.com/blacksaheb. Are you replying on their behalf or just got confused? (Don't worry, that might happen with all of us!)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flaviosilveira/Jquery-Price-Format/issues/66#issuecomment-325417530, or mute the thread https://github.com/notifications/unsubscribe-auth/AIQMJVrEcku9W872uX-REX0IL-1SCAjEks5scvbxgaJpZM4NWWmK .

ricardorueda commented 7 years ago

Sorry for the confusion. My error error was different from that pointed out by Blacksaheb. In my case it was not formatting correctly. Example: return from database 12.1 => after applying Js 1,21 Blacksaheb's problem was 0.10 to 0.01

Thanks