mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #6120 from turbo124/v5-develop
Tweaks for company size check
This commit is contained in:
commit
8939860af6
@ -55,10 +55,15 @@ class CompanySizeCheck implements ShouldQueue
|
||||
private function check()
|
||||
{
|
||||
Company::cursor()->each(function ($company) {
|
||||
if ($company->invoices->count() > 1000 || $company->products->count() > 1000 || $company->clients->count() > 1000) {
|
||||
|
||||
if ($company->invoices()->count() > 1000 || $company->products()->count() > 1000 || $company->clients()->count() > 1000) {
|
||||
|
||||
nlog("Marking company {$company->id} as large");
|
||||
|
||||
$company->is_large = true;
|
||||
$company->save();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user