only send statements with a balance greater than zero

This commit is contained in:
David Bomba 2023-05-25 17:21:17 +10:00
parent 310d14fd9c
commit b66272c974

View File

@ -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()