diff --git a/app/Http/Controllers/VehiclesController.php b/app/Http/Controllers/VehiclesController.php index 16183fb..f53a2eb 100755 --- a/app/Http/Controllers/VehiclesController.php +++ b/app/Http/Controllers/VehiclesController.php @@ -37,6 +37,7 @@ class VehiclesController extends Controller $filter["company"] = $req->cptid; } $list = Vehicles::listVehicles($req->auth, $filter); + foreach ($list as $key => $row) { $list[$key]->DT_RowIndex = $key + 1; // $list[$key]->mileage_km = '-'; @@ -240,8 +241,10 @@ class VehiclesController extends Controller "is_track_holiday" => Vehicles::DEFAULT_TRACK_HOLIDAY, "track_sch_d" => Vehicles::DEFAULT_TRACK_SCH_D, "track_sch_h" => Vehicles::DEFAULT_TRACK_SCH_H, - "client_group_id" => $req->auth->client_group_id ?? null, - "vendor_id" => $req->auth->client_group_id ?? 1, + // "client_group_id" => $req->auth->client_group_id ?? 1, + // "vendor_id" => $req->auth->client_group_id ?? 1, + "client_group_id" => 1, + "vendor_id" => 1, "crt" => $now, "crt_by" => $req->auth->uid, "updt" => $now, @@ -252,10 +255,12 @@ class VehiclesController extends Controller $insVhc["model_id"] = $req->model_id; } if ($req->auth->role == Users::ROLE_VENDOR) { - $insVhc["vendor_id"] = $req->auth->uid; + // $insVhc["vendor_id"] = $req->auth->uid; + $insVhc["vendor_id"] = 1; $insVhc["simcard"] = 0; } else { - $insVhc["vendor_id"] = $req->vendor_id ?? 1; + // $insVhc["vendor_id"] = $req->vendor_id ?? 1; + $insVhc["vendor_id"] = 1; } $vid = Vehicles::addVehicle($insVhc);