mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some extra code for #3578
This commit is contained in:
parent
fdea25051c
commit
fe66be673a
@ -219,8 +219,16 @@ class Amount
|
|||||||
$positivePrefixed = '' !== $fmt->getAttribute(NumberFormatter::POSITIVE_PREFIX);
|
$positivePrefixed = '' !== $fmt->getAttribute(NumberFormatter::POSITIVE_PREFIX);
|
||||||
$negativePrefixed = '' !== $fmt->getAttribute(NumberFormatter::NEGATIVE_PREFIX);
|
$negativePrefixed = '' !== $fmt->getAttribute(NumberFormatter::NEGATIVE_PREFIX);
|
||||||
|
|
||||||
|
$formatAccounting = (int) $fmt->getAttribute(NumberFormatter::CURRENCY_ACCOUNTING);
|
||||||
|
|
||||||
$positive = ($positivePrefixed) ? '%s %v' : '%v %s';
|
$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 [
|
return [
|
||||||
'mon_decimal_point' => $fmt->getSymbol(NumberFormatter::MONETARY_SEPARATOR_SYMBOL),
|
'mon_decimal_point' => $fmt->getSymbol(NumberFormatter::MONETARY_SEPARATOR_SYMBOL),
|
||||||
|
Loading…
Reference in New Issue
Block a user