File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
app/Http/Controllers/Assets
lang/en-US/admin/hardware Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,11 @@ public function update(Request $request) : RedirectResponse
321321
322322 if ($ request ->input ('null_asset_eol_date ' )=='1 ' ) {
323323 $ this ->update_array ['asset_eol_date ' ] = null ;
324- $ this ->update_array ['eol_explicit ' ] = 1 ;
324+
325+ // If they are nulling the EOL date to allow it to calculate, set eol explicit to 0
326+ if ($ request ->input ('calc_eol ' )=='1 ' ) {
327+ $ this ->update_array ['eol_explicit ' ] = 0 ;
328+ }
325329 }
326330
327331
Original file line number Diff line number Diff line change 5959 'asset_deployable ' => 'That status is deployable. This asset can be checked out. ' ,
6060 'processing_spinner ' => 'Processing... (This might take a bit of time on large files) ' ,
6161 'optional_infos ' => 'Optional Information ' ,
62- 'order_details ' => 'Order Related Information '
62+ 'order_details ' => 'Order Related Information ' ,
63+ 'calc_eol ' => 'If nulling the EOL date, use automatic EOL calculation based on the purchase date and EOL rate. ' ,
6364];
Original file line number Diff line number Diff line change 9191 </div >
9292 </div >
9393
94- <!-- Purchase Date -->
94+ <!-- EOL Date -->
9595 <div class =" form-group {{ $errors -> has (' asset_eol_date' ) ? ' has-error' : ' ' } }" >
9696 <label for =" eol_date" class =" col-md-3 control-label" >{{ trans (' admin/hardware/form.eol_date' ) } } </label >
9797 <div class =" col-md-4" >
109109 </div >
110110 </div >
111111
112+ <div class =" form-group" >
113+ <div class =" col-md-9 col-md-offset-3" >
114+ <label class =" form-control" >
115+ {{ Form:: checkbox (' calc_eol' , ' 1' , false ) } }
116+ {{ trans (' admin/hardware/form.calc_eol' ) } }
117+ </label >
118+ </div >
119+ </div >
120+
112121
113122 <!-- Status -->
114123 <div class =" form-group {{ $errors -> has (' status_id' ) ? ' has-error' : ' ' } }" >
You can’t perform that action at this time.
0 commit comments