Allow restarting of archived recurring invoices

This commit is contained in:
David Bomba 2023-03-06 08:03:48 +11:00
parent b0c8a1ecff
commit 155a7de8e0

View File

@ -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);