New method of collecting balance.

This commit is contained in:
James Cole
2024-07-31 13:09:55 +02:00
parent b2954658d8
commit 3560f0388c
10 changed files with 273 additions and 209 deletions

View File

@@ -45,6 +45,11 @@ class Amount
return $this->formatFlat($format->symbol, $format->decimal_places, $amount, $coloured);
}
public function formatByCurrencyId(int $currencyId, string $amount, ?bool $coloured = null): string {
$format = TransactionCurrency::find($currencyId);
return $this->formatFlat($format->symbol, $format->decimal_places, $amount, $coloured);
}
/**
* This method will properly format the given number, in color or "black and white",
* as a currency, given two things: the currency required and the current locale.