Booster for WooCommerce - Version 2.3.11

Version Description

  • 29/12/2015 =
  • Fix - Orders Shortcodes - [wcj_order_total_tax_percent] shortcode "rounding bug" fixed.
  • Fix - PDF Invoicing - "Invoices Report" tool - Tax percent column "rounding bug" fixed.
  • Dev - PDF Invoicing - "Invoices Report" tool - "Customer VAT ID" column added to invoices reports table.
Download this release

Release Info

Developer algoritmika
Plugin Icon 128x128 Booster for WooCommerce
Version 2.3.11
Comparing to
See all releases

Code changes from version 2.3.10 to 2.3.11

includes/pdf-invoices/class-wcj-pdf-invoicing-report-tool.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack PDF Invoices Report Tool class.
6
  *
7
- * @version 2.3.10
8
  * @since 2.2.1
9
  * @author Algoritmika Ltd.
10
  */
@@ -179,7 +179,7 @@ class WCJ_PDF_Invoicing_Report_Tool {
179
  /**
180
  * Invoices Report function.
181
  *
182
- * @version 2.3.10
183
  */
184
  function get_invoices_report( $year, $month, $invoice_type_id ) {
185
 
@@ -191,6 +191,7 @@ class WCJ_PDF_Invoicing_Report_Tool {
191
  __( 'Invoice Date', 'woocommerce-jetpack' ),
192
  __( 'Order ID', 'woocommerce-jetpack' ),
193
  __( 'Customer Country', 'woocommerce-jetpack' ),
 
194
  __( 'Tax %', 'woocommerce-jetpack' ),
195
  __( 'Order Total Tax Excl.', 'woocommerce-jetpack' ),
196
  __( 'Order Taxes', 'woocommerce-jetpack' ),
@@ -228,6 +229,7 @@ class WCJ_PDF_Invoicing_Report_Tool {
228
  $billing_country = isset( $user_meta['billing_country'][0] ) ? $user_meta['billing_country'][0] : '';
229
  $shipping_country = isset( $user_meta['shipping_country'][0] ) ? $user_meta['shipping_country'][0] : '';
230
  $customer_country = ( '' == $billing_country ) ? $shipping_country : $billing_country;
 
231
 
232
  $order_total = $the_order->get_total();
233
 
@@ -236,7 +238,8 @@ class WCJ_PDF_Invoicing_Report_Tool {
236
  // $order_tax_percent /= 100;
237
  // $order_tax = $order_total * $order_tax_percent;
238
  $order_total_exlc_tax = $order_total - $order_tax;
239
- $order_tax_percent = ( 0 == $order_total ) ? 0 : $order_tax / $order_total_exlc_tax;
 
240
 
241
  $total_sum += $order_total;
242
  $total_sum_excl_tax += $order_total_exlc_tax;
@@ -250,6 +253,7 @@ class WCJ_PDF_Invoicing_Report_Tool {
250
  wcj_get_invoice_date( $order_id, $invoice_type_id, 0, get_option( 'date_format' ) ),
251
  $order_id,
252
  $customer_country,
 
253
  sprintf( '%.0f %%', $order_tax_percent * 100 ),
254
  sprintf( '%.2f', $order_total_exlc_tax ),
255
  $order_tax_html,
4
  *
5
  * The WooCommerce Jetpack PDF Invoices Report Tool class.
6
  *
7
+ * @version 2.3.11
8
  * @since 2.2.1
9
  * @author Algoritmika Ltd.
10
  */
179
  /**
180
  * Invoices Report function.
181
  *
182
+ * @version 2.3.11
183
  */
184
  function get_invoices_report( $year, $month, $invoice_type_id ) {
185
 
191
  __( 'Invoice Date', 'woocommerce-jetpack' ),
192
  __( 'Order ID', 'woocommerce-jetpack' ),
193
  __( 'Customer Country', 'woocommerce-jetpack' ),
194
+ __( 'Customer VAT ID', 'woocommerce-jetpack' ),
195
  __( 'Tax %', 'woocommerce-jetpack' ),
196
  __( 'Order Total Tax Excl.', 'woocommerce-jetpack' ),
197
  __( 'Order Taxes', 'woocommerce-jetpack' ),
229
  $billing_country = isset( $user_meta['billing_country'][0] ) ? $user_meta['billing_country'][0] : '';
230
  $shipping_country = isset( $user_meta['shipping_country'][0] ) ? $user_meta['shipping_country'][0] : '';
231
  $customer_country = ( '' == $billing_country ) ? $shipping_country : $billing_country;
232
+ $customer_vat_id = get_post_meta( $order_id, '_billing_eu_vat_number', true );
233
 
234
  $order_total = $the_order->get_total();
235
 
238
  // $order_tax_percent /= 100;
239
  // $order_tax = $order_total * $order_tax_percent;
240
  $order_total_exlc_tax = $order_total - $order_tax;
241
+ $order_total_tax_not_rounded = $the_order->get_cart_tax() + $the_order->get_shipping_tax();
242
+ $order_tax_percent = ( 0 == $order_total ) ? 0 : $order_total_tax_not_rounded / $order_total_exlc_tax;
243
 
244
  $total_sum += $order_total;
245
  $total_sum_excl_tax += $order_total_exlc_tax;
253
  wcj_get_invoice_date( $order_id, $invoice_type_id, 0, get_option( 'date_format' ) ),
254
  $order_id,
255
  $customer_country,
256
+ $customer_vat_id,
257
  sprintf( '%.0f %%', $order_tax_percent * 100 ),
258
  sprintf( '%.2f', $order_total_exlc_tax ),
259
  $order_tax_html,
includes/shortcodes/class-wcj-orders-shortcodes.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * The WooCommerce Jetpack Orders Shortcodes class.
6
  *
7
- * @version 2.3.9
8
  * @author Algoritmika Ltd.
9
  */
10
 
@@ -360,16 +360,14 @@ class WCJ_Orders_Shortcodes extends WCJ_Shortcodes {
360
 
361
  /**
362
  * wcj_order_total_tax_percent.
 
 
363
  */
364
  function wcj_order_total_tax_percent( $atts ) {
365
-
366
- $order_total_excl_tax = $this->the_order->get_total() - $this->the_order->get_total_tax();
367
- $order_total_tax = $this->the_order->get_total_tax();
368
- $order_total_tax_percent = ( 0 == $order_total_excl_tax ) ? 0 : $order_total_tax / $order_total_excl_tax * 100;
369
-
370
- $order_total_tax_percent = apply_filters( 'wcj_order_total_tax_percent', $order_total_tax_percent, $this->the_order );
371
-
372
- return $order_total_tax_percent;
373
  }
374
 
375
  /**
4
  *
5
  * The WooCommerce Jetpack Orders Shortcodes class.
6
  *
7
+ * @version 2.3.11
8
  * @author Algoritmika Ltd.
9
  */
10
 
360
 
361
  /**
362
  * wcj_order_total_tax_percent.
363
+ *
364
+ * @version 2.3.11
365
  */
366
  function wcj_order_total_tax_percent( $atts ) {
367
+ $order_total_excl_tax = $this->the_order->get_total() - $this->the_order->get_total_tax();
368
+ $order_total_tax_not_rounded = $this->the_order->get_cart_tax() + $this->the_order->get_shipping_tax();
369
+ $order_total_tax_percent = ( 0 == $order_total_excl_tax ) ? 0 : $order_total_tax_not_rounded / $order_total_excl_tax * 100;
370
+ return apply_filters( 'wcj_order_total_tax_percent', $order_total_tax_percent, $this->the_order );
 
 
 
 
371
  }
372
 
373
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: algoritmika,anbinder,solovjov
3
  Tags: woocommerce,booster for woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales,custom product tabs,remove product tab,payment gateway fee,vat
4
  Requires at least: 3.8
5
  Tested up to: 4.4
6
- Stable tag: 2.3.10
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -116,6 +116,11 @@ To unlock all Booster for WooCommerce features, please install additional <a hre
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
119
  = 2.3.10 - 26/12/2015 =
120
  * Dev - `WCJ_Tools` and `WCJ_Module` - Code refactoring (mostly Tools related). Additionally modified modules:
121
  Admin Tools, Bulk Price Converter, Custom Price Labels, EU VAT Number, General, Old Slugs, Order Custom Statuses, Order Numbers, PDF Invoicing, SKU.
3
  Tags: woocommerce,booster for woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales,custom product tabs,remove product tab,payment gateway fee,vat
4
  Requires at least: 3.8
5
  Tested up to: 4.4
6
+ Stable tag: 2.3.11
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
116
 
117
  == Changelog ==
118
 
119
+ = 2.3.11 - 29/12/2015 =
120
+ * Fix - Orders Shortcodes - `[wcj_order_total_tax_percent]` shortcode "rounding bug" fixed.
121
+ * Fix - PDF Invoicing - "Invoices Report" tool - Tax percent column "rounding bug" fixed.
122
+ * Dev - PDF Invoicing - "Invoices Report" tool - "Customer VAT ID" column added to invoices reports table.
123
+
124
  = 2.3.10 - 26/12/2015 =
125
  * Dev - `WCJ_Tools` and `WCJ_Module` - Code refactoring (mostly Tools related). Additionally modified modules:
126
  Admin Tools, Bulk Price Converter, Custom Price Labels, EU VAT Number, General, Old Slugs, Order Custom Statuses, Order Numbers, PDF Invoicing, SKU.
woocommerce-jetpack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: http://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
- Version: 2.3.10
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2015 Algoritmika Ltd.
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: http://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
+ Version: 2.3.11
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2015 Algoritmika Ltd.