Update ShowPlanes.php
This commit is contained in:
@@ -116,6 +116,7 @@ class ShowPlanes extends Component
|
||||
public $notaEliminarVariosModal = false;
|
||||
public $nota_eliminacion;
|
||||
public $cont;
|
||||
public $tiempo_usuario;
|
||||
|
||||
|
||||
|
||||
@@ -222,6 +223,7 @@ class ShowPlanes extends Component
|
||||
public function calcularFechas()
|
||||
{
|
||||
$this->fecha_final_renovar = Carbon::parse($this->fecha_final_renovar)->addDays(30)->format('Y-m-d');
|
||||
$this->tiempo_usuario = 30;
|
||||
}
|
||||
|
||||
|
||||
@@ -279,8 +281,11 @@ class ShowPlanes extends Component
|
||||
|
||||
$historial = Historial_cuenta::where('cuenta_id', $id)->first();
|
||||
|
||||
$consultaFechaFinal = Historiale::where('id', $historial->historiale_id)->fecha_final;
|
||||
$nuevaFecha= $consultaFechaFinal->addDays($this->tiempo_usuario);
|
||||
|
||||
Historiale::where('id', $historial->historiale_id)->update([
|
||||
'fecha_final' => date('Y-m-d', strtotime(strval($this->fecha_final_renovar))),
|
||||
'fecha_final' => date('Y-m-d', strtotime(strval($nuevaFecha))),
|
||||
]);
|
||||
|
||||
$cuenta_renovar = Cuentas::find($id);
|
||||
|
||||
Reference in New Issue
Block a user