From b66272c974dfe45406c29e73c0e3a5718ecc69cf Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 25 May 2023 17:21:17 +1000 Subject: [PATCH] only send statements with a balance greater than zero --- app/Services/Scheduler/EmailStatementService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Scheduler/EmailStatementService.php b/app/Services/Scheduler/EmailStatementService.php index 235e142938bb..a7e6f56ae477 100644 --- a/app/Services/Scheduler/EmailStatementService.php +++ b/app/Services/Scheduler/EmailStatementService.php @@ -36,7 +36,7 @@ class EmailStatementService //Email only the selected clients if (count($this->scheduler->parameters['clients']) >= 1) { - $query->whereIn('id', $this->transformKeys($this->scheduler->parameters['clients'])); + $query->whereIn('id', $this->transformKeys($this->scheduler->parameters['clients']))->where('balance', '>', 0); } $query->cursor()