fixed calculate total action

This commit is contained in:
claudiosmweb 2014-07-20 21:12:22 -03:00
parent eed6ca4405
commit 3e287ff19c
3 changed files with 4 additions and 4 deletions

View File

@ -501,13 +501,13 @@ jQuery( function ( $ ) {
order_discount = accounting.unformat( order_discount.replace( ',', '.' ) );
$( '#order_items_list tr.item, #order_items_list tr.shipping .wc_input_price' ).each( function () {
$( '#order_items_list tr.shipping input.line_total' ).each( function () {
cost = $( this ).val() || '0';
cost = accounting.unformat( cost, woocommerce_admin.mon_decimal_point );
shipping = shipping + parseFloat( cost );
});
$( '#tax_rows' ).find( 'input[type=number], .wc_input_price' ).each( function () {
$( '#order_items_list input.line_tax' ).each( function () {
cost = $( this ).val() || '0';
cost = accounting.unformat( cost, woocommerce_admin.mon_decimal_point );
tax = tax + parseFloat( cost );

File diff suppressed because one or more lines are too long

View File

@ -70,7 +70,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ) ) : ''; ?>
</div>
<div class="edit" style="display: none;">
<input type="text" name="shipping_taxes[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="shipping_taxes wc_input_price" />
<input type="text" name="shipping_taxes[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
</div>
</td>