Fix counting inactive subscribers in segments list

[MAILPOET-2007]
This commit is contained in:
Ján Mikláš
2019-04-24 15:13:05 +02:00
committed by M. Shull
parent 8710363a09
commit 8df50afc2b

View File

@ -99,7 +99,7 @@ class Segment extends Model {
)
->select_expr(
'SUM(CASE WHEN subscribers.status = "' . Subscriber::STATUS_INACTIVE . '"
OR relation.status = "' . Subscriber::STATUS_UNSUBSCRIBED . '" THEN 1 ELSE 0 END)',
AND relation.status != "' . Subscriber::STATUS_UNSUBSCRIBED . '" THEN 1 ELSE 0 END)',
Subscriber::STATUS_INACTIVE
)
->select_expr(