Skip to content

Commit

Permalink
fix falsely shown prices
Browse files Browse the repository at this point in the history
  • Loading branch information
tih committed Jun 11, 2021
1 parent 7e0388e commit 65f443f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/subscription/UpgradeConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ export class UpgradeConfirmPage implements WizardPageN<UpgradeSubscriptionData>
? lang.get("net_label")
: lang.get("gross_label")

const price = formatPrice(Number(attrs.data.price), true) + " " + (attrs.data.options.paymentInterval() === 12
? lang.get("pricing.perYear_label")
: lang.get("pricing.perMonth_label")) + " (" + netOrGross + ")"
const price = formatPrice(Number(attrs.data.price) * attrs.data.options.paymentInterval() === 12 ? 12 : 1, true) + " "
+ (attrs.data.options.paymentInterval() === 12
? lang.get("pricing.perYear_label")
: lang.get("pricing.perMonth_label")) + " (" + netOrGross + ")"
const priceFieldAttrs = {
label: "priceFirstYear_label",
value: stream(price),
disabeld: true,
disabled: true,
}

const paymentMethodFieldAttrs = {
Expand Down
2 changes: 1 addition & 1 deletion src/subscription/giftcards/PurchaseGiftCardDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class GiftCardPurchaseView implements MComponent<GiftCardPurchaseViewAttrs> {
}
},
price: formatPrice(parseFloat(value), true),
originalPrice: formatPrice(parseFloat(value), true),
originalPrice: "pricing.perYear_label",
helpLabel: () => lang.get(withSubscriptionAmount === 0
? "giftCardOptionTextA_msg"
: "giftCardOptionTextB_msg",
Expand Down

0 comments on commit 65f443f

Please sign in to comment.