From 4070a060c326a965597f3d000bfef472b73387f7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 25 Nov 2023 09:29:08 +1100 Subject: [PATCH] Use created_at not datetime on status, since datetime may be wrong by the sender --- app/Http/Controllers/HomeController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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([