mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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)
|
public function save($input, $payment = null, $invoice = null)
|
||||||
{
|
{
|
||||||
// if the payment amount is more than the balance create a credit
|
// 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 = Credit::createNew();
|
||||||
$credit->client_id = $invoice->client_id;
|
$credit->client_id = $invoice->client_id;
|
||||||
$credit->credit_date = date_create()->format('Y-m-d');
|
$credit->credit_date = date_create()->format('Y-m-d');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user