mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for client balances
This commit is contained in:
parent
f7b7732f04
commit
71b243bace
@ -184,8 +184,12 @@ class ReminderJob implements ShouldQueue
|
||||
$invoice->fresh();
|
||||
$invoice->service()->deletePdf();
|
||||
|
||||
/* Refresh the client here to ensure the balance is fresh */
|
||||
$client = $invoice->client;
|
||||
$client = $client->fresh();
|
||||
|
||||
nlog("adjusting client balance and invoice balance by ". ($invoice->balance - $temp_invoice_balance));
|
||||
$invoice->client->service()->updateBalance($invoice->balance - $temp_invoice_balance)->save();
|
||||
$client->service()->updateBalance($invoice->balance - $temp_invoice_balance)->save();
|
||||
$invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$invoice->number}");
|
||||
|
||||
return $invoice;
|
||||
|
Loading…
Reference in New Issue
Block a user