diff --git a/app/Support/Amount.php b/app/Support/Amount.php index a896b5e58d..bf51878cf1 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -219,8 +219,16 @@ class Amount $positivePrefixed = '' !== $fmt->getAttribute(NumberFormatter::POSITIVE_PREFIX); $negativePrefixed = '' !== $fmt->getAttribute(NumberFormatter::NEGATIVE_PREFIX); + $formatAccounting = (int) $fmt->getAttribute(NumberFormatter::CURRENCY_ACCOUNTING); + $positive = ($positivePrefixed) ? '%s %v' : '%v %s'; - $negative = ($negativePrefixed) ? '%s %v' : '%v %s'; + $negative = ($negativePrefixed) ? '%s -%v' : '-%v %s'; + + if(0 !== $formatAccounting) { + $negative = '(%v %s)'; + } + + return [ 'mon_decimal_point' => $fmt->getSymbol(NumberFormatter::MONETARY_SEPARATOR_SYMBOL),