diff --git a/app/Http/Controllers/Repuve/InscriptionController.php b/app/Http/Controllers/Repuve/InscriptionController.php index ea05cec..f4710e9 100644 --- a/app/Http/Controllers/Repuve/InscriptionController.php +++ b/app/Http/Controllers/Repuve/InscriptionController.php @@ -40,6 +40,7 @@ public function vehicleInscription(VehicleStoreRequest $request) $folio = $request->input('folio'); $tagNumber = $request->input('tag_number'); $niv = $request->input('niv'); + $telefono = $request->input('telefono'); // Buscar Tag y validar que NO tenga vehículo asignado $tag = Tag::where('folio', $folio)->where('tag_number', $tagNumber)->first(); @@ -98,6 +99,7 @@ public function vehicleInscription(VehicleStoreRequest $request) 'num_int' => $ownerData['num_int'], 'colonia' => $ownerData['colonia'], 'cp' => $ownerData['cp'], + 'telefono' => $telefono ] ); @@ -114,7 +116,6 @@ public function vehicleInscription(VehicleStoreRequest $request) 'clase_veh' => $vehicleData['clase_veh'], 'tipo_servicio' => $vehicleData['tipo_servicio'], 'rfv' => $vehicleData['rfv'], - 'rfc' => $vehicleData['rfc'], 'ofcexpedicion' => $vehicleData['ofcexpedicion'], 'fechaexpedicion' => $vehicleData['fechaexpedicion'], 'tipo_veh' => $vehicleData['tipo_veh'], diff --git a/app/Http/Requests/Repuve/VehicleStoreRequest.php b/app/Http/Requests/Repuve/VehicleStoreRequest.php index 83a87fa..a6777ce 100644 --- a/app/Http/Requests/Repuve/VehicleStoreRequest.php +++ b/app/Http/Requests/Repuve/VehicleStoreRequest.php @@ -16,6 +16,7 @@ public function rules(): array 'folio' => ['required', 'string', 'max:50'], 'tag_number' => ['required', 'string', 'exists:tags,tag_number'], 'niv' => ['sometimes', 'string', 'max:30'], + 'telefono' => ['required', 'string', 'max:11'], 'files' => ['nullable', 'array', 'min:1'], 'files.*' => ['file', 'mimes:jpeg,png,jpg', 'max:10240'], 'names' => ['nullable', 'array'], @@ -32,6 +33,8 @@ public function messages(): array 'tag_number.exists' => 'El tag_number no existe en el sistema', 'niv.required' => 'El niv es requerido', 'niv.string' => 'El niv debe ser una cadena de texto', + 'telefono.required' => 'El teléfono es requerido', + 'telefono.max' => 'El teléfono no debe superar los 10 caracteres', 'files.array' => 'Los archivos deben ser un array', 'files.*.file' => 'Cada elemento debe ser un archivo válido', 'files.*.mimes' => 'Los archivos deben ser de tipo: jpeg, png, jpg, pdf', diff --git a/app/Models/Vehicle.php b/app/Models/Vehicle.php index af30813..80d38e4 100644 --- a/app/Models/Vehicle.php +++ b/app/Models/Vehicle.php @@ -23,7 +23,6 @@ class Vehicle extends Model 'clase_veh', 'tipo_servicio', 'rfv', - 'rfc', 'ofcexpedicion', 'fechaexpedicion', 'tipo_veh', diff --git a/app/Services/PadronEstatalService.php b/app/Services/PadronEstatalService.php index 6672e6c..8d7fb21 100644 --- a/app/Services/PadronEstatalService.php +++ b/app/Services/PadronEstatalService.php @@ -135,7 +135,6 @@ public function extraerDatosVehiculo(array $datos): array 'clase_veh' => $datos['clase_veh'] ?? null, 'tipo_servicio' => $datos['tipo_uso'] ?? null, 'rfv' => $datos['rfv'] ?? null, - 'rfc' => $datos['rfc'] ?? null, 'ofcexpedicion' => $datos['ofcexp'] ?? null, 'fechaexpedicion' => $datos['fechaexp'] ?? null, 'tipo_veh' => $datos['tipo_veh'] ?? null, diff --git a/database/migrations/2025_10_18_140600_create_vehicle_table.php b/database/migrations/2025_10_18_140600_create_vehicle_table.php index a9092b2..e14a8eb 100644 --- a/database/migrations/2025_10_18_140600_create_vehicle_table.php +++ b/database/migrations/2025_10_18_140600_create_vehicle_table.php @@ -24,7 +24,6 @@ public function up(): void $table->string('clase_veh')->nullable(); $table->string('tipo_servicio')->nullable(); $table->string('rfv')->unique()->nullable(); - $table->string('rfc')->nullable(); $table->string('ofcexpedicion')->nullable(); $table->date('fechaexpedicion')->nullable(); $table->string('tipo_veh')->nullable();