mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Checks for company user in check data
This commit is contained in:
parent
88f730b9a1
commit
b1d6f602ce
@ -1010,6 +1010,27 @@ ORDER BY clients.id;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* //used to set a company owner on the company_users table
|
||||||
|
|
||||||
|
$c = Company::whereDoesntHave('company_users', function ($query){
|
||||||
|
$query->where('is_owner', true)->withTrashed();
|
||||||
|
})->cursor()->each(function ($company){
|
||||||
|
|
||||||
|
if(!$company->company_users()->exists()){
|
||||||
|
echo "No company users AT ALL {$company->id}\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
$cu = $company->company_users()->orderBy('id', 'ASC')->orderBy('is_admin', 'ASC')->first();
|
||||||
|
echo "{$company->id} - {$cu->id} \n";
|
||||||
|
$cu->is_owner=true;
|
||||||
|
$cu->save();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
/* query if we want to company company ledger to client balance
|
/* query if we want to company company ledger to client balance
|
||||||
$results = \DB::select( \DB::raw("
|
$results = \DB::select( \DB::raw("
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user