mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-16 17:14:39 -04:00
Ensure all recurring invoices have a valid state - post migration
This commit is contained in:
parent
649defb2bd
commit
cb840fc06b
@ -948,6 +948,11 @@ class Import implements ShouldQueue
|
|||||||
RecurringInvoiceFactory::create($this->company->id, $modified['user_id'])
|
RecurringInvoiceFactory::create($this->company->id, $modified['user_id'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($invoice->status_id == 4 && $invoice->remaining_cycles == -1){
|
||||||
|
$invoice->status_id =2;
|
||||||
|
$invoice->save();
|
||||||
|
}
|
||||||
|
|
||||||
$key = "recurring_invoices_{$resource['id']}";
|
$key = "recurring_invoices_{$resource['id']}";
|
||||||
|
|
||||||
$this->ids['recurring_invoices'][$key] = [
|
$this->ids['recurring_invoices'][$key] = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user