diff --git a/resources/views/payments/edit.blade.php b/resources/views/payments/edit.blade.php index 7760d8ada689..22f6d84346a7 100644 --- a/resources/views/payments/edit.blade.php +++ b/resources/views/payments/edit.blade.php @@ -223,7 +223,7 @@ var invoice = invoiceMap[invoiceId]; var amount = $('#amount').val(); - if (amount <= invoice.balance || confirm("{{ trans('texts.amount_greater_than_balance') }}")) { + if (NINJA.praseFloat(amount) <= invoice.balance || confirm("{{ trans('texts.amount_greater_than_balance') }}")) { $('#saveButton').attr('disabled', true); return true; } else { diff --git a/tests/acceptance/PaymentCest.php b/tests/acceptance/PaymentCest.php index 3eeb70bc04fc..b425af18b6a9 100644 --- a/tests/acceptance/PaymentCest.php +++ b/tests/acceptance/PaymentCest.php @@ -55,7 +55,7 @@ class PaymentCest $I->fillField(['name' => 'transaction_reference'], $this->faker->text(12)); $I->click('Save'); - $I->wait(1); + $I->wait(2); $I->see('Successfully created payment'); $I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]);