fix modal clientes

This commit is contained in:
Felipe
2024-04-29 10:06:57 -05:00
parent a78176dfdb
commit 581f0e2d7d
3 changed files with 46 additions and 53 deletions
+4 -10
View File
@@ -50,10 +50,11 @@ class ShowClientes extends Component
$this->fechaActual = date('d/m/Y');
$fechaVencimiento = Carbon::now()->subDay(30);
$consulta_clientes = Historiale::where('vendedor_id', Auth()->user()->id)->whereDate('fecha_final', '>', $fechaVencimiento);
// $consulta_clientes = Historiale::whereDate('fecha_final', '>', $fechaVencimiento);
$consulta_clientes = Historiale::
where('vendedor_id', Auth()->user()->id)->
whereDate('fecha_final', '>', $fechaVencimiento);
$this->configuracion = User::where('id', Auth::user()->id)->whereDate('updated_at', '!=', $fechaHoy)->first();
$this->configuracion = User::where('id', Auth::user()->id)->whereDate('updated_at', '!=', Carbon::now())->first();
if ($this->configuracion) {
$this->vencidosHoy = true;
@@ -72,20 +73,13 @@ class ShowClientes extends Component
}
if ($this->venceHoy) {
//$fecha5 = Carbon::parse($fechaHoy)->subDay(5);
$consulta_clientes = $consulta_clientes->whereDate('fecha_final', $fechaHoy);
//->whereDate('fecha_final', '>=', $fecha5);
}
$consulta_clientes = $consulta_clientes->with('tarifa', 'promocion', 'cliente')
->orderBy('id', 'DESC')
->paginate($this->entradas);
// dd($consulta_clientes);
return view('livewire.show-clientes', [
'clientes' => $consulta_clientes
]);