Fixes for data sanity
This commit is contained in:
parent
50cf6dbccb
commit
19f4db2143
|
|
@ -934,6 +934,21 @@ class CheckData extends Command
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Invoice::withTrashed()
|
||||||
|
->where("partial", 0)
|
||||||
|
->whereNotNull("partial_due_date")
|
||||||
|
->cursor()
|
||||||
|
->each(function ($i) {
|
||||||
|
$i->partial_due_date = null;
|
||||||
|
$i->saveQuietly();
|
||||||
|
|
||||||
|
|
||||||
|
$this->logMessage("Fixing partial due date for # {$i->id}");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue