diff --git a/app/Services/Recurring/RecurringService.php b/app/Services/Recurring/RecurringService.php index 06595f6d2aa3..7a056a5c1d32 100644 --- a/app/Services/Recurring/RecurringService.php +++ b/app/Services/Recurring/RecurringService.php @@ -50,9 +50,12 @@ class RecurringService public function start() { - if ($this->recurring_entity->remaining_cycles == 0) { + if ($this->recurring_entity->remaining_cycles == 0 || $this->recurring_entity->is_deleted) { return $this; } + + if($this->recurring_entity->trashed()) + $this->recurring_entity->restore(); $this->setStatus(RecurringInvoice::STATUS_ACTIVE);