Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Commit

Permalink
fix coupon total price
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofBorbis committed Apr 22, 2015
1 parent 2d40eec commit 5ca2046
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,7 +1,7 @@
## Changelog

* 1.17.4:
* Improved: Jigoshop Reports page shows properly order total values.
* Improved: Jigoshop Reports page shows properly coupon and order total values.
* Fix: JS error in Checkout page.
* 1.17.3 - 2015-04-20:
* Improved: Reports page.
Expand Down
2 changes: 1 addition & 1 deletion admin/reports/sales-by-date.class.php
Expand Up @@ -183,7 +183,7 @@ private function query_report_data()
$this->report_data->total_tax = jigoshop_format_decimal(array_sum(wp_list_pluck($this->report_data->orders, 'total_tax')), 2);
$this->report_data->total_shipping = jigoshop_format_decimal(array_sum(wp_list_pluck($this->report_data->orders, 'total_shipping')), 2);
$this->report_data->total_shipping_tax = jigoshop_format_decimal(array_sum(wp_list_pluck($this->report_data->orders, 'total_shipping_tax')), 2);
$this->report_data->total_coupons = number_format(array_sum(wp_list_pluck($this->report_data->coupons, 'discount_amount')), 2);
$this->report_data->total_coupons = array_sum(wp_list_pluck($this->report_data->coupons, 'discount_amount'));
$this->report_data->total_orders = absint(array_sum(wp_list_pluck($this->report_data->order_counts, 'count')));
$this->report_data->total_items = absint(array_sum(wp_list_pluck($this->report_data->order_items, 'order_item_count')) * -1);
$this->report_data->average_sales = jigoshop_format_decimal($this->report_data->total_sales / ($this->chart_interval + 1), 2);
Expand Down

0 comments on commit 5ca2046

Please sign in to comment.