fix: exclude Owner and Developer roles from payroll generation command
This commit is contained in:
parent
2ae9c0c470
commit
917e60c013
@ -33,7 +33,11 @@ public function handle()
|
||||
{
|
||||
$periodMonth = $this->argument('period') ?? Carbon::now()->format('Y-m');
|
||||
$periodMonthFormatted = Carbon::parse($periodMonth)->translatedFormat('F Y');
|
||||
$users = User::with('profile')->get();
|
||||
$users = User::with('profile')
|
||||
->whereDoesntHave('roles', function ($query) {
|
||||
$query->whereIn('name', ['Owner', 'Developer']);
|
||||
})
|
||||
->get();
|
||||
$count = 0;
|
||||
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user