Some extra code for #3578

This commit is contained in:
James Cole 2020-07-26 17:35:13 +02:00
parent fdea25051c
commit fe66be673a
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -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),