mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -08:00
Set location_id to rtd_location_id on asset creation
This commit is contained in:
parent
81a6332889
commit
c7125c3937
|
@ -453,6 +453,7 @@ class AssetsController extends Controller
|
||||||
$asset->supplier_id = $request->get('supplier_id', 0);
|
$asset->supplier_id = $request->get('supplier_id', 0);
|
||||||
$asset->requestable = $request->get('requestable', 0);
|
$asset->requestable = $request->get('requestable', 0);
|
||||||
$asset->rtd_location_id = $request->get('rtd_location_id', null);
|
$asset->rtd_location_id = $request->get('rtd_location_id', null);
|
||||||
|
$asset->location_id = $request->get('rtd_location_id', null);
|
||||||
|
|
||||||
// Update custom fields in the database.
|
// Update custom fields in the database.
|
||||||
// Validation for these fields is handled through the AssetRequest form request
|
// Validation for these fields is handled through the AssetRequest form request
|
||||||
|
|
|
@ -137,6 +137,7 @@ class AssetsController extends Controller
|
||||||
$asset->supplier_id = request('supplier_id', 0);
|
$asset->supplier_id = request('supplier_id', 0);
|
||||||
$asset->requestable = request('requestable', 0);
|
$asset->requestable = request('requestable', 0);
|
||||||
$asset->rtd_location_id = request('rtd_location_id', null);
|
$asset->rtd_location_id = request('rtd_location_id', null);
|
||||||
|
$asset->location_id = request('rtd_location_id', null);
|
||||||
|
|
||||||
if ($asset->assigned_to=='') {
|
if ($asset->assigned_to=='') {
|
||||||
$asset->location_id = $request->input('rtd_location_id', null);
|
$asset->location_id = $request->input('rtd_location_id', null);
|
||||||
|
|
Loading…
Reference in a new issue