Codestandards

This commit is contained in:
Barry Kooij 2014-11-29 12:33:36 +01:00
parent c2321aeb94
commit 21b7fe60f6
2 changed files with 6 additions and 3 deletions

View File

@ -1145,6 +1145,7 @@ class WC_Cart {
// Base tax for line before discount - we will store this in the order data
$taxes = $this->tax->calc_tax( $line_price, $item_tax_rates );
$line_subtotal_tax = array_sum( $taxes );
$line_subtotal = $line_price;
}

View File

@ -35,10 +35,11 @@ class WC_Tax {
// Work in pence to X precision
$price = self::precision( $price );
if ( $price_includes_tax )
if ( $price_includes_tax ) {
$taxes = self::calc_inclusive_tax( $price, $rates );
else
} else {
$taxes = self::calc_exclusive_tax( $price, $rates );
}
// Round to precision
if ( ! self::$round_at_subtotal && ! $suppress_rounding ) {
@ -152,8 +153,9 @@ class WC_Tax {
// Multiple taxes
foreach ( $rates as $key => $rate ) {
if ( $rate['compound'] == 'yes' )
if ( $rate['compound'] == 'yes' ) {
continue;
}
$tax_amount = $price * ( $rate['rate'] / 100 );