Calculate totals (JS) rounding
This commit is contained in:
parent
b681ec5788
commit
d735f13f70
|
@ -95,6 +95,7 @@ function woocommerce_admin_scripts() {
|
|||
'cart_total' => __("Calculate totals based on order items, discount amount, and shipping? Note, you will need to calculate discounts before tax manually.", 'woothemes'),
|
||||
'copy_billing' => __("Copy billing information to shipping information? This will remove any currently entered shipping information.", 'woothemes'),
|
||||
'prices_include_tax' => get_option('woocommerce_prices_include_tax'),
|
||||
'round_at_subtotal' => get_option( 'woocommerce_tax_round_at_subtotal' ),
|
||||
'ID' => __('ID', 'woothemes'),
|
||||
'item_name' => __('Item Name', 'woothemes'),
|
||||
'quantity' => __('Quantity e.g. 2', 'woothemes'),
|
||||
|
|
|
@ -80,7 +80,7 @@ jQuery( function($){
|
|||
totalItemTax = 0;
|
||||
|
||||
// Calculate tax and discounts
|
||||
cart_discount = cart_discount + itemDiscount;
|
||||
cart_discount = parseFloat( cart_discount + itemDiscount );
|
||||
|
||||
if (itemTax && itemTax>0) {
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -685,7 +685,7 @@ class woocommerce_checkout {
|
|||
'cost' => $_product->get_price_excluding_tax( false ),
|
||||
'row_discount' => number_format(
|
||||
( ( $_product->get_price()-$woocommerce->cart->get_discounted_price( $values, $_product->get_price() ) ) * $values['quantity'] )
|
||||
, 2, '.', '' ),
|
||||
, 4, '.', '' ),
|
||||
'taxrate' => $rate,
|
||||
'item_meta' => $item_meta->meta
|
||||
), $values);
|
||||
|
|
Loading…
Reference in New Issue