Commit f1b91cb8 by Albert (AJ) St. Aubin Committed by GitHub

Merge pull request #16007 from edx/aj/LEARNER-2291

Set formatting to show 2 decimal places on Program Purchase button
parents 04a61ff6 9d0a1e80
...@@ -571,7 +571,7 @@ define([ ...@@ -571,7 +571,7 @@ define([
expect($(view.$('.upgrade-button.complete-program')).text().trim(). expect($(view.$('.upgrade-button.complete-program')).text().trim().
replace(/\s+/g, ' ')). replace(/\s+/g, ' ')).
toEqual( toEqual(
'Upgrade All Remaining Courses ( $300 USD )' 'Upgrade All Remaining Courses ( $300.00 USD )'
); );
}); });
...@@ -592,7 +592,7 @@ define([ ...@@ -592,7 +592,7 @@ define([
expect($(view.$('.upgrade-button.complete-program')).text().trim(). expect($(view.$('.upgrade-button.complete-program')).text().trim().
replace(/\s+/g, ' ')). replace(/\s+/g, ' ')).
toEqual( toEqual(
'Upgrade All Remaining Courses ( $270 $300 USD )' 'Upgrade All Remaining Courses ( $270.00 $300.00 USD )'
); );
}); });
......
...@@ -26,13 +26,14 @@ ...@@ -26,13 +26,14 @@
<% if (discount_data.is_discounted) { %> <% if (discount_data.is_discounted) { %>
<span class='list-price'> <span class='list-price'>
<%- StringUtils.interpolate( <%- StringUtils.interpolate(
gettext('${listPrice}'), {listPrice: discount_data.total_incl_tax_excl_discounts} gettext('${listPrice}'), {listPrice: discount_data.total_incl_tax_excl_discounts.toFixed(2)}
) )
%> %>
</span> </span>
<% } %> <% } %>
<%- StringUtils.interpolate( <%- StringUtils.interpolate(
gettext(' ${price} {currency} )'), {price: full_program_price, currency: discount_data.currency} gettext(' ${price} {currency} )'),
{price: full_program_price.toFixed(2), currency: discount_data.currency}
) )
%> %>
</a> </a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment