1. set periodEnd to the next month if subscription cancelled at periodEnd

This commit is contained in:
Jlit1001 2015-10-08 19:43:13 -07:00
parent a34e4b3afd
commit b9f0aa1622

View file

@ -197,6 +197,7 @@ class PersonalSub
if sub = info.subscription
periodEnd = new Date((sub.trial_end or sub.current_period_end) * 1000)
if sub.cancel_at_period_end
periodEnd.setMonth(periodEnd.getMonth() + 1)
@activeUntil = periodEnd
else if sub.discount?.coupon?.id isnt 'free'
@nextPaymentDate = periodEnd