uses notArchived scope instead now

This commit is contained in:
Godfrey M 2022-07-12 12:20:11 -07:00
parent 48349071ed
commit 58c54cc3dc

View file

@ -643,7 +643,8 @@ class ReportsController extends Controller
$assets->whereBetween('assets.next_audit_date', [$request->input('next_audit_start'), $request->input('next_audit_end')]);
}
if($request->filled('exclude_archived')){
$assets->where('archived', '=', 0) && $assets->where('status_id', '!=', 3);
$assets->notArchived();
// where('archived', '=', 0) && $assets->where('status_id', '!=', 3);
}
$assets->orderBy('assets.id', 'ASC')->chunk(20, function ($assets) use ($handle, $customfields, $request) {