Fix for check data

This commit is contained in:
Hillel Coren 2017-08-02 21:27:16 +03:00
parent 43550cd9d1
commit 6d851ca815

View File

@ -125,10 +125,14 @@ class CheckData extends Command
if ($this->option('fix') == 'true') {
foreach ($invoices as $invoice) {
$dispatcher = $invoice->getEventDispatcher();
if ($invoice->is_deleted) {
$invoice->unsetEventDispatcher();
}
$invoice->markSent();
$invoice->is_public = true;
$invoice->save();
$invoice->markInvitationsSent();
$invoice->setEventDispatcher($dispatcher);
}
}
}