mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -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'))) {
|
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')]);
|
$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) {
|
$assets->orderBy('assets.id', 'ASC')->chunk(20, function ($assets) use ($handle, $customfields, $request) {
|
||||||
|
|
||||||
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
|
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
|
||||||
|
|
|
@ -101,6 +101,7 @@ return [
|
||||||
'employee_number' => 'Employee Number',
|
'employee_number' => 'Employee Number',
|
||||||
'email_domain_help' => 'This is used to generate email addresses when importing',
|
'email_domain_help' => 'This is used to generate email addresses when importing',
|
||||||
'error' => 'Error',
|
'error' => 'Error',
|
||||||
|
'exclude_archived' => 'Exclude Archived Assets',
|
||||||
'example' => 'Example: ',
|
'example' => 'Example: ',
|
||||||
'filastname_format' => 'First Initial Last Name (jsmith@example.com)',
|
'filastname_format' => 'First Initial Last Name (jsmith@example.com)',
|
||||||
'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)',
|
'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)',
|
||||||
|
|
|
@ -340,11 +340,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-9 col-md-offset-3">
|
<div class="col-md-9 col-md-offset-3">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('exclude_archived', '1') }}
|
||||||
|
{{ trans('general.exclude_archived') }}
|
||||||
|
</label>
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('use_bom', '1') }}
|
{{ Form::checkbox('use_bom', '1') }}
|
||||||
{{ trans('general.bom_remark') }}
|
{{ trans('general.bom_remark') }}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue