Hide more tax. #2205.
This commit is contained in:
parent
abd3f521ec
commit
86b7508a51
|
@ -11,6 +11,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
<input type="hidden" class="order_item_id" name="order_item_id[]" value="<?php echo esc_attr( $item_id ); ?>" />
|
||||
</td>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
|
||||
<td class="tax_class" width="1%">
|
||||
<select class="tax_class" name="order_item_tax_class[<?php echo absint( $item_id ); ?>]" title="<?php _e( 'Tax class', 'woocommerce' ); ?>">
|
||||
<?php $tax_class = isset( $item['tax_class'] ) ? sanitize_title( $item['tax_class'] ) : ''; ?>
|
||||
|
@ -33,14 +35,20 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
</select>
|
||||
</td>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<td class="quantity" width="1%">1</td>
|
||||
|
||||
<td class="line_cost" width="1%">
|
||||
<label><?php _e( 'Total', 'woocommerce' ); ?>: <input type="text" name="line_total[<?php echo absint( $item_id ); ?>]" placeholder="0.00" value="<?php if ( isset( $item['line_total'] ) ) echo esc_attr( $item['line_total'] ); ?>" class="line_total" /></label>
|
||||
</td>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
|
||||
<td class="line_tax" width="1%">
|
||||
<input type="text" name="line_tax[<?php echo absint( $item_id ); ?>]" placeholder="0.00" value="<?php if ( isset( $item['line_tax'] ) ) echo esc_attr( $item['line_tax'] ); ?>" class="line_tax" />
|
||||
</td>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</tr>
|
|
@ -78,6 +78,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
|
||||
<?php do_action( 'woocommerce_admin_order_item_values', $_product, $item, absint( $item_id ) ); ?>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
|
||||
<td class="tax_class" width="1%">
|
||||
<select class="tax_class" name="order_item_tax_class[<?php echo absint( $item_id ); ?>]" title="<?php _e( 'Tax class', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
|
@ -98,6 +100,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
</select>
|
||||
</td>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<td class="quantity" width="1%">
|
||||
<input type="number" step="<?php echo apply_filters( 'woocommerce_quantity_input_step', '1', $_product ); ?>" min="0" autocomplete="off" name="order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" value="<?php echo esc_attr( $item['qty'] ); ?>" size="4" class="quantity" />
|
||||
</td>
|
||||
|
@ -108,10 +112,14 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
<span class="subtotal"><label><?php _e( 'Subtotal', 'woocommerce' ); ?>: <input type="number" step="any" min="0" name="line_subtotal[<?php echo absint( $item_id ); ?>]" placeholder="0.00" value="<?php if ( isset( $item['line_subtotal'] ) ) echo esc_attr( $item['line_subtotal'] ); ?>" class="line_subtotal" /></label></span>
|
||||
</td>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
|
||||
<td class="line_tax" width="1%">
|
||||
<input type="number" step="any" min="0" name="line_tax[<?php echo absint( $item_id ); ?>]" placeholder="0.00" value="<?php if ( isset( $item['line_tax'] ) ) echo esc_attr( $item['line_tax'] ); ?>" class="line_tax" />
|
||||
|
||||
<span class="subtotal"><input type="number" step="any" min="0" name="line_subtotal_tax[<?php echo absint( $item_id ); ?>]" placeholder="0.00" value="<?php if ( isset( $item['line_subtotal_tax'] ) ) echo esc_attr( $item['line_subtotal_tax'] ); ?>" class="line_subtotal_tax" /></span>
|
||||
</td>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</tr>
|
|
@ -340,13 +340,17 @@ function woocommerce_order_items_meta_box( $post ) {
|
|||
|
||||
<?php do_action( 'woocommerce_admin_order_item_headers' ); ?>
|
||||
|
||||
<th class="tax_class"><?php _e( 'Tax Class', 'woocommerce' ); ?> <a class="tips" data-tip="<?php _e( 'Tax class for the line item', 'woocommerce' ); ?>." href="#">[?]</a></th>
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
<th class="tax_class"><?php _e( 'Tax Class', 'woocommerce' ); ?> <a class="tips" data-tip="<?php _e( 'Tax class for the line item', 'woocommerce' ); ?>." href="#">[?]</a></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<th class="quantity"><?php _e( 'Qty', 'woocommerce' ); ?></th>
|
||||
|
||||
<th class="line_cost"><?php _e( 'Cost', 'woocommerce' ); ?> <a class="tips" data-tip="<?php _e( 'Line subtotals are before pre-tax discounts, totals are after.', 'woocommerce' ); ?>" href="#">[?]</a></th>
|
||||
|
||||
<th class="line_tax"><?php _e( 'Tax', 'woocommerce' ); ?></th>
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
<th class="line_tax"><?php _e( 'Tax', 'woocommerce' ); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="order_items_list">
|
||||
|
@ -580,6 +584,9 @@ function woocommerce_order_totals_meta_box( $post ) {
|
|||
<?php do_action( 'woocommerce_admin_order_totals_after_shipping', $post->ID ) ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
|
||||
<div class="totals_group tax_rows_group">
|
||||
<h4><?php _e( 'Tax Rows', 'woocommerce' ); ?></h4>
|
||||
<div id="tax_rows" class="total_rows">
|
||||
|
@ -632,6 +639,9 @@ function woocommerce_order_totals_meta_box( $post ) {
|
|||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="totals_group">
|
||||
<h4><?php _e( 'Order Totals', 'woocommerce' ); ?></h4>
|
||||
<ul class="totals">
|
||||
|
@ -675,7 +685,9 @@ function woocommerce_order_totals_meta_box( $post ) {
|
|||
<div class="clear"></div>
|
||||
</div>
|
||||
<p class="buttons">
|
||||
<button type="button" class="button calc_line_taxes"><?php _e( 'Calc taxes', 'woocommerce' ); ?></button>
|
||||
<?php if ( get_option( 'woocommerce_calc_taxes' ) == 'yes' ) : ?>
|
||||
<button type="button" class="button calc_line_taxes"><?php _e( 'Calc taxes', 'woocommerce' ); ?></button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="button calc_totals button-primary"><?php _e( 'Calc totals', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue