mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 18:34:32 +02:00
When formatting money strings, by default only show the trailing digits that are not zero.
This commit is contained in:
parent
3ab53ba863
commit
8a80474b3a
2 changed files with 13 additions and 7 deletions
|
@ -130,9 +130,9 @@ class AppExtension extends AbstractExtension
|
|||
return $this->moneyFormatter->format($amount, $currency, $decimals);
|
||||
}
|
||||
|
||||
public function siFormat($value, $unit, $decimals = 2)
|
||||
public function siFormat($value, $unit, $decimals = 2, bool $show_all_digits = false)
|
||||
{
|
||||
return $this->siformatter->format($value, $unit, $decimals);
|
||||
return $this->siformatter->format($value, $unit, $decimals, $show_all_digits);
|
||||
}
|
||||
|
||||
public function amountFormat($value, ?MeasurementUnit $unit, array $options = [])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue