From c485b1bad41000776779c9e5f0609fdae913bd14 Mon Sep 17 00:00:00 2001 From: lizandrogd <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 27 Jul 2023 14:32:21 -0500 Subject: [PATCH] update --- app/Http/Livewire/ShowClientes.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/Http/Livewire/ShowClientes.php b/app/Http/Livewire/ShowClientes.php index a83c803..59bd732 100644 --- a/app/Http/Livewire/ShowClientes.php +++ b/app/Http/Livewire/ShowClientes.php @@ -287,6 +287,19 @@ class ShowClientes extends Component $nuevoHistorial->fecha_final = $newFechaFinal; $nuevoHistorial->save(); + $pantallas = $cuenta->servicio->completa; + //dd($pantallas); + for ($i=1; $i <= $pantallas ; $i++) { + $historial_cuenta = new Historial_cuenta; + $historial_cuenta->historial_id = $nuevoHistorial->id; + $historial_cuenta->cuenta_id = $cuenta->id; + $historial_cuenta->perfil = $i; + $historial_cuenta->save(); + } + + + + $cuenta->vencimiento = $nuevaFechaVencimiento; $cuenta->save();