Skip to content

Commit

Permalink
fix: incorrect discounted price display in /lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
duchunter committed Oct 18, 2023
1 parent 1479567 commit c3eb17e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/renderer/pages/lifetime/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@
<p>
{{ $t('common.total') }}
</p>
<p v-if="result.price">
${{ result.price | formatNumber }} {{ result.currency }}
<p v-if="result.immediate_payment">
${{ result.immediate_payment | formatNumber }}
{{ result.currency }}
</p>
</div>
</div>
Expand Down Expand Up @@ -428,7 +429,7 @@ export default {
discountPercentage () {
const res = (this.result.discount * 100) / this.result.total_price
if (!Number.isNaN(res)) {
return Math.ceil(res)
return res.toFixed(2)
}
return 0
}
Expand Down

0 comments on commit c3eb17e

Please sign in to comment.