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'])
|
||||
);
|
||||
|
||||
if($invoice->status_id == 4 && $invoice->remaining_cycles == -1){
|
||||
$invoice->status_id =2;
|
||||
$invoice->save();
|
||||
}
|
||||
|
||||
$key = "recurring_invoices_{$resource['id']}";
|
||||
|
||||
$this->ids['recurring_invoices'][$key] = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue