From 305924b6ca48fe50835c813fffa97c65302bf67d Mon Sep 17 00:00:00 2001 From: Felipe Date: Thu, 27 Jul 2023 11:02:18 -0500 Subject: [PATCH] fix --- app/Http/Livewire/ShowClientes.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Livewire/ShowClientes.php b/app/Http/Livewire/ShowClientes.php index ec3a500..1b39ce9 100644 --- a/app/Http/Livewire/ShowClientes.php +++ b/app/Http/Livewire/ShowClientes.php @@ -265,7 +265,6 @@ class ShowClientes extends Component public function renovar($id) { - $historiale = Historiale::with('tarifa')->find($id); @@ -280,11 +279,12 @@ class ShowClientes extends Component $historiale->fecha_final = $newFechaFinal; $historiale->save(); + $user = Auth::user(); + $user->saldo->valor -= $historiale->tarifa->valor; + $user->saldo->save(); + $this->alert('success', 'Registro renovado con éxito. Nuevas fechas aplicadas.', [ 'position' => 'top' ]); } - public function saldoSuficiente() - { - } }