@@ -341,22 +341,16 @@ class ShowServicios extends Component
|
|||||||
}
|
}
|
||||||
// dd($cuenta);
|
// dd($cuenta);
|
||||||
} elseif ((int) $pantalla_servicio_completa == (int) $this->pantallas_tarjetaPlan) {
|
} elseif ((int) $pantalla_servicio_completa == (int) $this->pantallas_tarjetaPlan) {
|
||||||
|
|
||||||
//Cuentas completas
|
//Cuentas completas
|
||||||
$cantidad_necesaria = $this->cantidad_tarjetaPlan;
|
$cantidad_necesaria = $this->cantidad_tarjetaPlan;
|
||||||
$cuenta = Cuentas::where('servicio_id', $this->servicio_id)
|
$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_1)
|
||||||
->whereDate('vencimiento', '<=', $this->fecha_final_2)
|
->whereDate('vencimiento', '<=', $this->fecha_final_2)
|
||||||
->Orderby('inicio', 'ASC')
|
->Orderby('inicio', 'ASC')
|
||||||
->withCount('historiales')
|
->withCount('historiales')
|
||||||
->where('estado', 'pendiente')
|
->where('estado', 'pendiente')
|
||||||
->where(function ($query) {
|
->doesntHave('perfil')
|
||||||
$query->doesntHave('perfil')
|
|
||||||
->orWhereHas('perfil', function ($query) {
|
|
||||||
$query->whereNull('historial_id');
|
|
||||||
});
|
|
||||||
})
|
|
||||||
->get();
|
->get();
|
||||||
} elseif ((int) $pantalla_servicio < (int) $cantidad_solicitada) {
|
} elseif ((int) $pantalla_servicio < (int) $cantidad_solicitada) {
|
||||||
$suma2 = $pantalla_servicio - $pantallas;
|
$suma2 = $pantalla_servicio - $pantallas;
|
||||||
@@ -383,8 +377,6 @@ class ShowServicios extends Component
|
|||||||
|
|
||||||
$cuentasMostar = '';
|
$cuentasMostar = '';
|
||||||
for ($h = 0; $h < (int) $cantidad_necesaria; $h++) {
|
for ($h = 0; $h < (int) $cantidad_necesaria; $h++) {
|
||||||
//dd($cuenta);
|
|
||||||
|
|
||||||
if (!empty($cuenta) && isset($cuenta[$h])) {
|
if (!empty($cuenta) && isset($cuenta[$h])) {
|
||||||
$esta_error = false;
|
$esta_error = false;
|
||||||
$cuentasMostar = '';
|
$cuentasMostar = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user