subscription: Fix getActiveByAccountRecordId query issue (filter out non active events)
@@ -110,7 +110,8 @@ join (select
and (se2.id IS NULL or se2.effective_date \> :cutoffDt)
and <accountRecordIdField("se1.")> = :accountRecordId) tmp on tmp.subscription_id = se.subscription_id
where
-<accountRecordIdField("se.")> = :accountRecordId
+se.is_active
+and <accountRecordIdField("se.")> = :accountRecordId
<AND_CHECK_TENANT("se.")>
<defaultOrderBy("se.")>
;
