Added audit type to API controller

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-02-23 18:40:19 -08:00
parent c275c35460
commit e92beec679
2 changed files with 6 additions and 2 deletions

View file

@ -987,10 +987,14 @@ class AssetsController extends Controller
$asset->unsetEventDispatcher();
$asset->next_audit_date = $dt;
if ($request->filled('audit_type')) {
$asset->audit_type = $request->input('audit_type');
}
if ($request->filled('next_audit_date')) {
$asset->next_audit_date = $request->input('next_audit_date');
}
// Check to see if they checked the box to update the physical location,
// not just note it in the audit notes
if ($request->input('update_location') == '1') {

View file

@ -851,7 +851,7 @@ class AssetsController extends Controller
$asset->next_audit_date = $request->input('next_audit_date');
$asset->last_audit_date = date('Y-m-d H:i:s');
$asset->audit_type = $request->input('audit_type', 'physical');
$asset->audit_type = $request->input('audit_type');
// Check to see if they checked the box to update the physical location,
// not just note it in the audit notes