Use parseFloat to parse payment amount
This commit is contained in:
parent
9ae464cbb6
commit
ef250ec78f
1 changed files with 1 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue