mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix issue in number formatting.
This commit is contained in:
parent
b94885f8ba
commit
5eca404866
@ -34,8 +34,6 @@ use Throwable;
|
||||
* Class CurrencyForm
|
||||
*
|
||||
* All currency related form methods.
|
||||
*
|
||||
* See reference nr. 22
|
||||
*/
|
||||
class CurrencyForm
|
||||
{
|
||||
@ -61,7 +59,7 @@ class CurrencyForm
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function currencyField(string $name, string $view, $value = null, array $options = null): string
|
||||
protected function currencyField(string $name, string $view, mixed $value = null, array $options = null): string
|
||||
{
|
||||
$label = $this->label($name, $options);
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
|
@ -182,7 +182,10 @@ class FireflyValidator extends Validator
|
||||
$first = substr($value, 0, 4);
|
||||
$last = substr($value, 4);
|
||||
$iban = $last . $first;
|
||||
$iban = str_replace($search, $replace, $iban);
|
||||
$iban = trim(str_replace($search, $replace, $iban));
|
||||
if (0 === strlen($iban)) {
|
||||
return false;
|
||||
}
|
||||
$checksum = bcmod($iban, '97');
|
||||
|
||||
return 1 === (int)$checksum;
|
||||
|
Loading…
Reference in New Issue
Block a user