fixed refunds button with the corrent total when using commas instead of decimals

This commit is contained in:
claudiosmweb 2014-07-22 11:40:26 -03:00
parent 01950bebdc
commit aae1dbbe2e
2 changed files with 5 additions and 3 deletions

View File

@ -600,7 +600,7 @@ jQuery( function ( $ ) {
order_id: woocommerce_admin_meta_boxes.post_id,
security: woocommerce_admin_meta_boxes.order_item_nonce
};
$.ajax({
url: woocommerce_admin_meta_boxes.ajax_url,
data: data,
@ -619,7 +619,9 @@ jQuery( function ( $ ) {
// Refund actions
$( 'body' )
.on( 'change', '.wc-order-refund-items #refund_amount', function () {
$( 'button .wc-order-refund-amount .amount' ).text( accounting.formatMoney( $( this ).val(), {
var total = accounting.unformat( $( this ).val(), woocommerce_admin.mon_decimal_point );
$( 'button .wc-order-refund-amount .amount' ).text( accounting.formatMoney( total, {
symbol: woocommerce_admin_meta_boxes.currency_format_symbol,
decimal: woocommerce_admin_meta_boxes.currency_format_decimal_sep,
thousand: woocommerce_admin_meta_boxes.currency_format_thousand_sep,

File diff suppressed because one or more lines are too long