Merge pull request #1512 from jitendra-webkul/refund

Dashboard avg sale issue fixed
This commit is contained in:
Jitendra Singh 2019-09-24 12:41:46 +05:30 committed by GitHub
commit d8e1ae5baf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -146,8 +146,8 @@ class DashboardController extends Controller
'progress' => $this->getPercentageChange($previous, $current)
],
'avg_sales' => [
'previous' => $previous = $this->previousOrders()->avg('base_grand_total_invoiced') - $this->previousOrders()->sum('base_grand_total_refunded'),
'current' => $current = $this->currentOrders()->avg('base_grand_total_invoiced') - $this->currentOrders()->sum('base_grand_total_refunded'),
'previous' => $previous = $this->previousOrders()->avg('base_grand_total_invoiced') - $this->previousOrders()->avg('base_grand_total_refunded'),
'current' => $current = $this->currentOrders()->avg('base_grand_total_invoiced') - $this->currentOrders()->avg('base_grand_total_refunded'),
'progress' => $this->getPercentageChange($previous, $current)
],
'top_selling_categories' => $this->getTopSellingCategories(),