incl. to checkout too

This commit is contained in:
Mike Jolley 2012-01-28 15:34:21 +00:00
parent f8ea5ed281
commit 0226faa96b
5 changed files with 12 additions and 12 deletions

View File

@ -716,10 +716,10 @@ function woocommerce_process_shop_order_meta( $post_id, $post ) {
'variation_id' => (int) $item_variation[$i],
'name' => htmlspecialchars(stripslashes($item_name[$i])),
'qty' => (int) $item_quantity[$i],
'line_total' => rtrim(rtrim(number_format(woocommerce_clean($line_total[$i]), 4, '.', '')), '0'), '.'),
'line_tax' => rtrim(rtrim(number_format(woocommerce_clean($line_tax[$i]), 4, '.', '')), '0'), '.'),
'line_subtotal' => rtrim(rtrim(number_format(woocommerce_clean($line_subtotal[$i]), 4, '.', '')), '0'), '.'),
'line_subtotal_tax' => rtrim(rtrim(number_format(woocommerce_clean($line_subtotal_tax[$i]), 4, '.', '')), '0'), '.'),
'line_total' => rtrim(rtrim(number_format(woocommerce_clean($line_total[$i]), 4, '.', ''), '0'), '.'),
'line_tax' => rtrim(rtrim(number_format(woocommerce_clean($line_tax[$i]), 4, '.', ''), '0'), '.'),
'line_subtotal' => rtrim(rtrim(number_format(woocommerce_clean($line_subtotal[$i]), 4, '.', ''), '0'), '.'),
'line_subtotal_tax' => rtrim(rtrim(number_format(woocommerce_clean($line_subtotal_tax[$i]), 4, '.', ''), '0'), '.'),
'item_meta' => $item_meta->meta,
'tax_class' => woocommerce_clean($item_tax_class[$i])
));

View File

@ -406,10 +406,10 @@ class WC_Checkout {
'name' => $_product->get_title(),
'qty' => (int) $values['quantity'],
'item_meta' => $item_meta->meta,
'line_subtotal' => rtrim(rtrim(number_format($values['line_subtotal'], 4, '.', '')), '0'), '.'), // Line subtotal (before discounts)
'line_subtotal_tax' => rtrim(rtrim(number_format($values['line_subtotal_tax'], 4, '.', '')), '0'), '.'), // Line tax (before discounts)
'line_total' => rtrim(rtrim(number_format($values['line_total'], 4, '.', '')), '0'), '.'), // Line total (after discounts)
'line_tax' => rtrim(rtrim(number_format($values['line_tax'], 4, '.', '')), '0'), '.'), // Line Tax (after discounts)
'line_subtotal' => rtrim(rtrim(number_format($values['line_subtotal'], 4, '.', ''), '0'), '.'), // Line subtotal (before discounts)
'line_subtotal_tax' => rtrim(rtrim(number_format($values['line_subtotal_tax'], 4, '.', ''), '0'), '.'), // Line tax (before discounts)
'line_total' => rtrim(rtrim(number_format($values['line_total'], 4, '.', ''), '0'), '.'), // Line total (after discounts)
'line_tax' => rtrim(rtrim(number_format($values['line_tax'], 4, '.', ''), '0'), '.'), // Line Tax (after discounts)
'tax_class' => $_product->get_tax_class() // Tax class (adjusted by filters)
), $values);
endforeach;

View File

@ -474,7 +474,7 @@ class WC_Countries {
}
function inc_tax_or_vat() {
$return = ( in_array($this->get_base_country(), $this->get_european_union_countries()) ) ? __('(inc. VAT)', 'woocommerce') : __('(inc. tax)', 'woocommerce');
$return = ( in_array($this->get_base_country(), $this->get_european_union_countries()) ) ? __('(incl. VAT)', 'woocommerce') : __('(incl. tax)', 'woocommerce');
return apply_filters('woocommerce_countries_inc_tax_or_vat', $return);
}

View File

@ -122,7 +122,7 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
if ($tax==0) continue;
?>
<tr class="tax-rate tax-rate-<?php echo $key; ?>">
<th><?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
<th><?php if (get_option('woocommerce_prices_include_tax')=='yes') : _e('incl.', 'woocommerce'); endif; ?> <?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
<td><?php echo woocommerce_price($tax); ?></td>
</tr>
<?php

View File

@ -103,7 +103,7 @@
?>
<tr class="tax-rate tax-rate-<?php echo $key; ?>">
<th colspan="2"><?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
<th colspan="2"><?php if (get_option('woocommerce_prices_include_tax')=='yes') : _e('incl.', 'woocommerce'); endif; ?> <?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
<td><?php echo woocommerce_price($tax); ?></td>
</tr>
<?php
@ -123,7 +123,7 @@
?>
<tr class="tax-rate tax-rate-<?php echo $key; ?>">
<th colspan="2"><?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
<th colspan="2"><?php if (get_option('woocommerce_prices_include_tax')=='yes') : _e('incl.', 'woocommerce'); endif; ?> <?php echo $woocommerce->cart->tax->get_rate_label( $key ); ?></th>
<td><?php echo woocommerce_price($tax); ?></td>
</tr>
<?php