mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Merge pull request #11488 from Godmartinz/feature/sc-19107/add-box-to-custom-reports-to-not-include
adds a checkbox to exclude archived assets from custom reports
This commit is contained in:
commit
0ccd7e09de
|
@ -642,6 +642,10 @@ class ReportsController extends Controller
|
|||
if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) {
|
||||
$assets->whereBetween('assets.next_audit_date', [$request->input('next_audit_start'), $request->input('next_audit_end')]);
|
||||
}
|
||||
if($request->filled('exclude_archived')){
|
||||
$assets->notArchived();
|
||||
}
|
||||
|
||||
$assets->orderBy('assets.id', 'ASC')->chunk(20, function ($assets) use ($handle, $customfields, $request) {
|
||||
|
||||
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
|
||||
|
|
|
@ -101,6 +101,7 @@ return [
|
|||
'employee_number' => 'Employee Number',
|
||||
'email_domain_help' => 'This is used to generate email addresses when importing',
|
||||
'error' => 'Error',
|
||||
'exclude_archived' => 'Exclude Archived Assets',
|
||||
'example' => 'Example: ',
|
||||
'filastname_format' => 'First Initial Last Name (jsmith@example.com)',
|
||||
'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)',
|
||||
|
|
|
@ -340,11 +340,14 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label>
|
||||
{{ Form::checkbox('exclude_archived', '1') }}
|
||||
{{ trans('general.exclude_archived') }}
|
||||
</label>
|
||||
<label>
|
||||
{{ Form::checkbox('use_bom', '1') }}
|
||||
{{ trans('general.bom_remark') }}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue