planes +30 dias
This commit is contained in:
@@ -204,8 +204,6 @@ class ShowPlanes extends Component
|
||||
}
|
||||
public function openRenovar()
|
||||
{
|
||||
$this->renovar = true;
|
||||
|
||||
$id = $this->id_cuentaVer;
|
||||
|
||||
$renovarCuenta = Cuentas::findOrFail($id);
|
||||
@@ -217,14 +215,16 @@ class ShowPlanes extends Component
|
||||
$this->fecha_final_renovar_old = $renovarCuenta->vencimiento;
|
||||
$this->fecha_final_renovar = $renovarCuenta->vencimiento;
|
||||
$this->estado = $renovarCuenta->estado;
|
||||
|
||||
$this->renovar = true;
|
||||
}
|
||||
|
||||
public function calcularFechas()
|
||||
{
|
||||
$this->fecha_inicial_renovar = Carbon::now()->format('Y-m-d');
|
||||
$this->fecha_final_renovar = Carbon::now()->addDays(30)->format('Y-m-d');
|
||||
$this->fecha_final_renovar = Carbon::parse($this->fecha_final_renovar)->addDays(30)->format('Y-m-d');
|
||||
}
|
||||
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
return [
|
||||
@@ -277,7 +277,7 @@ class ShowPlanes extends Component
|
||||
{
|
||||
$id = $this->id_cuentaVer;
|
||||
|
||||
$historial = Historial_cuenta::where('cuenta_id', $id)->first();
|
||||
$historial = Historial_cuenta::where('cuenta_id', $id)->get();
|
||||
|
||||
Historiale::where('id', $historial->historiale_id)->update([
|
||||
'fecha_final' => date('Y-m-d', strtotime(strval($this->fecha_final_renovar))),
|
||||
|
||||
Reference in New Issue
Block a user