Add test case

This commit is contained in:
Marcus Moore
2024-04-10 15:47:26 -07:00
parent 6d572424ac
commit 4434de6241
2 changed files with 23 additions and 1 deletions
@@ -92,7 +92,6 @@ class AssetCheckoutController extends Controller
$settings = \App\Models\Setting::getSettings();
// We have to check whether $target->company_id is null here since locations don't have a company yet
// @todo: test this
if (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) {
if ($target->company_id != $asset->company_id){
return redirect()->to("hardware/$assetId/checkout")->with('error', trans('general.error_user_company'));