1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Fixes for missing invites for recurring invitations

This commit is contained in:
David Bomba 2022-08-05 11:12:50 +10:00
parent 6eab259568
commit 5371bed25b

View File

@ -63,6 +63,19 @@ class CreateRecurringInvitations extends AbstractService
info($e->getMessage());
}
if ($this->entity->invitations()->count() == 0) {
$invitation = $this->invitation_class::where('company_id', $this->entity->company_id)
->where($this->entity_id_name, $this->entity->id)
->withTrashed()
->first();
if ($invitation)
$invitation->restore();
}
return $this->entity;
}
}