Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some extra code for #3578
James Colefe66be673aa6
diff --git a/app/Support/Amount.php b/app/Support/Amount.phpindex 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),