mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-30 14:51:13 -04:00
1. set periodEnd to the next month if subscription cancelled at periodEnd
This commit is contained in:
parent
a34e4b3afd
commit
b9f0aa1622
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue