Start work on updating services
This commit is contained in:
@@ -90,11 +90,11 @@ final class BroadbandTraffic implements ShouldQueue
|
||||
// Find the right service dependant on the dates we supplied the service
|
||||
$oo = Adsl::where('service_username',$row[$o->getColumnKey('Login')])
|
||||
->select(DB::raw('ab_service__adsl.*'))
|
||||
->join('ab_service','ab_service.id','=','service_id')
|
||||
->where('ab_service.date_start','<=',$date->format('U'))
|
||||
->join('services','services.id','=','service_id')
|
||||
->where('services.start_at','<=',$date)
|
||||
->where(function($query) use ($date) {
|
||||
$query->whereNULL('ab_service.date_end')
|
||||
->orWhere('ab_service.date_end','<=',$date->format('U'));
|
||||
$query->whereNULL('services.stop_at')
|
||||
->orWhere('services.stop_at','<=',$date);
|
||||
})
|
||||
->get();
|
||||
|
||||
|
Reference in New Issue
Block a user