Update the location ID if there is an rtd_location given

This commit is contained in:
snipe 2017-11-03 17:36:18 -07:00
parent 3b9544d1f3
commit c06539dee3

View file

@ -289,6 +289,11 @@ class AssetsController extends Controller
$asset->requestable = $request->has('requestable');
$asset->rtd_location_id = $request->input('rtd_location_id', null);
if ($asset->assigned_to=='') {
$asset->location_id = $request->input('rtd_location_id', null);
}
if ($request->has('image_delete')) {
unlink(public_path().'/uploads/assets/'.$asset->image);
$asset->image = '';