mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:34:30 -04:00
Update logic for zero balance sending
This commit is contained in:
parent
4677f92083
commit
fe9de2ee97
@ -32,12 +32,13 @@ class EmailStatementService
|
|||||||
{
|
{
|
||||||
$query = Client::query()
|
$query = Client::query()
|
||||||
->where('company_id', $this->scheduler->company_id)
|
->where('company_id', $this->scheduler->company_id)
|
||||||
->where('is_deleted', 0)
|
->where('is_deleted', 0);
|
||||||
->where('balance', '>', 0);
|
|
||||||
|
|
||||||
//Email only the selected clients
|
//Email only the selected clients
|
||||||
if (count($this->scheduler->parameters['clients']) >= 1) {
|
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']));
|
||||||
|
}else {
|
||||||
|
$query->where('balance', '>', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query->cursor()
|
$query->cursor()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user