Fixes for payments with credits

This commit is contained in:
David Bomba 2021-07-08 20:56:21 +10:00
parent 8485bddfee
commit 05ca393678
2 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class ClientService
$query->whereDate('due_date', '<=', now()->format('Y-m-d'))
->orWhereNull('due_date');
})
->orderBy('created_at','ASC');
->orderBy('created_at','ASC')->get();
}
public function getPaymentMethods(float $amount)

View File

@ -119,6 +119,7 @@ class PaymentService
->service()
->getCredits();
foreach ($credits as $credit) {
//starting invoice balance
$invoice_balance = $invoice->balance;