Update ShowServicios.php

This commit is contained in:
lizandrogd
2024-05-11 12:16:34 -05:00
parent 951abff9f2
commit 21e18282aa
+4 -1
View File
@@ -355,6 +355,7 @@ class ShowServicios extends Component
}
} else {
$esta_error = true;
$historial->update(['estado' => 'cancelado']);
$eliminar = Historial_cuenta::where('historial_id', $historial->id)->delete();
$logsGeneral = new Log_general();
$logsGeneral->user_id = Auth::user()->id;
@@ -378,12 +379,14 @@ class ShowServicios extends Component
$logsGeneral = new Log_general();
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha comprado el servicio ' . $servicioNombre . ' - ' . $cuentasMostar . ' cantidad de ' . $this->cantidad_tarjetaPlan . ' por un valor de $' . $total_valor;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha comprado el servicio ' . $servicioNombre . ' - ' . $cuentasMostar . ' cantidad de ' . $this->cantidad_tarjetaPlan . ' por un valor de $' . $total_valor .', Nuevo saldo disponible: $'.$nuevo_saldo;
$logsGeneral->save();
$this->credenciales($historial);
} else {
$historial->update(['estado' => 'cancelado']);
$logsGeneral = new Log_general();
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' Tuvo un error con el cobro del servicio ' . $servicioNombre . ' - ' . $cuentasMostar . ' cantidad de ' . $this->cantidad_tarjetaPlan . ' por un valor de $' . $total_valor;