historial_id

This commit is contained in:
lizandrogd
2025-02-27 15:19:52 -05:00
parent 0379968258
commit c0e3284c62
9 changed files with 54 additions and 2 deletions
+4
View File
@@ -365,6 +365,7 @@ class ShowPromociones extends Component
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha comprado la promocion ' . $this->consulta->nombre . ' - ' . $this->consulta->descripcion . ' cantidad de ' . $this->historial->cantidad . ' por un valor de $' . $this->historial->valor .', Saldo anterior: $'.$saldo_anterior.', Nuevo saldo disponible: $'.$nuevo_saldo;
$logsGeneral->tipo = 'compra';
$logsGeneral->historial_id = $historial->id;
$logsGeneral->save();
$this->modalComprarPromo = false;
@@ -406,6 +407,7 @@ class ShowPromociones extends Component
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' ha comprado la promocion ' . $this->consulta->nombre . ' - ' . $this->consulta->descripcion . ' cantidad de ' . $this->historial->cantidad . ' por un valor de $' . $this->historial->valor ?? '' . ' y algunos han quedado pendientes'.', Saldo anterior: $'.$saldo_anterior.', Nuevo saldo disponible: $'.$nuevo_saldo;
$logsGeneral->tipo = 'compra';
$logsGeneral->historial_id = $this->historial->id;
$logsGeneral->save();
$this->credenciales($this->historial);
@@ -415,6 +417,7 @@ class ShowPromociones extends Component
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' Tuvo error en el cobro, Comprando la promoción ' . $this->consulta->nombre . ' cantidad de ' . $this->historial->cantidad . ' por un valor de $' . $this->historial->valor .' No se desconto el saldo, ni se asignaron cuentas.';
$logsGeneral->tipo = 'compra_error';
$logsGeneral->historial_id = $this->historial->id;
$logsGeneral->save();
$this->alert('warning', 'Error en el cobro, comuniquese con soporte!', [
'position' => 'top'
@@ -438,6 +441,7 @@ class ShowPromociones extends Component
$logsGeneral->user_id = Auth::user()->id;
$logsGeneral->detalle = 'El usuario ' . Auth::user()->name . ' - ' . Auth::user()->email . ' Cancelo la compra del plan ' . $this->consulta->nombre . ' cantidad de ' . $this->historial->cantidad . ' por un valor de $' . $this->historial->valor.' No se desconto el saldo, ni se asignaron cuentas.';
$logsGeneral->tipo = 'compra_cancelada';
$logsGeneral->historial_id = $this->historial->id;
$logsGeneral->save();
$this->alert('success', 'Compra cancelada!', [
'position' => 'top'