fix
This commit is contained in:
@@ -265,7 +265,6 @@ class ShowClientes extends Component
|
|||||||
|
|
||||||
public function renovar($id)
|
public function renovar($id)
|
||||||
{
|
{
|
||||||
|
|
||||||
$historiale = Historiale::with('tarifa')->find($id);
|
$historiale = Historiale::with('tarifa')->find($id);
|
||||||
|
|
||||||
|
|
||||||
@@ -280,11 +279,12 @@ class ShowClientes extends Component
|
|||||||
$historiale->fecha_final = $newFechaFinal;
|
$historiale->fecha_final = $newFechaFinal;
|
||||||
$historiale->save();
|
$historiale->save();
|
||||||
|
|
||||||
|
$user = Auth::user();
|
||||||
|
$user->saldo->valor -= $historiale->tarifa->valor;
|
||||||
|
$user->saldo->save();
|
||||||
|
|
||||||
$this->alert('success', 'Registro renovado con éxito. Nuevas fechas aplicadas.', [
|
$this->alert('success', 'Registro renovado con éxito. Nuevas fechas aplicadas.', [
|
||||||
'position' => 'top'
|
'position' => 'top'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
public function saldoSuficiente()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user