Dashboard avg sale issue fixed

This commit is contained in:
jitendra 2019-09-24 12:35:18 +05:30
parent 59fcee0e15
commit 1acf86acf8
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(),