Reapply "Update ShowServicios.php"

This reverts commit 3e0f5d6bcb.
This commit is contained in:
lizandrogd
2024-10-24 20:36:47 -05:00
parent 6d0ccea2a9
commit e24b2e6799
+10 -2
View File
@@ -341,16 +341,22 @@ class ShowServicios extends Component
}
// dd($cuenta);
} elseif ((int) $pantalla_servicio_completa == (int) $this->pantallas_tarjetaPlan) {
//Cuentas completas
$cantidad_necesaria = $this->cantidad_tarjetaPlan;
$cuenta = Cuentas::where('servicio_id', $this->servicio_id)
->whereDate('inicio', '>=', $this->fecha)
//->whereDate('inicio', '>=', $this->fecha)
->whereDate('vencimiento', '>=', $this->fecha_final_1)
->whereDate('vencimiento', '<=', $this->fecha_final_2)
->Orderby('inicio', 'ASC')
->withCount('historiales')
->where('estado', 'pendiente')
->doesntHave('perfil')
->where(function ($query) {
$query->doesntHave('perfil')
->orWhereHas('perfil', function ($query) {
$query->whereNull('historial_id');
});
})
->get();
} elseif ((int) $pantalla_servicio < (int) $cantidad_solicitada) {
$suma2 = $pantalla_servicio - $pantallas;
@@ -377,6 +383,8 @@ class ShowServicios extends Component
$cuentasMostar = '';
for ($h = 0; $h < (int) $cantidad_necesaria; $h++) {
//dd($cuenta);
if (!empty($cuenta) && isset($cuenta[$h])) {
$esta_error = false;
$cuentasMostar = '';