From 51a4c33e91fdd0cb5e4b812bd7538f4d6c7042ff Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Thu, 9 May 2019 13:53:50 +0100 Subject: [PATCH] Merge pull request #1748 from overleaf/hb-fix-change-plan-vat-display Use two decimal places for inc-vat change plan prices GitOrigin-RevId: 6dd46c42693345ba0aaca5cfe061bc907a112a68 --- services/web/public/src/main/subscription-dashboard.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/web/public/src/main/subscription-dashboard.js b/services/web/public/src/main/subscription-dashboard.js index 22f7cf8d51..4fa6274b86 100644 --- a/services/web/public/src/main/subscription-dashboard.js +++ b/services/web/public/src/main/subscription-dashboard.js @@ -73,7 +73,11 @@ define(['base'], function(App) { if (isNaN(taxAmmount)) { taxAmmount = 0 } - resolve(`${currencySymbol}${totalPriceExTax + taxAmmount}`) + let total = totalPriceExTax + taxAmmount + if (total % 1 !== 0) { + total = total.toFixed(2) + } + resolve(`${currencySymbol}${total}`) }) }) }