Workaround for auto-bill w/archived user
This commit is contained in:
parent
303e17f6af
commit
a11cf02463
1 changed files with 7 additions and 0 deletions
|
|
@ -150,6 +150,13 @@ class SendRecurringInvoices extends Command
|
|||
|
||||
if ($invoice->getAutoBillEnabled() && $invoice->client->autoBillLater()) {
|
||||
$this->info('Processing Autobill-delayed Invoice: ' . $invoice->id);
|
||||
|
||||
// TODO don't skip
|
||||
if ($invoice->user->trashed()) {
|
||||
$this->info('Archived user: skipping');
|
||||
continue;
|
||||
}
|
||||
|
||||
Auth::loginUsingId($invoice->user_id);
|
||||
$this->paymentService->autoBillInvoice($invoice);
|
||||
Auth::logout();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue