diff --git a/app/Jobs/WhatsappUnsoldCommodityNotification.php b/app/Jobs/WhatsappUnsoldCommodityNotification.php index 01a698b..b8576e7 100644 --- a/app/Jobs/WhatsappUnsoldCommodityNotification.php +++ b/app/Jobs/WhatsappUnsoldCommodityNotification.php @@ -85,6 +85,11 @@ class WhatsappUnsoldCommodityNotification extends Job $logger->info('End time is in the past'); return false; } + + if (! $isLatestKomoditiToday) { + $logger->info('No commodity is bought today, so technically no komoditi is sold and notifications will not be sent'); + return false; + } if ($isLatestKomoditiToday && $isAllKomoditiSold) { $logger->info('All today komoditi is sold');