cambia al fecha del historial
This commit is contained in:
@@ -277,7 +277,11 @@ class ShowPlanes extends Component
|
||||
{
|
||||
$id = $this->id_cuentaVer;
|
||||
|
||||
Historial_cuenta::where('cuenta_id', $id)->delete();
|
||||
$historial = Historial_cuenta::where('cuenta_id', $id)->first();
|
||||
|
||||
Historiale::where('id', $historial->historiale_id)->update([
|
||||
'fecha_final' => date('Y-m-d', strtotime(strval($this->fecha_final_renovar))),
|
||||
]);
|
||||
|
||||
$cuenta_renovar = Cuentas::find($id);
|
||||
|
||||
@@ -289,6 +293,8 @@ class ShowPlanes extends Component
|
||||
'estado' => $this->estado,
|
||||
]);
|
||||
|
||||
$historial->delete();
|
||||
|
||||
Log_historial::create([
|
||||
'user_id' => Auth::user()->id,
|
||||
'detalle' => 'El usuario ha renovado y liberado la cuenta ' . $cuenta_renovar->correo
|
||||
@@ -313,6 +319,14 @@ class ShowPlanes extends Component
|
||||
'estado' => $this->estado,
|
||||
]);
|
||||
|
||||
$historial = Historial_cuenta::where('cuenta_id', $id)->first();
|
||||
|
||||
if ($historial) {
|
||||
Historiale::where('id', $historial->historial_id)->update([
|
||||
'fecha_final' => date('Y-m-d', strtotime(strval($this->fecha_final_renovar))),
|
||||
]);
|
||||
}
|
||||
|
||||
$cuenta_renovar = Cuentas::find($id);
|
||||
|
||||
Log_historial::create([
|
||||
|
||||
Reference in New Issue
Block a user