Browse Source

add accounting currency formatting logic + function

joeybloggs 9 years ago
parent
commit
aaa28727a7
100 changed files with 7757 additions and 14 deletions
  1. 79 0
      af/af.go
  2. 79 0
      af_NA/af_NA.go
  3. 79 0
      af_ZA/af_ZA.go
  4. 73 0
      agq/agq.go
  5. 73 0
      agq_CM/agq_CM.go
  6. 70 0
      ak/ak.go
  7. 70 0
      ak_GH/ak_GH.go
  8. 76 0
      am/am.go
  9. 76 0
      am_ET/am_ET.go
  10. 84 0
      ar/ar.go
  11. 84 0
      ar_001/ar_001.go
  12. 84 0
      ar_AE/ar_AE.go
  13. 84 0
      ar_BH/ar_BH.go
  14. 84 0
      ar_DJ/ar_DJ.go
  15. 78 0
      ar_DZ/ar_DZ.go
  16. 84 0
      ar_EG/ar_EG.go
  17. 84 0
      ar_EH/ar_EH.go
  18. 84 0
      ar_ER/ar_ER.go
  19. 84 0
      ar_IL/ar_IL.go
  20. 84 0
      ar_IQ/ar_IQ.go
  21. 84 0
      ar_JO/ar_JO.go
  22. 84 0
      ar_KM/ar_KM.go
  23. 84 0
      ar_KW/ar_KW.go
  24. 78 0
      ar_LB/ar_LB.go
  25. 78 0
      ar_LY/ar_LY.go
  26. 78 0
      ar_MA/ar_MA.go
  27. 78 0
      ar_MR/ar_MR.go
  28. 84 0
      ar_OM/ar_OM.go
  29. 84 0
      ar_PS/ar_PS.go
  30. 84 0
      ar_QA/ar_QA.go
  31. 84 0
      ar_SA/ar_SA.go
  32. 84 0
      ar_SD/ar_SD.go
  33. 84 0
      ar_SO/ar_SO.go
  34. 84 0
      ar_SS/ar_SS.go
  35. 84 0
      ar_SY/ar_SY.go
  36. 84 0
      ar_TD/ar_TD.go
  37. 78 0
      ar_TN/ar_TN.go
  38. 84 0
      ar_YE/ar_YE.go
  39. 93 0
      as/as.go
  40. 93 0
      as_IN/as_IN.go
  41. 80 0
      asa/asa.go
  42. 80 0
      asa_TZ/asa_TZ.go
  43. 80 0
      ast/ast.go
  44. 80 0
      ast_ES/ast_ES.go
  45. 77 1
      az/az.go
  46. 77 1
      az_Cyrl/az_Cyrl.go
  47. 76 0
      az_Cyrl_AZ/az_Cyrl_AZ.go
  48. 77 1
      az_Latn/az_Latn.go
  49. 77 1
      az_Latn_AZ/az_Latn_AZ.go
  50. 77 0
      bas/bas.go
  51. 77 0
      bas_CM/bas_CM.go
  52. 79 0
      be/be.go
  53. 80 1
      be_BY/be_BY.go
  54. 82 0
      bem/bem.go
  55. 82 0
      bem_ZM/bem_ZM.go
  56. 76 0
      bez/bez.go
  57. 76 0
      bez_TZ/bez_TZ.go
  58. 77 0
      bg/bg.go
  59. 77 0
      bg_BG/bg_BG.go
  60. 82 0
      bm/bm.go
  61. 82 0
      bm_ML/bm_ML.go
  62. 87 0
      bn/bn.go
  63. 87 0
      bn_BD/bn_BD.go
  64. 87 0
      bn_IN/bn_IN.go
  65. 78 0
      bo/bo.go
  66. 78 0
      bo_CN/bo_CN.go
  67. 78 0
      bo_IN/bo_IN.go
  68. 80 0
      br/br.go
  69. 80 0
      br_FR/br_FR.go
  70. 85 0
      brx/brx.go
  71. 85 0
      brx_IN/brx_IN.go
  72. 72 0
      bs/bs.go
  73. 72 0
      bs_Cyrl/bs_Cyrl.go
  74. 72 0
      bs_Cyrl_BA/bs_Cyrl_BA.go
  75. 72 0
      bs_Latn/bs_Latn.go
  76. 73 1
      bs_Latn_BA/bs_Latn_BA.go
  77. 74 0
      ca/ca.go
  78. 74 0
      ca_AD/ca_AD.go
  79. 74 0
      ca_ES/ca_ES.go
  80. 74 0
      ca_ES_VALENCIA/ca_ES_VALENCIA.go
  81. 74 0
      ca_FR/ca_FR.go
  82. 74 0
      ca_IT/ca_IT.go
  83. 72 0
      ce/ce.go
  84. 72 0
      ce_RU/ce_RU.go
  85. 76 0
      cgg/cgg.go
  86. 76 0
      cgg_UG/cgg_UG.go
  87. 76 0
      chr/chr.go
  88. 76 0
      chr_US/chr_US.go
  89. 0 0
      ckb/ckb.go
  90. 11 1
      ckb_IQ/ckb_IQ.go
  91. 11 1
      ckb_IR/ckb_IR.go
  92. 3 5
      cmd/generate_resources.go
  93. 196 1
      cmd/translator.tmpl
  94. 80 0
      cs/cs.go
  95. 80 0
      cs_CZ/cs_CZ.go
  96. 75 0
      cu/cu.go
  97. 75 0
      cu_RU/cu_RU.go
  98. 82 0
      cy/cy.go
  99. 82 0
      cy_GB/cy_GB.go
  100. 72 0
      da/da.go

+ 79 - 0
af/af.go

@@ -225,3 +225,82 @@ func (af *af) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'af'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (af *af) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := af.currencies[currency]
+	l := len(s) + len(af.decimal) + len(af.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, af.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(af.group) - 1; j >= 0; j-- {
+					b = append(b, af.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(af.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, af.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, af.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, af.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 79 - 0
af_NA/af_NA.go

@@ -225,3 +225,82 @@ func (af *af_NA) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'af_NA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (af *af_NA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := af.currencies[currency]
+	l := len(s) + len(af.decimal) + len(af.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, af.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(af.group) - 1; j >= 0; j-- {
+					b = append(b, af.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(af.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, af.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, af.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, af.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 79 - 0
af_ZA/af_ZA.go

@@ -225,3 +225,82 @@ func (af *af_ZA) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'af_ZA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (af *af_ZA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := af.currencies[currency]
+	l := len(s) + len(af.decimal) + len(af.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, af.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(af.group) - 1; j >= 0; j-- {
+					b = append(b, af.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(af.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, af.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, af.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, af.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 73 - 0
agq/agq.go

@@ -218,3 +218,76 @@ func (agq *agq) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'agq'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (agq *agq) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := agq.currencies[currency]
+	l := len(s) + len(agq.decimal) + len(agq.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, agq.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(agq.group) - 1; j >= 0; j-- {
+					b = append(b, agq.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(agq.minus) - 1; j >= 0; j-- {
+			b = append(b, agq.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, agq.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 73 - 0
agq_CM/agq_CM.go

@@ -218,3 +218,76 @@ func (agq *agq_CM) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'agq_CM'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (agq *agq_CM) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := agq.currencies[currency]
+	l := len(s) + len(agq.decimal) + len(agq.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, agq.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(agq.group) - 1; j >= 0; j-- {
+					b = append(b, agq.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(agq.minus) - 1; j >= 0; j-- {
+			b = append(b, agq.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, agq.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 70 - 0
ak/ak.go

@@ -157,3 +157,73 @@ func (ak *ak) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ak'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ak *ak) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ak.currencies[currency]
+	l := len(s) + len(ak.decimal) + len(ak.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ak.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ak.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ak.minus) - 1; j >= 0; j-- {
+			b = append(b, ak.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ak.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 70 - 0
ak_GH/ak_GH.go

@@ -157,3 +157,73 @@ func (ak *ak_GH) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ak_GH'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ak *ak_GH) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ak.currencies[currency]
+	l := len(s) + len(ak.decimal) + len(ak.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ak.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ak.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ak.minus) - 1; j >= 0; j-- {
+			b = append(b, ak.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ak.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 76 - 0
am/am.go

@@ -231,3 +231,79 @@ func (am *am) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'am'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (am *am) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := am.currencies[currency]
+	l := len(s) + len(am.decimal) + len(am.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, am.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, am.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(am.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, am.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, am.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, am.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 76 - 0
am_ET/am_ET.go

@@ -231,3 +231,79 @@ func (am *am_ET) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'am_ET'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (am *am_ET) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := am.currencies[currency]
+	l := len(s) + len(am.decimal) + len(am.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, am.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, am.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(am.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, am.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, am.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, am.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 84 - 0
ar/ar.go

@@ -304,3 +304,87 @@ func (ar *ar) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_001/ar_001.go

@@ -304,3 +304,87 @@ func (ar *ar_001) FmtCurrency(num float64, v uint64, currency currency.Type) []b
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_001'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_001) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_AE/ar_AE.go

@@ -304,3 +304,87 @@ func (ar *ar_AE) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_AE'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_AE) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_BH/ar_BH.go

@@ -304,3 +304,87 @@ func (ar *ar_BH) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_BH'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_BH) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_DJ/ar_DJ.go

@@ -304,3 +304,87 @@ func (ar *ar_DJ) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DJ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_DJ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
ar_DZ/ar_DZ.go

@@ -289,3 +289,81 @@ func (ar *ar_DZ) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DZ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_DZ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ar.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ar.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_EG/ar_EG.go

@@ -304,3 +304,87 @@ func (ar *ar_EG) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_EG'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_EG) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_EH/ar_EH.go

@@ -304,3 +304,87 @@ func (ar *ar_EH) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_EH'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_EH) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_ER/ar_ER.go

@@ -304,3 +304,87 @@ func (ar *ar_ER) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_ER'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_ER) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_IL/ar_IL.go

@@ -304,3 +304,87 @@ func (ar *ar_IL) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_IL'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_IL) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_IQ/ar_IQ.go

@@ -304,3 +304,87 @@ func (ar *ar_IQ) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_IQ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_IQ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_JO/ar_JO.go

@@ -304,3 +304,87 @@ func (ar *ar_JO) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_JO'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_JO) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_KM/ar_KM.go

@@ -304,3 +304,87 @@ func (ar *ar_KM) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_KM'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_KM) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_KW/ar_KW.go

@@ -304,3 +304,87 @@ func (ar *ar_KW) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_KW'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_KW) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
ar_LB/ar_LB.go

@@ -289,3 +289,81 @@ func (ar *ar_LB) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_LB'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_LB) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ar.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ar.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
ar_LY/ar_LY.go

@@ -289,3 +289,81 @@ func (ar *ar_LY) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_LY'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_LY) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ar.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ar.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
ar_MA/ar_MA.go

@@ -289,3 +289,81 @@ func (ar *ar_MA) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_MA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_MA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ar.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ar.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
ar_MR/ar_MR.go

@@ -289,3 +289,81 @@ func (ar *ar_MR) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_MR'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_MR) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ar.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ar.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_OM/ar_OM.go

@@ -304,3 +304,87 @@ func (ar *ar_OM) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_OM'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_OM) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_PS/ar_PS.go

@@ -304,3 +304,87 @@ func (ar *ar_PS) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_PS'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_PS) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_QA/ar_QA.go

@@ -304,3 +304,87 @@ func (ar *ar_QA) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_QA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_QA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_SA/ar_SA.go

@@ -304,3 +304,87 @@ func (ar *ar_SA) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_SA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_SD/ar_SD.go

@@ -304,3 +304,87 @@ func (ar *ar_SD) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SD'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_SD) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_SO/ar_SO.go

@@ -304,3 +304,87 @@ func (ar *ar_SO) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SO'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_SO) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_SS/ar_SS.go

@@ -304,3 +304,87 @@ func (ar *ar_SS) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SS'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_SS) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_SY/ar_SY.go

@@ -304,3 +304,87 @@ func (ar *ar_SY) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SY'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_SY) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_TD/ar_TD.go

@@ -304,3 +304,87 @@ func (ar *ar_TD) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_TD'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_TD) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
ar_TN/ar_TN.go

@@ -289,3 +289,81 @@ func (ar *ar_TN) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_TN'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_TN) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ar.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ar.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 84 - 0
ar_YE/ar_YE.go

@@ -304,3 +304,87 @@ func (ar *ar_YE) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_YE'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ar *ar_YE) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ar.currencies[currency]
+	l := len(s) + len(ar.decimal) + len(ar.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ar.decimal) - 1; j >= 0; j-- {
+				b = append(b, ar.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ar.group) - 1; j >= 0; j-- {
+					b = append(b, ar.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyNegativePrefix[j])
+		}
+
+		for j := len(ar.minus) - 1; j >= 0; j-- {
+			b = append(b, ar.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(ar.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, ar.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ar.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 93 - 0
as/as.go

@@ -276,3 +276,96 @@ func (as *as) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'as'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (as *as) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := as.currencies[currency]
+	l := len(s) + len(as.decimal) + len(as.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	inSecondary := false
+	groupThreshold := 3
+
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(as.decimal) - 1; j >= 0; j-- {
+				b = append(b, as.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+
+			if count == groupThreshold {
+				for j := len(as.group) - 1; j >= 0; j-- {
+					b = append(b, as.group[j])
+				}
+
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = 2
+				}
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(as.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, as.currencyNegativePrefix[j])
+		}
+
+		for j := len(as.minus) - 1; j >= 0; j-- {
+			b = append(b, as.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(as.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, as.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, as.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 93 - 0
as_IN/as_IN.go

@@ -276,3 +276,96 @@ func (as *as_IN) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'as_IN'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (as *as_IN) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := as.currencies[currency]
+	l := len(s) + len(as.decimal) + len(as.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	inSecondary := false
+	groupThreshold := 3
+
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(as.decimal) - 1; j >= 0; j-- {
+				b = append(b, as.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+
+			if count == groupThreshold {
+				for j := len(as.group) - 1; j >= 0; j-- {
+					b = append(b, as.group[j])
+				}
+
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = 2
+				}
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(as.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, as.currencyNegativePrefix[j])
+		}
+
+		for j := len(as.minus) - 1; j >= 0; j-- {
+			b = append(b, as.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(as.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, as.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, as.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 80 - 0
asa/asa.go

@@ -167,3 +167,83 @@ func (asa *asa) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'asa'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (asa *asa) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := asa.currencies[currency]
+	l := len(s) + len(asa.decimal) + len(asa.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(asa.decimal) - 1; j >= 0; j-- {
+				b = append(b, asa.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(asa.group) - 1; j >= 0; j-- {
+					b = append(b, asa.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(asa.minus) - 1; j >= 0; j-- {
+			b = append(b, asa.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, asa.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, asa.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, asa.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 80 - 0
asa_TZ/asa_TZ.go

@@ -167,3 +167,83 @@ func (asa *asa_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'asa_TZ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (asa *asa_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := asa.currencies[currency]
+	l := len(s) + len(asa.decimal) + len(asa.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(asa.decimal) - 1; j >= 0; j-- {
+				b = append(b, asa.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(asa.group) - 1; j >= 0; j-- {
+					b = append(b, asa.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(asa.minus) - 1; j >= 0; j-- {
+			b = append(b, asa.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, asa.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, asa.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, asa.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 80 - 0
ast/ast.go

@@ -241,3 +241,83 @@ func (ast *ast) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ast'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ast *ast) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ast.currencies[currency]
+	l := len(s) + len(ast.decimal) + len(ast.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ast.decimal) - 1; j >= 0; j-- {
+				b = append(b, ast.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ast.group) - 1; j >= 0; j-- {
+					b = append(b, ast.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ast.minus) - 1; j >= 0; j-- {
+			b = append(b, ast.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ast.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ast.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ast.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 80 - 0
ast_ES/ast_ES.go

@@ -241,3 +241,83 @@ func (ast *ast_ES) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ast_ES'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ast *ast_ES) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ast.currencies[currency]
+	l := len(s) + len(ast.decimal) + len(ast.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(ast.decimal) - 1; j >= 0; j-- {
+				b = append(b, ast.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(ast.group) - 1; j >= 0; j-- {
+					b = append(b, ast.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ast.minus) - 1; j >= 0; j-- {
+			b = append(b, ast.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ast.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ast.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ast.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 77 - 1
az/az.go

@@ -76,9 +76,9 @@ func (az *az) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
 
 	n := math.Abs(num)
 	i := int64(n)
+	iMod100 := i % 100
 	iMod1000 := i % 1000
 	iMod10 := i % 10
-	iMod100 := i % 100
 
 	if (iMod10 == 1 || iMod10 == 2 || iMod10 == 5 || iMod10 == 7 || iMod10 == 8) || (iMod100 == 20 || iMod100 == 50 || iMod100 == 70 || iMod100 == 80) {
 		return locales.PluralRuleOne
@@ -249,3 +249,79 @@ func (az *az) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (az *az) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := az.currencies[currency]
+	l := len(s) + len(az.decimal) + len(az.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, az.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, az.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyNegativePrefix[j])
+		}
+
+		b = append(b, az.minus[0])
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, az.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 77 - 1
az_Cyrl/az_Cyrl.go

@@ -76,9 +76,9 @@ func (az *az_Cyrl) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
 
 	n := math.Abs(num)
 	i := int64(n)
-	iMod10 := i % 10
 	iMod100 := i % 100
 	iMod1000 := i % 1000
+	iMod10 := i % 10
 
 	if (iMod10 == 1 || iMod10 == 2 || iMod10 == 5 || iMod10 == 7 || iMod10 == 8) || (iMod100 == 20 || iMod100 == 50 || iMod100 == 70 || iMod100 == 80) {
 		return locales.PluralRuleOne
@@ -249,3 +249,79 @@ func (az *az_Cyrl) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az_Cyrl'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (az *az_Cyrl) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := az.currencies[currency]
+	l := len(s) + len(az.decimal) + len(az.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, az.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, az.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyNegativePrefix[j])
+		}
+
+		b = append(b, az.minus[0])
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, az.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 76 - 0
az_Cyrl_AZ/az_Cyrl_AZ.go

@@ -249,3 +249,79 @@ func (az *az_Cyrl_AZ) FmtCurrency(num float64, v uint64, currency currency.Type)
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az_Cyrl_AZ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (az *az_Cyrl_AZ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := az.currencies[currency]
+	l := len(s) + len(az.decimal) + len(az.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, az.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, az.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyNegativePrefix[j])
+		}
+
+		b = append(b, az.minus[0])
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, az.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 77 - 1
az_Latn/az_Latn.go

@@ -76,9 +76,9 @@ func (az *az_Latn) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
 
 	n := math.Abs(num)
 	i := int64(n)
+	iMod100 := i % 100
 	iMod1000 := i % 1000
 	iMod10 := i % 10
-	iMod100 := i % 100
 
 	if (iMod10 == 1 || iMod10 == 2 || iMod10 == 5 || iMod10 == 7 || iMod10 == 8) || (iMod100 == 20 || iMod100 == 50 || iMod100 == 70 || iMod100 == 80) {
 		return locales.PluralRuleOne
@@ -249,3 +249,79 @@ func (az *az_Latn) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az_Latn'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (az *az_Latn) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := az.currencies[currency]
+	l := len(s) + len(az.decimal) + len(az.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, az.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, az.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyNegativePrefix[j])
+		}
+
+		b = append(b, az.minus[0])
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, az.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 77 - 1
az_Latn_AZ/az_Latn_AZ.go

@@ -76,9 +76,9 @@ func (az *az_Latn_AZ) OrdinalPluralRule(num float64, v uint64) locales.PluralRul
 
 	n := math.Abs(num)
 	i := int64(n)
+	iMod10 := i % 10
 	iMod100 := i % 100
 	iMod1000 := i % 1000
-	iMod10 := i % 10
 
 	if (iMod10 == 1 || iMod10 == 2 || iMod10 == 5 || iMod10 == 7 || iMod10 == 8) || (iMod100 == 20 || iMod100 == 50 || iMod100 == 70 || iMod100 == 80) {
 		return locales.PluralRuleOne
@@ -249,3 +249,79 @@ func (az *az_Latn_AZ) FmtCurrency(num float64, v uint64, currency currency.Type)
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az_Latn_AZ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (az *az_Latn_AZ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := az.currencies[currency]
+	l := len(s) + len(az.decimal) + len(az.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, az.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, az.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyNegativePrefix[j])
+		}
+
+		b = append(b, az.minus[0])
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, az.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, az.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 77 - 0
bas/bas.go

@@ -228,3 +228,80 @@ func (bas *bas) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bas'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bas *bas) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bas.currencies[currency]
+	l := len(s) + len(bas.decimal) + len(bas.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bas.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bas.group) - 1; j >= 0; j-- {
+					b = append(b, bas.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bas.minus) - 1; j >= 0; j-- {
+			b = append(b, bas.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bas.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bas.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bas.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 77 - 0
bas_CM/bas_CM.go

@@ -228,3 +228,80 @@ func (bas *bas_CM) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bas_CM'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bas *bas_CM) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bas.currencies[currency]
+	l := len(s) + len(bas.decimal) + len(bas.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bas.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bas.group) - 1; j >= 0; j-- {
+					b = append(b, bas.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bas.minus) - 1; j >= 0; j-- {
+			b = append(b, bas.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bas.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bas.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bas.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 79 - 0
be/be.go

@@ -244,3 +244,82 @@ func (be *be) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'be'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (be *be) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := be.currencies[currency]
+	l := len(s) + len(be.decimal) + len(be.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, be.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(be.group) - 1; j >= 0; j-- {
+					b = append(b, be.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(be.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, be.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, be.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, be.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 80 - 1
be_BY/be_BY.go

@@ -65,8 +65,8 @@ func (be *be_BY) PluralsOrdinal() []locales.PluralRule {
 func (be *be_BY) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
 
 	n := math.Abs(num)
-	nMod10 := math.Mod(n, 10)
 	nMod100 := math.Mod(n, 100)
+	nMod10 := math.Mod(n, 10)
 
 	if nMod10 == 1 && nMod100 != 11 {
 		return locales.PluralRuleOne
@@ -244,3 +244,82 @@ func (be *be_BY) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'be_BY'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (be *be_BY) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := be.currencies[currency]
+	l := len(s) + len(be.decimal) + len(be.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, be.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(be.group) - 1; j >= 0; j-- {
+					b = append(b, be.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(be.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, be.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, be.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, be.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 82 - 0
bem/bem.go

@@ -167,3 +167,85 @@ func (bem *bem) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bem'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bem *bem) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bem.currencies[currency]
+	l := len(s) + len(bem.decimal) + len(bem.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bem.decimal) - 1; j >= 0; j-- {
+				b = append(b, bem.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bem.group) - 1; j >= 0; j-- {
+					b = append(b, bem.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bem.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bem.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bem.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bem.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 82 - 0
bem_ZM/bem_ZM.go

@@ -167,3 +167,85 @@ func (bem *bem_ZM) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bem_ZM'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bem *bem_ZM) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bem.currencies[currency]
+	l := len(s) + len(bem.decimal) + len(bem.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bem.decimal) - 1; j >= 0; j-- {
+				b = append(b, bem.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bem.group) - 1; j >= 0; j-- {
+					b = append(b, bem.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bem.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bem.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bem.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bem.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 76 - 0
bez/bez.go

@@ -161,3 +161,79 @@ func (bez *bez) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bez'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bez *bez) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bez.currencies[currency]
+	l := len(s) + len(bez.decimal) + len(bez.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bez.decimal) - 1; j >= 0; j-- {
+				b = append(b, bez.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bez.group) - 1; j >= 0; j-- {
+					b = append(b, bez.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bez.minus) - 1; j >= 0; j-- {
+			b = append(b, bez.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bez.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 76 - 0
bez_TZ/bez_TZ.go

@@ -161,3 +161,79 @@ func (bez *bez_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bez_TZ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bez *bez_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bez.currencies[currency]
+	l := len(s) + len(bez.decimal) + len(bez.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bez.decimal) - 1; j >= 0; j-- {
+				b = append(b, bez.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bez.group) - 1; j >= 0; j-- {
+					b = append(b, bez.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bez.minus) - 1; j >= 0; j-- {
+			b = append(b, bez.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bez.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 77 - 0
bg/bg.go

@@ -227,3 +227,80 @@ func (bg *bg) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bg'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bg *bg) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bg.currencies[currency]
+	l := len(s) + len(bg.decimal) + len(bg.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bg.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bg.group) - 1; j >= 0; j-- {
+					b = append(b, bg.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bg.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bg.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bg.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bg.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bg.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 77 - 0
bg_BG/bg_BG.go

@@ -227,3 +227,80 @@ func (bg *bg_BG) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bg_BG'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bg *bg_BG) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bg.currencies[currency]
+	l := len(s) + len(bg.decimal) + len(bg.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bg.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bg.group) - 1; j >= 0; j-- {
+					b = append(b, bg.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bg.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bg.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bg.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bg.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bg.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 82 - 0
bm/bm.go

@@ -160,3 +160,85 @@ func (bm *bm) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bm'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bm *bm) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bm.currencies[currency]
+	l := len(s) + len(bm.decimal) + len(bm.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bm.decimal) - 1; j >= 0; j-- {
+				b = append(b, bm.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bm.group) - 1; j >= 0; j-- {
+					b = append(b, bm.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bm.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bm.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bm.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bm.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 82 - 0
bm_ML/bm_ML.go

@@ -160,3 +160,85 @@ func (bm *bm_ML) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bm_ML'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bm *bm_ML) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bm.currencies[currency]
+	l := len(s) + len(bm.decimal) + len(bm.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bm.decimal) - 1; j >= 0; j-- {
+				b = append(b, bm.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(bm.group) - 1; j >= 0; j-- {
+					b = append(b, bm.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bm.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bm.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bm.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bm.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 87 - 0
bn/bn.go

@@ -281,3 +281,90 @@ func (bn *bn) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bn'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bn *bn) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bn.currencies[currency]
+	l := len(s) + len(bn.decimal) + len(bn.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	inSecondary := false
+	groupThreshold := 3
+
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bn.decimal) - 1; j >= 0; j-- {
+				b = append(b, bn.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+
+			if count == groupThreshold {
+				for j := len(bn.group) - 1; j >= 0; j-- {
+					b = append(b, bn.group[j])
+				}
+
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = 2
+				}
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bn.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bn.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bn.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bn.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 87 - 0
bn_BD/bn_BD.go

@@ -281,3 +281,90 @@ func (bn *bn_BD) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bn_BD'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bn *bn_BD) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bn.currencies[currency]
+	l := len(s) + len(bn.decimal) + len(bn.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	inSecondary := false
+	groupThreshold := 3
+
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bn.decimal) - 1; j >= 0; j-- {
+				b = append(b, bn.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+
+			if count == groupThreshold {
+				for j := len(bn.group) - 1; j >= 0; j-- {
+					b = append(b, bn.group[j])
+				}
+
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = 2
+				}
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bn.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bn.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bn.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bn.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 87 - 0
bn_IN/bn_IN.go

@@ -281,3 +281,90 @@ func (bn *bn_IN) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bn_IN'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bn *bn_IN) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bn.currencies[currency]
+	l := len(s) + len(bn.decimal) + len(bn.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	inSecondary := false
+	groupThreshold := 3
+
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(bn.decimal) - 1; j >= 0; j-- {
+				b = append(b, bn.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+
+			if count == groupThreshold {
+				for j := len(bn.group) - 1; j >= 0; j-- {
+					b = append(b, bn.group[j])
+				}
+
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = 2
+				}
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(bn.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bn.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bn.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bn.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 78 - 0
bo/bo.go

@@ -222,3 +222,81 @@ func (bo *bo) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bo'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bo *bo) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bo.currencies[currency]
+	l := len(s) + len(bo.decimal) + len(bo.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bo.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bo.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bo.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bo.currencyNegativePrefix[j])
+		}
+
+		for j := len(bo.minus) - 1; j >= 0; j-- {
+			b = append(b, bo.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bo.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, bo.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bo.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
bo_CN/bo_CN.go

@@ -222,3 +222,81 @@ func (bo *bo_CN) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bo_CN'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bo *bo_CN) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bo.currencies[currency]
+	l := len(s) + len(bo.decimal) + len(bo.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bo.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bo.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bo.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bo.currencyNegativePrefix[j])
+		}
+
+		for j := len(bo.minus) - 1; j >= 0; j-- {
+			b = append(b, bo.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bo.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, bo.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bo.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 78 - 0
bo_IN/bo_IN.go

@@ -222,3 +222,81 @@ func (bo *bo_IN) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bo_IN'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bo *bo_IN) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bo.currencies[currency]
+	l := len(s) + len(bo.decimal) + len(bo.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bo.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bo.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bo.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, bo.currencyNegativePrefix[j])
+		}
+
+		for j := len(bo.minus) - 1; j >= 0; j-- {
+			b = append(b, bo.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(bo.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, bo.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bo.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 80 - 0
br/br.go

@@ -253,3 +253,83 @@ func (br *br) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'br'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (br *br) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := br.currencies[currency]
+	l := len(s) + len(br.decimal) + len(br.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(br.decimal) - 1; j >= 0; j-- {
+				b = append(b, br.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(br.group) - 1; j >= 0; j-- {
+					b = append(b, br.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(br.minus) - 1; j >= 0; j-- {
+			b = append(b, br.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, br.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, br.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, br.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 80 - 0
br_FR/br_FR.go

@@ -253,3 +253,83 @@ func (br *br_FR) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'br_FR'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (br *br_FR) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := br.currencies[currency]
+	l := len(s) + len(br.decimal) + len(br.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(br.decimal) - 1; j >= 0; j-- {
+				b = append(b, br.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(br.group) - 1; j >= 0; j-- {
+					b = append(b, br.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(br.minus) - 1; j >= 0; j-- {
+			b = append(b, br.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, br.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, br.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, br.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 85 - 0
brx/brx.go

@@ -241,3 +241,88 @@ func (brx *brx) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'brx'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (brx *brx) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := brx.currencies[currency]
+	l := len(s) + len(brx.decimal) + len(brx.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	inSecondary := false
+	groupThreshold := 3
+
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, brx.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+
+			if count == groupThreshold {
+				b = append(b, brx.group[0])
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = 2
+				}
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(brx.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, brx.currencyNegativePrefix[j])
+		}
+
+		b = append(b, brx.minus[0])
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(brx.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, brx.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, brx.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 85 - 0
brx_IN/brx_IN.go

@@ -241,3 +241,88 @@ func (brx *brx_IN) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'brx_IN'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (brx *brx_IN) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := brx.currencies[currency]
+	l := len(s) + len(brx.decimal) + len(brx.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	inSecondary := false
+	groupThreshold := 3
+
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, brx.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+
+			if count == groupThreshold {
+				b = append(b, brx.group[0])
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = 2
+				}
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(brx.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, brx.currencyNegativePrefix[j])
+		}
+
+		b = append(b, brx.minus[0])
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(brx.currencyPositivePrefix) - 1; j >= 0; j-- {
+			b = append(b, brx.currencyPositivePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, brx.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 72 - 0
bs/bs.go

@@ -250,3 +250,75 @@ func (bs *bs) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bs *bs) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bs.currencies[currency]
+	l := len(s) + len(bs.decimal) + len(bs.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bs.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bs.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bs.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bs.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 72 - 0
bs_Cyrl/bs_Cyrl.go

@@ -250,3 +250,75 @@ func (bs *bs_Cyrl) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Cyrl'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bs *bs_Cyrl) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bs.currencies[currency]
+	l := len(s) + len(bs.decimal) + len(bs.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bs.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bs.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bs.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bs.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 72 - 0
bs_Cyrl_BA/bs_Cyrl_BA.go

@@ -250,3 +250,75 @@ func (bs *bs_Cyrl_BA) FmtCurrency(num float64, v uint64, currency currency.Type)
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Cyrl_BA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bs *bs_Cyrl_BA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bs.currencies[currency]
+	l := len(s) + len(bs.decimal) + len(bs.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bs.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bs.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bs.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bs.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 72 - 0
bs_Latn/bs_Latn.go

@@ -250,3 +250,75 @@ func (bs *bs_Latn) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Latn'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bs *bs_Latn) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bs.currencies[currency]
+	l := len(s) + len(bs.decimal) + len(bs.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bs.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bs.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bs.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bs.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 73 - 1
bs_Latn_BA/bs_Latn_BA.go

@@ -67,8 +67,8 @@ func (bs *bs_Latn_BA) CardinalPluralRule(num float64, v uint64) locales.PluralRu
 	f := locales.F(n, v)
 	iMod10 := i % 10
 	iMod100 := i % 100
-	fMod100 := f % 100
 	fMod10 := f % 10
+	fMod100 := f % 100
 
 	if (v == 0 && iMod10 == 1 && iMod100 != 11) || (fMod10 == 1 && fMod100 != 11) {
 		return locales.PluralRuleOne
@@ -250,3 +250,75 @@ func (bs *bs_Latn_BA) FmtCurrency(num float64, v uint64, currency currency.Type)
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Latn_BA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (bs *bs_Latn_BA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := bs.currencies[currency]
+	l := len(s) + len(bs.decimal) + len(bs.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, bs.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, bs.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, bs.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, bs.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, bs.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 74 - 0
ca/ca.go

@@ -233,3 +233,77 @@ func (ca *ca) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ca *ca) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ca.currencies[currency]
+	l := len(s) + len(ca.decimal) + len(ca.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ca.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ca.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ca.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ca.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ca.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ca.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ca.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 74 - 0
ca_AD/ca_AD.go

@@ -233,3 +233,77 @@ func (ca *ca_AD) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_AD'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ca *ca_AD) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ca.currencies[currency]
+	l := len(s) + len(ca.decimal) + len(ca.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ca.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ca.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ca.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ca.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ca.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ca.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ca.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 74 - 0
ca_ES/ca_ES.go

@@ -233,3 +233,77 @@ func (ca *ca_ES) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_ES'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ca *ca_ES) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ca.currencies[currency]
+	l := len(s) + len(ca.decimal) + len(ca.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ca.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ca.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ca.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ca.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ca.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ca.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ca.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 74 - 0
ca_ES_VALENCIA/ca_ES_VALENCIA.go

@@ -233,3 +233,77 @@ func (ca *ca_ES_VALENCIA) FmtCurrency(num float64, v uint64, currency currency.T
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_ES_VALENCIA'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ca *ca_ES_VALENCIA) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ca.currencies[currency]
+	l := len(s) + len(ca.decimal) + len(ca.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ca.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ca.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ca.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ca.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ca.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ca.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ca.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 74 - 0
ca_FR/ca_FR.go

@@ -233,3 +233,77 @@ func (ca *ca_FR) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_FR'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ca *ca_FR) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ca.currencies[currency]
+	l := len(s) + len(ca.decimal) + len(ca.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ca.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ca.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ca.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ca.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ca.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ca.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ca.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 74 - 0
ca_IT/ca_IT.go

@@ -233,3 +233,77 @@ func (ca *ca_IT) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_IT'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ca *ca_IT) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ca.currencies[currency]
+	l := len(s) + len(ca.decimal) + len(ca.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ca.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ca.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(ca.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, ca.currencyNegativePrefix[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ca.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ca.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ca.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 72 - 0
ce/ce.go

@@ -223,3 +223,75 @@ func (ce *ce) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ce'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ce *ce) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ce.currencies[currency]
+	l := len(s) + len(ce.decimal) + len(ce.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ce.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ce.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, ce.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ce.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ce.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ce.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 72 - 0
ce_RU/ce_RU.go

@@ -223,3 +223,75 @@ func (ce *ce_RU) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ce_RU'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ce *ce_RU) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ce.currencies[currency]
+	l := len(s) + len(ce.decimal) + len(ce.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, ce.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, ce.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, ce.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, ce.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, ce.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, ce.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 76 - 0
cgg/cgg.go

@@ -163,3 +163,79 @@ func (cgg *cgg) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cgg'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cgg *cgg) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cgg.currencies[currency]
+	l := len(s) + len(cgg.decimal) + len(cgg.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(cgg.decimal) - 1; j >= 0; j-- {
+				b = append(b, cgg.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cgg.group) - 1; j >= 0; j-- {
+					b = append(b, cgg.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(cgg.minus) - 1; j >= 0; j-- {
+			b = append(b, cgg.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cgg.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 76 - 0
cgg_UG/cgg_UG.go

@@ -163,3 +163,79 @@ func (cgg *cgg_UG) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cgg_UG'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cgg *cgg_UG) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cgg.currencies[currency]
+	l := len(s) + len(cgg.decimal) + len(cgg.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(cgg.decimal) - 1; j >= 0; j-- {
+				b = append(b, cgg.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cgg.group) - 1; j >= 0; j-- {
+					b = append(b, cgg.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(cgg.minus) - 1; j >= 0; j-- {
+			b = append(b, cgg.minus[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cgg.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	return b
+}

+ 76 - 0
chr/chr.go

@@ -219,3 +219,79 @@ func (chr *chr) FmtCurrency(num float64, v uint64, currency currency.Type) []byt
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'chr'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (chr *chr) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := chr.currencies[currency]
+	l := len(s) + len(chr.decimal) + len(chr.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, chr.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, chr.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(chr.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, chr.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, chr.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, chr.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 76 - 0
chr_US/chr_US.go

@@ -219,3 +219,79 @@ func (chr *chr_US) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'chr_US'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (chr *chr_US) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := chr.currencies[currency]
+	l := len(s) + len(chr.decimal) + len(chr.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, chr.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, chr.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(chr.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, chr.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, chr.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, chr.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

File diff suppressed because it is too large
+ 0 - 0
ckb/ckb.go


+ 11 - 1
ckb_IQ/ckb_IQ.go

@@ -103,5 +103,15 @@ func (ckb *ckb_IQ) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
 	symbol := ckb.currencies[currency]
-	return []byte(s)
+	return append(append([]byte{}, symbol...), s...)
+}
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ckb_IQ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ckb *ckb_IQ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ckb.currencies[currency]
+	return append(append([]byte{}, symbol...), s...)
 }

+ 11 - 1
ckb_IR/ckb_IR.go

@@ -103,5 +103,15 @@ func (ckb *ckb_IR) FmtCurrency(num float64, v uint64, currency currency.Type) []
 
 	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
 	symbol := ckb.currencies[currency]
-	return []byte(s)
+	return append(append([]byte{}, symbol...), s...)
+}
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ckb_IR'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (ckb *ckb_IR) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := ckb.currencies[currency]
+	return append(append([]byte{}, symbol...), s...)
 }

+ 3 - 5
cmd/generate_resources.go

@@ -94,6 +94,7 @@ type translator struct {
 	FmtCurrencySuffix            string
 	FmtCurrencyInPrefix          bool
 	FmtCurrencyLeft              bool
+	FmtCurrencyNegativeExists    bool
 	FmtCurrencyNegativePrefix    string
 	FmtCurrencyNegativeSuffix    string
 	FmtCurrencyNegativeInPrefix  bool
@@ -167,11 +168,6 @@ func main() {
 
 		fmt.Println("Writing Data:", trans.Locale)
 
-		if trans.Locale == "en" {
-			fmt.Println("\t", trans.CurrencyNumberFormat)
-			fmt.Println("\t", trans.NegativeCurrencyNumberFormat)
-		}
-
 		if err = os.MkdirAll(fmt.Sprintf(locDir, trans.Locale), 0777); err != nil {
 			log.Fatal(err)
 		}
@@ -585,6 +581,8 @@ func parseCurrencyNumberFormat(trans *translator) {
 		return
 	}
 
+	trans.FmtCurrencyNegativeExists = true
+
 	for idx = 0; idx < len(trans.NegativeCurrencyNumberFormat); idx++ {
 		if trans.NegativeCurrencyNumberFormat[idx] == '#' || trans.NegativeCurrencyNumberFormat[idx] == '0' {
 

+ 196 - 1
cmd/translator.tmpl

@@ -496,7 +496,202 @@ func({{ .BaseLocale }} *{{ .Locale }}) FmtCurrency(num float64, v uint64, curren
 
 	return b
 	{{ else }}
-	return []byte(s)
+	return append(append([]byte{}, symbol...), s...)
+	{{ end -}}
+}
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for '{{ .Locale }}'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func({{ .BaseLocale }} *{{ .Locale }}) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+	
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := {{ .BaseLocale }}.currencies[currency]
+	{{- if eq .FmtCurrencyExists true }}
+	{{- if gt .FmtCurrencyGroupLen 0 }}
+	l := len(s) + len({{ .BaseLocale }}.decimal) + len({{ .BaseLocale }}.group) * len(s[:len(s)-int(v)-1]) / {{ .FmtCurrencyGroupLen }}
+	count := 0
+	inWhole := v == 0
+	{{- if gt .FmtCurrencySecondaryGroupLen 0}}
+	inSecondary := false
+	groupThreshold := {{ .FmtCurrencyGroupLen }}
+	{{ end -}}
+	{{ else }}
+	l := len(s) + len({{ .BaseLocale }}.decimal)
+	{{ end }}
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+
+			{{- if eq .DecimalLen 1 }}
+			b = append(b, {{ .BaseLocale }}.decimal[0])
+			{{- else }}
+			for j := len({{ .BaseLocale }}.decimal) - 1; j >= 0; j-- {
+				b = append(b, {{ .BaseLocale }}.decimal[j])
+			}
+			{{ end -}}
+			{{- if gt .FmtCurrencyGroupLen 0 }}
+			inWhole = true
+			{{ end }}
+			continue
+		}
+
+		{{ if gt .FmtCurrencyGroupLen 0 }}
+		if inWhole {
+
+			{{- if gt .FmtCurrencySecondaryGroupLen 0}}
+			
+			if count == groupThreshold {
+				{{- if eq .GroupLen 1 }}
+				b = append(b, {{ .BaseLocale }}.group[0])
+				{{- else }}
+				for j := len({{ .BaseLocale }}.group) - 1; j >= 0; j-- {
+					b = append(b, {{ .BaseLocale }}.group[j])
+				}
+				{{ end }}
+				count = 1
+
+				if !inSecondary {
+					inSecondary = true
+					groupThreshold = {{ .FmtCurrencySecondaryGroupLen }}
+				}
+			{{ else }}
+			if count == {{ .FmtCurrencyGroupLen }} {
+				{{- if eq .GroupLen 1 }}
+				b = append(b, {{ .BaseLocale }}.group[0])
+				{{- else }}
+				for j := len({{ .BaseLocale }}.group) - 1; j >= 0; j-- {
+					b = append(b, {{ .BaseLocale }}.group[j])
+				}
+				{{ end }}
+				count = 1
+			{{ end -}}
+			} else {
+				count++
+			}
+		}
+
+		{{ end }}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		{{ if and .FmtCurrencyNegativeInPrefix (not .FmtCurrencyNegativeLeft) }}
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+		{{ end }}
+
+		{{ if gt (len .FmtCurrencyNegativePrefix) 0}}
+			{{- if eq (len .FmtCurrencyNegativePrefix) 1 }}
+			b = append(b, {{ .BaseLocale }}.currencyNegativePrefix[0])
+			{{ else }}
+			for j := len({{ .BaseLocale }}.currencyNegativePrefix) - 1; j >= 0; j-- {
+				b = append(b, {{ .BaseLocale }}.currencyNegativePrefix[j])
+			}
+			{{ end }}
+		{{ end }}
+
+		{{ if and .FmtCurrencyNegativeInPrefix .FmtCurrencyNegativeLeft }}
+			for j := len(symbol) - 1; j >= 0; j-- {
+				b = append(b, symbol[j])
+			}
+		{{ end }}
+
+		{{ if eq (not .FmtCurrencyNegativeExists) true}}
+			{{- if eq .MinusLen 1 }}
+			b = append(b, {{ .BaseLocale }}.minus[0])
+			{{ else }}
+			for j := len({{ .BaseLocale }}.minus) - 1; j >= 0; j-- {
+				b = append(b, {{ .BaseLocale }}.minus[j])
+			}
+			{{ end -}}
+		{{ end }}
+
+	{{ if or .FmtCurrencyInPrefix (gt (len .FmtCurrencyPrefix) 0) }}
+	} else {
+	{{ end }}
+		
+		{{ if and .FmtCurrencyInPrefix (not .FmtCurrencyLeft) }}
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+		{{ end }}
+
+		{{ if gt (len .FmtCurrencyPrefix) 0}}
+			{{- if eq (len .FmtCurrencyPrefix) 1 }}
+			b = append(b, {{ .BaseLocale }}.currencyPositivePrefix[0])
+			{{ else }}
+			for j := len({{ .BaseLocale }}.currencyPositivePrefix) - 1; j >= 0; j-- {
+				b = append(b, {{ .BaseLocale }}.currencyPositivePrefix[j])
+			}
+			{{ end }}
+		{{ end }}
+
+		{{ if and .FmtCurrencyInPrefix .FmtCurrencyLeft }}
+			for j := len(symbol) - 1; j >= 0; j-- {
+				b = append(b, symbol[j])
+			}
+		{{ end }}
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	{{ if gt .FmtCurrencyMinDecimalLen 0 }}
+	if int(v) < {{ .FmtCurrencyMinDecimalLen }} {
+
+		if v == 0 {
+			b = append(b, {{ .BaseLocale }}.decimal...)
+		}
+
+		for i := 0; i < {{ .FmtCurrencyMinDecimalLen }}-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+	{{ end }}
+
+	{{ if or (not .FmtCurrencyNegativeInPrefix) (gt (len .FmtCurrencyNegativeSuffix) 0)}}
+	if num < 0 {
+	{{ end }}
+		{{ if and (not .FmtCurrencyNegativeInPrefix) .FmtCurrencyNegativeLeft }}
+			b = append(b, symbol...)
+		{{ end }}
+
+		{{ if gt (len .FmtCurrencyNegativeSuffix) 0}}
+			b = append(b, {{ .BaseLocale }}.currencyNegativeSuffix...)
+		{{ end }}
+
+		{{ if and (not .FmtCurrencyNegativeInPrefix) (not .FmtCurrencyNegativeLeft) }}
+			b = append(b, symbol...)
+		{{ end }}
+	{{ if or (not .FmtCurrencyInPrefix) (gt (len .FmtCurrencySuffix) 0)}}
+	} else {
+	{{ end }}
+		{{ if and (not .FmtCurrencyInPrefix) .FmtCurrencyLeft }}
+			b = append(b, symbol...)
+		{{ end }}
+
+		{{ if gt (len .FmtCurrencySuffix) 0}}
+			b = append(b, {{ .BaseLocale }}.currencyPositiveSuffix...)
+		{{ end }}
+
+		{{ if and (not .FmtCurrencyInPrefix) (not .FmtCurrencyLeft) }}
+			b = append(b, symbol...)
+		{{ end }}
+	{{ if or (not .FmtCurrencyNegativeInPrefix) (gt (len .FmtCurrencyNegativeSuffix) 0)}}
+	}
+	{{ end }}
+
+	return b
+	{{ else }}
+	return append(append([]byte{}, symbol...), s...)
 	{{ end -}}
 }
 

+ 80 - 0
cs/cs.go

@@ -282,3 +282,83 @@ func (cs *cs) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cs'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cs *cs) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cs.currencies[currency]
+	l := len(s) + len(cs.decimal) + len(cs.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(cs.decimal) - 1; j >= 0; j-- {
+				b = append(b, cs.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cs.group) - 1; j >= 0; j-- {
+					b = append(b, cs.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(cs.minus) - 1; j >= 0; j-- {
+			b = append(b, cs.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cs.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, cs.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, cs.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 80 - 0
cs_CZ/cs_CZ.go

@@ -282,3 +282,83 @@ func (cs *cs_CZ) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cs_CZ'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cs *cs_CZ) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cs.currencies[currency]
+	l := len(s) + len(cs.decimal) + len(cs.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(cs.decimal) - 1; j >= 0; j-- {
+				b = append(b, cs.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cs.group) - 1; j >= 0; j-- {
+					b = append(b, cs.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(cs.minus) - 1; j >= 0; j-- {
+			b = append(b, cs.minus[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cs.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, cs.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, cs.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 75 - 0
cu/cu.go

@@ -222,3 +222,78 @@ func (cu *cu) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cu'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cu *cu) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cu.currencies[currency]
+	l := len(s) + len(cu.decimal) + len(cu.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, cu.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cu.group) - 1; j >= 0; j-- {
+					b = append(b, cu.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, cu.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cu.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, cu.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, cu.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 75 - 0
cu_RU/cu_RU.go

@@ -222,3 +222,78 @@ func (cu *cu_RU) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cu_RU'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cu *cu_RU) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cu.currencies[currency]
+	l := len(s) + len(cu.decimal) + len(cu.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, cu.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cu.group) - 1; j >= 0; j-- {
+					b = append(b, cu.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, cu.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cu.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, cu.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, cu.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

+ 82 - 0
cy/cy.go

@@ -308,3 +308,85 @@ func (cy *cy) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cy'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cy *cy) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cy.currencies[currency]
+	l := len(s) + len(cy.decimal) + len(cy.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(cy.decimal) - 1; j >= 0; j-- {
+				b = append(b, cy.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cy.group) - 1; j >= 0; j-- {
+					b = append(b, cy.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(cy.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, cy.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cy.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, cy.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 82 - 0
cy_GB/cy_GB.go

@@ -308,3 +308,85 @@ func (cy *cy_GB) FmtCurrency(num float64, v uint64, currency currency.Type) []by
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cy_GB'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (cy *cy_GB) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := cy.currencies[currency]
+	l := len(s) + len(cy.decimal) + len(cy.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			for j := len(cy.decimal) - 1; j >= 0; j-- {
+				b = append(b, cy.decimal[j])
+			}
+
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				for j := len(cy.group) - 1; j >= 0; j-- {
+					b = append(b, cy.group[j])
+				}
+
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+		for j := len(cy.currencyNegativePrefix) - 1; j >= 0; j-- {
+			b = append(b, cy.currencyNegativePrefix[j])
+		}
+
+	} else {
+
+		for j := len(symbol) - 1; j >= 0; j-- {
+			b = append(b, symbol[j])
+		}
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, cy.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, cy.currencyNegativeSuffix...)
+
+	}
+
+	return b
+}

+ 72 - 0
da/da.go

@@ -238,3 +238,75 @@ func (da *da) FmtCurrency(num float64, v uint64, currency currency.Type) []byte
 
 	return b
 }
+
+// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'da'
+// in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
+// avoid allocations; otherwise just cast as string.
+func (da *da) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
+
+	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
+	symbol := da.currencies[currency]
+	l := len(s) + len(da.decimal) + len(da.group)*len(s[:len(s)-int(v)-1])/3
+	count := 0
+	inWhole := v == 0
+	b := make([]byte, 0, l)
+
+	for i := len(s) - 1; i >= 0; i-- {
+
+		if s[i] == '.' {
+			b = append(b, da.decimal[0])
+			inWhole = true
+
+			continue
+		}
+
+		if inWhole {
+			if count == 3 {
+				b = append(b, da.group[0])
+				count = 1
+			} else {
+				count++
+			}
+		}
+
+		b = append(b, s[i])
+	}
+
+	if num < 0 {
+
+		b = append(b, da.minus[0])
+
+	}
+
+	// reverse
+	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
+		b[i], b[j] = b[j], b[i]
+	}
+
+	if int(v) < 2 {
+
+		if v == 0 {
+			b = append(b, da.decimal...)
+		}
+
+		for i := 0; i < 2-int(v); i++ {
+			b = append(b, '0')
+		}
+	}
+
+	if num < 0 {
+
+		b = append(b, da.currencyNegativeSuffix...)
+
+		b = append(b, symbol...)
+
+	} else {
+
+		b = append(b, da.currencyPositiveSuffix...)
+
+		b = append(b, symbol...)
+
+	}
+
+	return b
+}

Some files were not shown because too many files changed in this diff