From: Steve Sutton Date: Fri, 6 Apr 2018 13:32:37 +0000 (-0400) Subject: Update price format for total X-Git-Tag: v1.0.0^2~72 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=56eb265ff78017bee3ae00f4d146fb9402fe349f;p=WP-Plugins%2Fglm-member-db-billing.git Update price format for total Use money format. --- diff --git a/views/admin/billing/renew.html b/views/admin/billing/renew.html index 6a4861d..d6dad41 100644 --- a/views/admin/billing/renew.html +++ b/views/admin/billing/renew.html @@ -283,6 +283,11 @@ jQuery(document).ready(function($){ } }); + var formatter = new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD', + minimunFractionDigits: 2 + }); function getPageTotal(){ // Calculate the total for this page. @@ -302,7 +307,8 @@ jQuery(document).ready(function($){ member_renewing_amount += parseFloat( $(this).data('amount') ); } }); - $('#renew_total').html( '$' + member_renewing_amount ); + + $('#renew_total').html( formatter.format( member_renewing_amount ) ); $('#total_renew_amount').val( member_renewing_amount ); }