invoices: unified money, number and date formats and fully respect configured language (#1814)

This commit is contained in:
Kevin Papst
2020-07-10 15:09:52 +02:00
committed by GitHub
parent 19e4ebf88c
commit 32c1e3258e
67 changed files with 1593 additions and 2335 deletions

View File

@@ -32,17 +32,22 @@ class DebugFormatter implements InvoiceFormatter
}
/**
* @param mixed $amount
* @param int|float $amount
* @param string|null $currency
* @return mixed
* @param bool $withCurrency
* @return string
*/
public function getFormattedMoney($amount, $currency)
public function getFormattedMoney($amount, ?string $currency, bool $withCurrency = true)
{
if (null !== $currency) {
if (null === $currency) {
$withCurrency = false;
}
if ($withCurrency) {
return $amount . ' ' . $currency;
}
return $amount;
return (string) $amount;
}
/**