fix(core): adjust discount display (#4847)
This commit is contained in:
@@ -53,10 +53,9 @@ const Settings = () => {
|
|||||||
if (detail?.type === 'fixed') {
|
if (detail?.type === 'fixed') {
|
||||||
detail.price = (price.amount / 100).toFixed(2);
|
detail.price = (price.amount / 100).toFixed(2);
|
||||||
detail.yearlyPrice = (price.yearlyAmount / 100 / 12).toFixed(2);
|
detail.yearlyPrice = (price.yearlyAmount / 100 / 12).toFixed(2);
|
||||||
detail.discount = (
|
detail.discount = Math.floor(
|
||||||
(1 - price.yearlyAmount / 12 / price.amount) *
|
(1 - price.yearlyAmount / 12 / price.amount) * 100
|
||||||
100
|
).toString();
|
||||||
).toFixed(2);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user