cambia al fecha del historial
This commit is contained in:
@@ -331,12 +331,14 @@ class ShowPromociones extends Component
|
||||
'confirmButtonText' => 'Sí, comprar.',
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$descuento = Saldo::where('usuario_id', Auth::user()->id)->first();
|
||||
$saldo_anterior = $descuento->valor;
|
||||
$nuevo_saldo = $saldo_anterior - ($this->precioAhora * $this->cantidad_comprarPromo);
|
||||
$cobro = $descuento->update(['valor' => $nuevo_saldo]);
|
||||
|
||||
|
||||
if ($cobro) {
|
||||
$historial->update(['estado' => 'activo']);
|
||||
$this->modalComprarPromo = false;
|
||||
|
||||
Reference in New Issue
Block a user