From ef250ec78fe9fe24005bac7404266f5e32dc3299 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 16 Feb 2018 11:58:07 +0200 Subject: [PATCH] Use parseFloat to parse payment amount --- app/Services/PaymentService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 00eec4ddfb..386755926c 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -153,7 +153,7 @@ class PaymentService extends BaseService public function save($input, $payment = null, $invoice = null) { // if the payment amount is more than the balance create a credit - if ($invoice && $input['amount'] > $invoice->balance) { + if ($invoice && Utils::parseFloat($input['amount']) > $invoice->balance) { $credit = Credit::createNew(); $credit->client_id = $invoice->client_id; $credit->credit_date = date_create()->format('Y-m-d');