Show inactive column in Lists

[MAILPOET-1973]
This commit is contained in:
Ján Mikláš
2019-04-11 11:23:22 +02:00
committed by Rostislav Wolný
parent 07af1df3a5
commit 2e7de9ce13
2 changed files with 13 additions and 0 deletions

View File

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