From 5ca20468b8fff02e8feb103b4bba64d3677b35b4 Mon Sep 17 00:00:00 2001 From: KrzysztofBorbis Date: Wed, 22 Apr 2015 15:50:41 +0200 Subject: [PATCH] fix coupon total price --- CHANGELOG.md | 2 +- admin/reports/sales-by-date.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ebcaf56..6740e725 100755 --- a/CHANGELOG.md +++ b/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. diff --git a/admin/reports/sales-by-date.class.php b/admin/reports/sales-by-date.class.php index 9ce7f998..0f30d9b7 100644 --- a/admin/reports/sales-by-date.class.php +++ b/admin/reports/sales-by-date.class.php @@ -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);