Author Topic: formatCurrency  (Read 2889 times)

[email protected]

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 4
    • View Profile
formatCurrency
« on: July 02, 2015, 10:16:30 pm »
allways return positive value even when the original value is negative

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: formatCurrency
« Reply #1 on: July 03, 2015, 12:15:30 am »
it always returns positive value so that custom prefix can be applied easily.

return ((value < 0) ? "-" : "") + "$" + $.paramquery.formatCurrency( value );