Show correct price per year in 2year premium.

Fixes #29961.
This commit is contained in:
John Preston
2025-10-31 18:41:21 +04:00
parent d02a8cbca1
commit eddad6b690
4 changed files with 23 additions and 21 deletions

View File

@@ -36,7 +36,9 @@ Data::PremiumSubscriptionOption CreateSubscriptionOption(
.costNoDiscount = Ui::FillAmountAndCurrency(
monthlyAmount * months,
currency),
.costTotal = Ui::FillAmountAndCurrency(amount, currency),
.costPerYear = Ui::FillAmountAndCurrency(
amount / float64(months / 12.),
currency),
.botUrl = botUrl,
};
}