Functions9 public, 1 private

Wraps ColdFusion's lsCurrencyFormat() and changes the rounding mode from HALF-EVEN to HALF-UP.
publicstringaltCurrencyFormat
requirednumericvalue
stringtypelocal
publicstringbeautifyAmount
requiredstringamount
publicstringcurrencyFormatHtml
requirednumericnumber
"LOCAL", "INTERNATIONAL", "NONE"typeLOCAL
anylocale
publicnumericgetTaxFactor
requiredstringgroup
requiredstringcountry
datedatenow()
publicnumericgetTaxRate
requiredstringgroup
requiredstringcountry
datedatenow()
publicnumericgetTaxAmount
requirednumericamount
requiredstringgroup
requiredstringcountry
datedatenow()
Rounds the provided numeric value to two decimal places with rounding mode HALF-EVEN.
publicnumericroundMoney
requirednumericvalue
Rounds the provided amount based on human price perception.
publicnumericroundToSmartAmount
requirednumericvalue
structOPTIONS{}
optionnumericroundTarget9
DOWN: go down to the closest target MIX: choose "DOWN" or "UP" based on the last digit being lte or gt [roundDownThreshold] UP: go up to the closest target
optionDOWN, MIX, UProundModeMIX
round down when the last digit is less or equal to the specified value, only applied when [roundMode] is "MIX"
optionnumericroundDownThreshold4
allow price figures such as 1.23, 3.21 or 7.77
optionbooleanallowFigurefalse
Wraps the provided numeric value with stylable spans.
publicstringstyleAmount
requirednumericamount
stringcurrencyFormatLOCAL