mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 01:04:36 -04:00
Minor fixes for negative invoices
This commit is contained in:
parent
d2491476e4
commit
f54f4b9200
@ -280,7 +280,7 @@ class BaseRepository
|
|||||||
$model = $model->service()->applyNumber()->save();
|
$model = $model->service()->applyNumber()->save();
|
||||||
|
|
||||||
/* Handle attempts where the deposit is greater than the amount/balance of the invoice */
|
/* Handle attempts where the deposit is greater than the amount/balance of the invoice */
|
||||||
if((int)$model->balance != 0 && $model->partial > $model->amount)
|
if((int)$model->balance != 0 && $model->partial > $model->amount && $model->amount > 0)
|
||||||
$model->partial = min($model->amount, $model->balance);
|
$model->partial = min($model->amount, $model->balance);
|
||||||
|
|
||||||
/* Update product details if necessary - if we are inside a transaction - do nothing */
|
/* Update product details if necessary - if we are inside a transaction - do nothing */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user