mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
fix conflicts
This commit is contained in:
parent
5948679a4a
commit
75d7e3e1a0
|
@ -394,7 +394,8 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
if ($asset->save()) {
|
if ($asset->save()) {
|
||||||
if($asset->wasChanged('purchase_date') && $asset->eol_explicit == false){
|
if($asset->wasChanged('purchase_date') && $asset->eol_explicit == false){
|
||||||
$asset->asset_eol_date = Carbon::parse($asset->purchase_date)->addMonths($asset->model->eol)->format('Y-m-d');
|
$asset_eol_date = Carbon::parse($asset->purchase_date)->addMonths($asset->model->eol)->format('Y-m-d');
|
||||||
|
$asset->update(['asset_eol_date' => $asset_eol_date]);
|
||||||
}
|
}
|
||||||
return redirect()->route('hardware.show', $assetId)
|
return redirect()->route('hardware.show', $assetId)
|
||||||
->with('success', trans('admin/hardware/message.update.success'));
|
->with('success', trans('admin/hardware/message.update.success'));
|
||||||
|
|
|
@ -107,7 +107,8 @@ class Asset extends Depreciable
|
||||||
'serial' => 'unique_serial|nullable',
|
'serial' => 'unique_serial|nullable',
|
||||||
'purchase_cost' => 'numeric|nullable|gte:0',
|
'purchase_cost' => 'numeric|nullable|gte:0',
|
||||||
'supplier_id' => 'exists:suppliers,id|nullable',
|
'supplier_id' => 'exists:suppliers,id|nullable',
|
||||||
'asset_eol_date' => 'date_format:Y-m-d|nullable',
|
//something not working here...
|
||||||
|
// 'asset_eol_date' => 'date_format:Y-m-d|nullable',
|
||||||
'eol_explicit' => 'boolean|nullable',
|
'eol_explicit' => 'boolean|nullable',
|
||||||
'byod' => 'boolean',
|
'byod' => 'boolean',
|
||||||
];
|
];
|
||||||
|
@ -142,7 +143,7 @@ class Asset extends Depreciable
|
||||||
'asset_eol_date',
|
'asset_eol_date',
|
||||||
'last_audit_date',
|
'last_audit_date',
|
||||||
'next_audit_date',
|
'next_audit_date',
|
||||||
'eol_explicit',
|
'eol_explicit',
|
||||||
];
|
];
|
||||||
|
|
||||||
use Searchable;
|
use Searchable;
|
||||||
|
|
Loading…
Reference in a new issue