mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Credit PAYMENTS
This commit is contained in:
parent
2d01bc1e27
commit
f8411ad7c1
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user