Update ShowPlanes.php
This commit is contained in:
@@ -319,7 +319,7 @@ class ShowPlanes extends Component
|
|||||||
$this->tiempo_usuario = $this->fecha_final_renovar->diffInDays($this->fecha_inicial_renovar);
|
$this->tiempo_usuario = $this->fecha_final_renovar->diffInDays($this->fecha_inicial_renovar);
|
||||||
|
|
||||||
$id = $this->id_cuentaVer;
|
$id = $this->id_cuentaVer;
|
||||||
//dd( date('Y-m-d', strtotime(strval($this->fecha_final_renovar))));
|
//dd( date('Y-m-d', strtotime(strval($this->fecha_final_renovar))));
|
||||||
// Corrección 2: Verifica que la cuenta exista antes de intentar actualizarla
|
// Corrección 2: Verifica que la cuenta exista antes de intentar actualizarla
|
||||||
$cuenta = Cuentas::find($id);
|
$cuenta = Cuentas::find($id);
|
||||||
if ($cuenta) {
|
if ($cuenta) {
|
||||||
@@ -365,7 +365,7 @@ class ShowPlanes extends Component
|
|||||||
if (Auth::check()) {
|
if (Auth::check()) {
|
||||||
$logsGeneral = new Log_general();
|
$logsGeneral = new Log_general();
|
||||||
$logsGeneral->user_id = Auth::user()->id;
|
$logsGeneral->user_id = Auth::user()->id;
|
||||||
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha renovado el servicio:' . $servicioNombre . ' con cuenta ' . $cuenta->correo . ' para el cliente: ' . $historial->cliente->name .' - '.$historial->cliente->email;
|
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha renovado el servicio:' . $servicioNombre . ' con cuenta ' . $cuenta->correo . ' para el cliente: ' . $historial->cliente->name . ' - ' . $historial->cliente->email;
|
||||||
$logsGeneral->save();
|
$logsGeneral->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user