pendientes
This commit is contained in:
@@ -273,22 +273,39 @@ class ShowServicios extends Component
|
|||||||
|
|
||||||
|
|
||||||
$cantidad_necesaria = $this->cantidad_tarjetaPlan;
|
$cantidad_necesaria = $this->cantidad_tarjetaPlan;
|
||||||
$cuenta = Cuentas::where('servicio_id', $this->servicio_id)->whereDate('inicio', '>=', $this->fecha)
|
$cuenta = Cuentas::where('servicio_id', $this->servicio_id)
|
||||||
|
->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)
|
||||||
// ->whereDate('vencimiento','>=', $this->fechaFinal)
|
// ->whereDate('vencimiento','>=', $this->fechaFinal)
|
||||||
->Orderby('created_at', 'ASC')->withCount('historiales')->where('estado', 'activo')->having('historiales_count', '<=', $suma)->get();
|
->Orderby('created_at', 'ASC')
|
||||||
|
->withCount('historiales')
|
||||||
|
->where('estado', 'activo')
|
||||||
|
->having('historiales_count', '<=', $suma)
|
||||||
|
->get();
|
||||||
// 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)->whereDate('inicio', '>=', $this->fecha)->whereDate('vencimiento', '>=', $this->fecha_final_1)
|
$cuenta = Cuentas::where('servicio_id', $this->servicio_id)
|
||||||
|
->whereDate('inicio', '>=', $this->fecha)
|
||||||
|
->whereDate('vencimiento', '>=', $this->fecha_final_1)
|
||||||
->whereDate('vencimiento', '<=', $this->fecha_final_2)
|
->whereDate('vencimiento', '<=', $this->fecha_final_2)
|
||||||
->Orderby('created_at', 'ASC')->withCount('historiales')->where('estado', 'pendiente')->having('historiales_count', '==', 0)->get();
|
->Orderby('created_at', 'ASC')
|
||||||
|
->withCount('historiales')
|
||||||
|
->where('estado', 'pendiente')
|
||||||
|
->having('historiales_count', '==', 0)
|
||||||
|
->get();
|
||||||
} elseif ((int) $pantalla_servicio < (int) $cantidad_solicitada) {
|
} elseif ((int) $pantalla_servicio < (int) $cantidad_solicitada) {
|
||||||
$suma2 = $pantalla_servicio - $pantallas;
|
$suma2 = $pantalla_servicio - $pantallas;
|
||||||
$cantidad_necesaria = $this->cantidad_tarjetaPlan;
|
$cantidad_necesaria = $this->cantidad_tarjetaPlan;
|
||||||
$cuenta = Cuentas::where('servicio_id', $this->servicio_id)->whereDate('inicio', '>=', $this->fecha)->Orderby('created_at', 'ASC')->withCount('historiales')->where('estado', 'activo')->having('historiales_count', '<=', $suma2)->get();
|
$cuenta = Cuentas::where('servicio_id', $this->servicio_id)
|
||||||
|
->whereDate('inicio', '>=', $this->fecha)
|
||||||
|
->Orderby('created_at', 'ASC')
|
||||||
|
->withCount('historiales')
|
||||||
|
->where('estado', 'activo')
|
||||||
|
->having('historiales_count', '<=', $suma2)
|
||||||
|
->get();
|
||||||
} else {
|
} else {
|
||||||
$cuenta = null;
|
$cuenta = null;
|
||||||
$cantidad_necesaria = null;
|
$cantidad_necesaria = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user