Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 10, 2024
2 parents 7596717 + b6ad69f commit 5d58175
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/Http/Controllers/Assets/BulkAssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,11 @@ public function update(Request $request) : RedirectResponse

if ($request->input('null_asset_eol_date')=='1') {
$this->update_array['asset_eol_date'] = null;
$this->update_array['eol_explicit'] = 1;

// If they are nulling the EOL date to allow it to calculate, set eol explicit to 0
if ($request->input('calc_eol')=='1') {
$this->update_array['eol_explicit'] = 0;
}
}


Expand Down
3 changes: 2 additions & 1 deletion resources/lang/en-US/admin/hardware/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@
'asset_deployable' => 'That status is deployable. This asset can be checked out.',
'processing_spinner' => 'Processing... (This might take a bit of time on large files)',
'optional_infos' => 'Optional Information',
'order_details' => 'Order Related Information'
'order_details' => 'Order Related Information',
'calc_eol' => 'If nulling the EOL date, use automatic EOL calculation based on the purchase date and EOL rate.',
];
11 changes: 10 additions & 1 deletion resources/views/hardware/bulk.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</div>
</div>

<!-- Purchase Date -->
<!-- EOL Date -->
<div class="form-group {{ $errors->has('asset_eol_date') ? ' has-error' : '' }}">
<label for="eol_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.eol_date') }}</label>
<div class="col-md-4">
Expand All @@ -109,6 +109,15 @@
</div>
</div>

<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('calc_eol', '1', false) }}
{{ trans('admin/hardware/form.calc_eol') }}
</label>
</div>
</div>


<!-- Status -->
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
Expand Down

0 comments on commit 5d58175

Please sign in to comment.