mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Fix issue in number formatting.
This commit is contained in:
@@ -34,8 +34,6 @@ use Throwable;
|
|||||||
* Class CurrencyForm
|
* Class CurrencyForm
|
||||||
*
|
*
|
||||||
* All currency related form methods.
|
* All currency related form methods.
|
||||||
*
|
|
||||||
* See reference nr. 22
|
|
||||||
*/
|
*/
|
||||||
class CurrencyForm
|
class CurrencyForm
|
||||||
{
|
{
|
||||||
@@ -61,7 +59,7 @@ class CurrencyForm
|
|||||||
*
|
*
|
||||||
* @return string
|
* @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);
|
$label = $this->label($name, $options);
|
||||||
$options = $this->expandOptionArray($name, $label, $options);
|
$options = $this->expandOptionArray($name, $label, $options);
|
||||||
|
@@ -182,7 +182,10 @@ class FireflyValidator extends Validator
|
|||||||
$first = substr($value, 0, 4);
|
$first = substr($value, 0, 4);
|
||||||
$last = substr($value, 4);
|
$last = substr($value, 4);
|
||||||
$iban = $last . $first;
|
$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');
|
$checksum = bcmod($iban, '97');
|
||||||
|
|
||||||
return 1 === (int)$checksum;
|
return 1 === (int)$checksum;
|
||||||
|
Reference in New Issue
Block a user