| @@ 1059-1064 (lines=6) @@ | ||
| 1056 | ||
| 1057 | $item_tax = ''; |
|
| 1058 | $tax_rate = ''; |
|
| 1059 | if ( $use_taxes && $cart_item['tax'] > 0 && $cart_item['subtotal'] > 0 ) { |
|
| 1060 | $item_tax = wpinv_price( wpinv_format_amount( $cart_item['tax'] ), $invoice->get_currency() ); |
|
| 1061 | $tax_rate = !empty( $cart_item['vat_rate'] ) ? $cart_item['vat_rate'] : ( $cart_item['tax'] / $cart_item['subtotal'] ) * 100; |
|
| 1062 | $tax_rate = $tax_rate > 0 ? (float)wpinv_round_amount( $tax_rate, 4 ) : ''; |
|
| 1063 | $tax_rate = $tax_rate != '' ? ' <small class="tax-rate">(' . $tax_rate . '%)</small>' : ''; |
|
| 1064 | } |
|
| 1065 | ||
| 1066 | $line_item_tax = $item_tax . $tax_rate; |
|
| 1067 | ||
| @@ 504-509 (lines=6) @@ | ||
| 501 | $tax = ''; |
|
| 502 | $tax_rate = ''; |
|
| 503 | ||
| 504 | if ( isset( $item['tax'] ) && $item['tax'] > 0 && $item['subtotal'] > 0 ) { |
|
| 505 | $tax = wpinv_price( wpinv_format_amount( $item['tax'] ) ); |
|
| 506 | $tax_rate = !empty( $item['vat_rate'] ) ? $item['vat_rate'] : ( $item['tax'] / $item['subtotal'] ) * 100; |
|
| 507 | $tax_rate = $tax_rate > 0 ? (float)wpinv_round_amount( $tax_rate, 4 ) : ''; |
|
| 508 | $tax_rate = $tax_rate != '' ? ' <small class="tax-rate normal small">(' . $tax_rate . '%)</small>' : ''; |
|
| 509 | } |
|
| 510 | ||
| 511 | $tax = $tax . $tax_rate; |
|
| 512 | ||