Questions tagged [accounting.js]

accounting.js is a tiny JavaScript library,providing simple and advanced number, money and currency formatting.

About

accounting.js is a tiny JavaScript library for number, money and currency parsing/formatting. It's lightweight, fully localisable, has no dependencies, and works great client-side or server-side.

Links

9 questions
1
vote
0 answers

Using the accounting.FormatMoney with negative values, Accounting.js

I have a question about the use of accountingMoney.FormatMoney in Accounting.js. If I am passing a negative value into a field in this format: $('#newModFund4587').val(accounting.formatMoney(fund4587)); NewModFund4587 is a text box that can be…
hammerva
  • 129
  • 1
  • 14
1
vote
0 answers

jQuery keyup or blur with accounting.js

I am using accounting.js (along with bindWithDelay.js) to format a number on keyup or blur. The issue is that when I input in the textbox the second time to modify the number, the plugin formats the number incorrectly the second time. For example,…
input
  • 7,503
  • 25
  • 93
  • 150
1
vote
4 answers

Vuejs 2 Using accounting.js

Since the currency filter is deprecated in vue2 I need to import/ use external library accounting.js But I'm facing problem to use accounting.js in my component. The console show error like this: [Vue warn]: Property or method "accounting" is not…
hendra1
  • 1,359
  • 1
  • 15
  • 24
1
vote
2 answers

accounting.js keeps cursor at end for decimal values

I am using accoungting.js plugin to format currency. The only problem is, it places cursor at the end of the value as soon as type anything and since I've kept 2 decimal value precision for currency it stops me from typing more. I did not find any…
Guruprasad J Rao
  • 29,410
  • 14
  • 101
  • 200
0
votes
0 answers

How does the noConflict method work in a library (accounting.js library)?

This is the code (specifically, 398 to 407): https://github.com/openexchangerates/accounting.js/blob/master/accounting.js#L403 I don't understand this method: // Use accounting.noConflict to restore `accounting` back to its original value. //…
SRCP
  • 224
  • 2
  • 10
0
votes
2 answers

How to add decimal point to decimal number in accounting.js?

I'm working on a Point of Sale and I am using accounting.js to format a number on the amount that is being tendered in the payment module. Apparently I want the field to have a floating value so I have this virtual numpad that when clicked it will…
leonardeveloper
  • 1,813
  • 1
  • 34
  • 58
0
votes
1 answer

Typings isn't working (TypeScript)

I have using this lib in my code Lib I added typings for it in project like this https://www.npmjs.com/package/@types/accounting And include it in .ts file like this import accounting from "accounting"; I see typings under…
Balance
  • 551
  • 2
  • 10
  • 23
0
votes
1 answer

AcountingJs: Converting string into currency

I'm using AccountingJs to format currency, but not always the values that work are in the house of thousands. I also need to convert variables to hundreds, like $ 234.45 The problem is that this and other plugins and JS methods I've tried always…
0
votes
1 answer

How to transmit an arguments object to a function?

I'm working with handlebars.js and I'd like to format some numbers with a helper. To format a number I've found the accounting.js library that seems to meet my expectations. To format a number I can use: // Simple `format` string allows control of…
Christophe
  • 2,131
  • 2
  • 21
  • 35