Explorar o código

Merge pull request #23129 from overleaf/ii-flexible-group-licensing-sales-tax-percentage

[web] Fix sales tax percentage in add seats page

GitOrigin-RevId: 0cb0ab537fbe190d7291deb5942c244a5b0bd3af
Liangjun Song hai 1 ano
pai
achega
e91079d493

+ 5 - 1
services/web/frontend/js/features/group-management/components/add-seats/cost-summary.tsx

@@ -18,6 +18,7 @@ type CostSummaryProps = {
 
 function CostSummary({ subscriptionChange, totalLicenses }: CostSummaryProps) {
   const { t } = useTranslation()
+  const factor = 100
 
   return (
     <Card
@@ -79,7 +80,10 @@ function CostSummary({ subscriptionChange, totalLicenses }: CostSummaryProps) {
                 >
                   <span className="me-auto">
                     {t('sales_tax')} &middot;{' '}
-                    {subscriptionChange.nextInvoice.tax.rate * 100}%
+                    {Math.round(
+                      subscriptionChange.nextInvoice.tax.rate * 100 * factor
+                    ) / factor}
+                    %
                   </span>
                   <span data-testid="price">
                     {formatCurrency(