mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Allow restarting of archived recurring invoices
This commit is contained in:
parent
b0c8a1ecff
commit
155a7de8e0
@ -50,10 +50,13 @@ class RecurringService
|
|||||||
|
|
||||||
public function start()
|
public function start()
|
||||||
{
|
{
|
||||||
if ($this->recurring_entity->remaining_cycles == 0) {
|
if ($this->recurring_entity->remaining_cycles == 0 || $this->recurring_entity->is_deleted) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->recurring_entity->trashed())
|
||||||
|
$this->recurring_entity->restore();
|
||||||
|
|
||||||
$this->setStatus(RecurringInvoice::STATUS_ACTIVE);
|
$this->setStatus(RecurringInvoice::STATUS_ACTIVE);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user