Merge pull request #13301 from uberbrady/better_auto_increment_tags

Better auto increment asset-tags [FD-32892]
This commit is contained in:
snipe
2023-07-13 09:49:44 +01:00
committed by GitHub
5 changed files with 163 additions and 30 deletions
@@ -545,7 +545,8 @@ class AssetsController extends Controller
$asset->model_id = $request->get('model_id');
$asset->order_number = $request->get('order_number');
$asset->notes = $request->get('notes');
$asset->asset_tag = $request->get('asset_tag', Asset::autoincrement_asset());
$asset->asset_tag = $request->get('asset_tag', Asset::autoincrement_asset()); //yup, problem :/
// NO IT IS NOT!!! This is never firing; we SHOW the asset_tag you're going to get, so it *will* be filled in!
$asset->user_id = Auth::id();
$asset->archived = '0';
$asset->physical = '1';