Added byod to asset controller for create and update methods

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-01-18 13:03:51 -08:00
parent ee4b8f4694
commit b80d52a9c3

View file

@ -146,6 +146,7 @@ class AssetsController extends Controller
$asset->supplier_id = request('supplier_id', null);
$asset->requestable = request('requestable', 0);
$asset->rtd_location_id = request('rtd_location_id', null);
$asset->byod = request('byod', 0);
if (! empty($settings->audit_interval)) {
$asset->next_audit_date = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
@ -318,6 +319,7 @@ class AssetsController extends Controller
// If the box isn't checked, it's not in the request at all.
$asset->requestable = $request->filled('requestable');
$asset->rtd_location_id = $request->input('rtd_location_id', null);
$asset->byod = $request->input('byod', 0);
if ($asset->assigned_to == '') {
$asset->location_id = $request->input('rtd_location_id', null);