fix #951 also retroactively
This commit is contained in:
parent
01d779723f
commit
4b4a5361ef
|
@ -13,7 +13,7 @@ export function nextBilling (relativeTo, billingType) {
|
|||
|
||||
export function purchasedType (sub) {
|
||||
if (!sub?.billPaidUntil) return 'ONCE'
|
||||
return diffDays(new Date(sub.billedLastAt), new Date(sub.billPaidUntil)) >= 365 ? 'YEARLY' : 'MONTHLY'
|
||||
return diffDays(new Date(sub.billedLastAt), new Date(sub.billPaidUntil)) >= 364 ? 'YEARLY' : 'MONTHLY'
|
||||
}
|
||||
|
||||
export function proratedBillingCost (sub, newBillingType) {
|
||||
|
|
Loading…
Reference in New Issue