Update ShowPlanes.php
This commit is contained in:
@@ -317,7 +317,7 @@ class ShowPlanes extends Component
|
||||
'detalle' => 'El usuario ha renovado y liberado la cuenta ' . $cuenta_renovar->correo
|
||||
]);
|
||||
|
||||
$servicio_id= $cuenta_renovar->servicio->id;
|
||||
$servicio_id = $cuenta_renovar->servicio->id;
|
||||
$servicioPantallas = Servicio::find($servicio_id)->pantallas;
|
||||
|
||||
$cuentasPendientes = Pendientes::where('estado', 'pendiente')->where('servicio_id', $servicio_id)->take($servicioPantallas)->get();
|
||||
@@ -327,7 +327,7 @@ class ShowPlanes extends Component
|
||||
|
||||
$historial_cuenta = new Historial_cuenta();
|
||||
$historial_cuenta->historial_id = $cuentaPendiente->historial_id;
|
||||
$historial_cuenta->cuenta_id = $id->id;
|
||||
$historial_cuenta->cuenta_id = $id;
|
||||
$historial_cuenta->perfil = $i + 1;
|
||||
$historial_cuenta->save();
|
||||
$cuentaPendiente->update(['estado' => 'cerrado']);
|
||||
@@ -343,10 +343,10 @@ class ShowPlanes extends Component
|
||||
$consulta->todos = false;
|
||||
$consulta->save();
|
||||
|
||||
Log_historial::create([
|
||||
'user_id' => $historial_cuenta->historial->vendedor_id,
|
||||
'detalle' => 'La cuenta de ' . $servicioName . ' ha sido renovada y asignada desde pendiente, correo: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password . ', al usuario ' . $cuentaPendiente->historial->cliente->name,
|
||||
]);
|
||||
$logsGeneral = new Log_general();
|
||||
$logsGeneral->user_id = $historial_cuenta->historial->vendedor_id;
|
||||
$logsGeneral->detalle = 'Se asigno una cuenta ' . $servicioName . ', con credenciales: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password . ' Que se encontraba en estado pendiente';
|
||||
$logsGeneral->save();
|
||||
}
|
||||
|
||||
|
||||
@@ -487,10 +487,10 @@ class ShowPlanes extends Component
|
||||
$consulta->todos = false;
|
||||
$consulta->save();
|
||||
|
||||
Log_historial::create([
|
||||
'user_id' => $historial_cuenta->historial->vendedor_id,
|
||||
'detalle' => 'La cuenta de ' . $servicioName . ' ha sido creada y asignada desde pendiente, correo: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password . ', al usuario ' . $cuentaPendiente->historial->cliente->name,
|
||||
]);
|
||||
$logsGeneral = new Log_general();
|
||||
$logsGeneral->user_id = $historial_cuenta->historial->vendedor_id;
|
||||
$logsGeneral->detalle = 'Se asigno una cuenta ' . $servicioName . ', con credenciales: ' . $historial_cuenta->cuenta->correo . ' contraseña: ' . $historial_cuenta->cuenta->password . ' Que se encontraba en estado pendiente';
|
||||
$logsGeneral->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user