2012-11-27 16:22:47 +00:00
|
|
|
<?php
|
2014-06-11 19:06:31 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit; // Exit if accessed directly
|
|
|
|
}
|
2012-11-12 13:41:54 +00:00
|
|
|
?>
|
2014-06-11 19:06:31 +00:00
|
|
|
<tr class="fee <?php echo ( ! empty( $class ) ) ? $class : ''; ?>" data-order_item_id="<?php echo $item_id; ?>">
|
2012-11-12 13:41:54 +00:00
|
|
|
<td class="check-column"><input type="checkbox" /></td>
|
2012-11-27 16:22:47 +00:00
|
|
|
|
2014-07-22 13:27:47 +00:00
|
|
|
<td class="thumb"><div></div></td>
|
2012-11-27 16:22:47 +00:00
|
|
|
|
2012-11-12 13:41:54 +00:00
|
|
|
<td class="name">
|
2013-08-15 15:49:09 +00:00
|
|
|
<div class="view">
|
2014-06-11 19:06:31 +00:00
|
|
|
<?php echo ! empty( $item['name'] ) ? esc_html( $item['name'] ) : __( 'Fee', 'woocommerce' ); ?>
|
2013-08-15 15:49:09 +00:00
|
|
|
</div>
|
2014-07-21 02:26:40 +00:00
|
|
|
<div class="edit" style="display: none;">
|
2014-06-11 19:06:31 +00:00
|
|
|
<input type="text" placeholder="<?php _e( 'Fee Name', 'woocommerce' ); ?>" name="order_item_name[<?php echo absint( $item_id ); ?>]" value="<?php echo ( isset( $item['name'] ) ) ? esc_attr( $item['name'] ) : ''; ?>" />
|
2013-08-15 15:49:09 +00:00
|
|
|
<input type="hidden" class="order_item_id" name="order_item_id[]" value="<?php echo esc_attr( $item_id ); ?>" />
|
2014-07-24 20:55:25 +00:00
|
|
|
<input type="hidden" name="order_item_tax_class[<?php echo absint( $item_id ); ?>]" value="<?php echo isset( $item['tax_class'] ) ? esc_attr( $item['tax_class'] ) : ''; ?>" />
|
2013-08-15 15:49:09 +00:00
|
|
|
</div>
|
2012-11-12 13:41:54 +00:00
|
|
|
</td>
|
2012-11-27 16:22:47 +00:00
|
|
|
|
2014-07-24 09:21:47 +00:00
|
|
|
<?php do_action( 'woocommerce_admin_order_item_values', null, $item, absint( $item_id ) ); ?>
|
|
|
|
|
2014-07-28 10:45:16 +00:00
|
|
|
<td class="quantity" width="1%"> </td>
|
2012-11-12 13:41:54 +00:00
|
|
|
|
|
|
|
<td class="line_cost" width="1%">
|
2013-08-15 15:49:09 +00:00
|
|
|
<div class="view">
|
2014-07-25 16:32:16 +00:00
|
|
|
<?php
|
|
|
|
echo ( isset( $item['line_total'] ) ) ? wc_price( wc_round_tax_total( $item['line_total'] ) ) : '';
|
2014-07-25 15:48:19 +00:00
|
|
|
|
|
|
|
if ( $refunded = $order->get_total_refunded_for_item( $item_id, 'fee' ) ) {
|
2014-07-28 10:41:47 +00:00
|
|
|
echo '<small class="refunded">-' . wc_price( $refunded ) . '</small>';
|
2014-07-25 15:48:19 +00:00
|
|
|
}
|
|
|
|
?>
|
2013-08-15 15:49:09 +00:00
|
|
|
</div>
|
2014-07-21 02:26:40 +00:00
|
|
|
<div class="edit" style="display: none;">
|
2014-07-22 15:44:02 +00:00
|
|
|
<input type="text" name="line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : ''; ?>" class="line_total wc_input_price" />
|
2013-08-15 15:49:09 +00:00
|
|
|
</div>
|
2014-07-24 09:56:32 +00:00
|
|
|
<div class="refund" style="display: none;">
|
2014-07-24 09:21:47 +00:00
|
|
|
<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_total wc_input_price" />
|
|
|
|
</div>
|
2012-11-12 13:41:54 +00:00
|
|
|
</td>
|
|
|
|
|
2014-07-20 03:21:33 +00:00
|
|
|
<?php
|
2014-08-12 11:54:41 +00:00
|
|
|
if ( isset( $legacy_order ) && ! $legacy_order && 'yes' == get_option( 'woocommerce_calc_taxes' ) ) :
|
2014-07-20 03:21:33 +00:00
|
|
|
$line_tax_data = isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '';
|
2014-07-20 03:32:52 +00:00
|
|
|
$tax_data = maybe_unserialize( $line_tax_data );
|
2014-07-19 04:08:02 +00:00
|
|
|
|
2014-07-20 03:21:33 +00:00
|
|
|
foreach ( $order_taxes as $tax_item ) :
|
|
|
|
$tax_item_id = $tax_item['rate_id'];
|
|
|
|
$tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : '';
|
2014-07-28 16:08:11 +00:00
|
|
|
|
2014-07-20 03:21:33 +00:00
|
|
|
?>
|
2013-01-11 11:29:13 +00:00
|
|
|
|
2014-07-20 03:21:33 +00:00
|
|
|
<td class="line_tax" width="1%">
|
|
|
|
<div class="view">
|
2014-07-25 16:32:16 +00:00
|
|
|
<?php
|
|
|
|
echo ( '' != $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ) ) : '–';
|
2014-07-25 15:48:19 +00:00
|
|
|
|
|
|
|
if ( $refunded = $order->get_tax_refunded_for_item( $item_id, $tax_item_id, 'fee' ) ) {
|
2014-07-28 10:41:47 +00:00
|
|
|
echo '<small class="refunded">-' . wc_price( $refunded ) . '</small>';
|
2014-07-25 15:48:19 +00:00
|
|
|
}
|
|
|
|
?>
|
2014-07-20 03:21:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="edit" style="display: none;">
|
|
|
|
<input type="text" name="line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
|
|
|
|
</div>
|
2014-07-24 09:56:32 +00:00
|
|
|
<div class="refund" style="display: none;">
|
2014-07-24 14:34:14 +00:00
|
|
|
<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_tax wc_input_price" data-tax_id="<?php echo absint( $tax_item_id ); ?>" />
|
2014-07-24 09:21:47 +00:00
|
|
|
</div>
|
2014-07-20 03:21:33 +00:00
|
|
|
</td>
|
2012-11-12 13:41:54 +00:00
|
|
|
|
2014-07-20 03:21:33 +00:00
|
|
|
<?php
|
|
|
|
endforeach;
|
|
|
|
endif;
|
|
|
|
?>
|
2013-01-11 11:29:13 +00:00
|
|
|
|
2014-07-07 15:45:08 +00:00
|
|
|
<td class="wc-order-edit-line-item">
|
2014-07-22 19:25:37 +00:00
|
|
|
<?php if ( $can_be_edited ) : ?>
|
|
|
|
<div class="wc-order-edit-line-item-actions">
|
|
|
|
<a class="edit-order-item" href="#"></a><a class="delete-order-item" href="#"></a>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2013-08-15 15:49:09 +00:00
|
|
|
</td>
|
2014-07-17 18:48:03 +00:00
|
|
|
</tr>
|