Calculate totals (JS) rounding

This commit is contained in:
Mike Jolley 2011-11-25 23:42:46 +00:00
parent b681ec5788
commit d735f13f70
4 changed files with 542 additions and 3 deletions

View File

@ -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'),

View File

@ -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

View File

@ -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);