diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 4726c25..402cacc 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -255,7 +255,7 @@ class HomeController extends Controller ->whereNotNull('export_at') ->whereNull('sent_at') ->whereNull('echomails.deleted_at') - ->where('datetime','<',$date) + ->where('echomails.created_at','<',$date) ->groupBy('addresses.id'); $n = Address::select(['addresses.id',DB::raw('0 as e'),DB::raw('count(*) as n'),DB::raw('0 as f')]) @@ -266,7 +266,7 @@ class HomeController extends Controller }) ->whereRaw(sprintf('(flags & %d) = 0',Message::FLAG_SENT)) ->whereNull('netmails.deleted_at') - ->where('datetime','<',$date) + ->where('netmails.created_at','<',$date) ->groupBy('addresses.id'); $f = Address::select(['addresses.id',DB::raw('0 as e'),DB::raw('0 as n'),DB::raw('count(*) as f')]) @@ -275,7 +275,7 @@ class HomeController extends Controller ->whereNotNull('export_at') ->whereNull('sent_at') ->whereNull('files.deleted_at') - ->where('datetime','<',$date) + ->where('files.created_at','<',$date) ->groupBy('addresses.id'); $r = Address::select([