mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Additional check to ensure recurring invoices have invitations
This commit is contained in:
parent
252416a5b0
commit
3869dcccf9
@ -161,6 +161,11 @@ class SendRecurring implements ShouldQueue
|
||||
*/
|
||||
private function createRecurringInvitations($invoice) :Invoice
|
||||
{
|
||||
|
||||
if($this->recurring_invoice->invitations->count() == 0) {
|
||||
$this->recurring_invoice = $this->recurring_invoice->service()->createInvitations()->save();
|
||||
}
|
||||
|
||||
$this->recurring_invoice->invitations->each(function ($recurring_invitation) use ($invoice) {
|
||||
$ii = InvoiceInvitationFactory::create($invoice->company_id, $invoice->user_id);
|
||||
$ii->key = $this->createDbHash($invoice->company->db);
|
||||
|
Loading…
Reference in New Issue
Block a user