WooCommerce PDF Invoices & Packing Slips - Version 1.2.1

Version Description

  • Fix: shipping & fees functions didn't output correctly with the tax set to 'incl'
Download this release

Release Info

Developer pomegranate
Plugin Icon 128x128 WooCommerce PDF Invoices & Packing Slips
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: pomegranate
3
  Tags: woocommerce, print, pdf, bulk, packing slips, invoices, delivery notes, invoice, packing slip, export, email
4
  Requires at least: 3.5 and WooCommerce 2.0
5
  Tested up to: 3.8 and WooCommerce 2.1
6
- Stable tag: 1.2.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -28,8 +28,6 @@ In addition to a number of default settings (including a custom header/logo) and
28
  * Select paper size (Letter or A4)
29
  * Translation ready
30
 
31
- If you want more control over the invoice numbers, we recommend that you also install the (free) [WooCommerce Sequential Order Numbers plugin](http://wordpress.org/plugins/woocommerce-sequential-order-numbers/)
32
-
33
  == Installation ==
34
 
35
  = Automatic installation =
@@ -101,6 +99,9 @@ This usually only happens on batch actions. PDF creation is a memory intensive j
101
 
102
  == Changelog ==
103
 
 
 
 
104
  = 1.2.0 =
105
  * Feature: Sequential invoice numbers (set upon invoice creation).
106
  * Feature: Invoice date (set upon invoice creation).
3
  Tags: woocommerce, print, pdf, bulk, packing slips, invoices, delivery notes, invoice, packing slip, export, email
4
  Requires at least: 3.5 and WooCommerce 2.0
5
  Tested up to: 3.8 and WooCommerce 2.1
6
+ Stable tag: 1.2.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
28
  * Select paper size (Letter or A4)
29
  * Translation ready
30
 
 
 
31
  == Installation ==
32
 
33
  = Automatic installation =
99
 
100
  == Changelog ==
101
 
102
+ = 1.2.1 =
103
+ * Fix: shipping & fees functions didn't output correctly with the tax set to 'incl'
104
+
105
  = 1.2.0 =
106
  * Feature: Sequential invoice numbers (set upon invoice creation).
107
  * Feature: Invoice date (set upon invoice creation).
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: http://www.wpovernight.com
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
- * Version: 1.2.0
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
@@ -384,7 +384,7 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
384
  * Return/show the order shipping costs
385
  */
386
  public function get_order_shipping( $tax = 'excl' ) { // set $tax to 'incl' to include tax
387
- if ($tax = 'excl' ) {
388
  $shipping_costs = woocommerce_price ( $this->export->order->order_shipping );
389
  } else {
390
  $shipping_costs = woocommerce_price ( $this->export->order->order_shipping + $this->export->order->order_shipping_tax );
@@ -428,7 +428,7 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
428
  public function get_order_fees( $tax = 'excl' ) {
429
  if ( $wcfees = $this->export->order->get_fees() ) {
430
  foreach( $wcfees as $id => $fee ) {
431
- if ($tax = 'excl' ) {
432
  $fee_price = woocommerce_price( $fee['line_total'] );
433
  } else {
434
  $fee_price = woocommerce_price( $fee['line_total'] + $fee['line_tax'] );
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: http://www.wpovernight.com
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
+ * Version: 1.2.1
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
384
  * Return/show the order shipping costs
385
  */
386
  public function get_order_shipping( $tax = 'excl' ) { // set $tax to 'incl' to include tax
387
+ if ($tax == 'excl' ) {
388
  $shipping_costs = woocommerce_price ( $this->export->order->order_shipping );
389
  } else {
390
  $shipping_costs = woocommerce_price ( $this->export->order->order_shipping + $this->export->order->order_shipping_tax );
428
  public function get_order_fees( $tax = 'excl' ) {
429
  if ( $wcfees = $this->export->order->get_fees() ) {
430
  foreach( $wcfees as $id => $fee ) {
431
+ if ($tax == 'excl' ) {
432
  $fee_price = woocommerce_price( $fee['line_total'] );
433
  } else {
434
  $fee_price = woocommerce_price( $fee['line_total'] + $fee['line_tax'] );