1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Credit PAYMENTS

This commit is contained in:
David Bomba 2020-10-21 17:40:05 +11:00
parent 2d01bc1e27
commit f8411ad7c1

View File

@ -93,9 +93,10 @@ class PaymentRepository extends BaseRepository
$_credit_totals = array_sum(array_column($data['credits'], 'amount'));
//$data['amount'] -= $_credit_totals;
$client->service()->updatePaidToDate($_credit_totals)->save();
if($data['amount'] == $_credit_totals)
$data['amount'] = 0;
else
$client->service()->updatePaidToDate($_credit_totals)->save();
}