subscription: Fix issue with code optimization during bundle transfer
@@ -106,7 +106,7 @@ join (select
left join <tableName()> se2
on se1.subscription_id = se2.subscription_id and se2.user_type = 'CANCEL' and se2.is_active
where
- se1.user_type = 'CREATE' and se1.is_active
+ se1.user_type in ('CREATE','TRANSFER') and se1.is_active
and (se2.id IS NULL or se2.effective_date \> :cutoffDt)
and <accountRecordIdField("se1.")> = :accountRecordId) tmp on tmp.subscription_id = se.subscription_id
where
