mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Use parseFloat to parse payment amount
This commit is contained in:
parent
9ae464cbb6
commit
ef250ec78f
@ -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…
Reference in New Issue
Block a user