Merge pull request #170 from bagisto/jitendra

Issue #150 and Dashboard progress issue fixed
This commit is contained in:
JItendra Singh 2018-11-27 10:58:27 +05:30 committed by GitHub
commit 464fe294ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -79,7 +79,7 @@ class OrderDataGrid
'label' => 'Base Total',
'sortable' => true,
'wrapper' => function ($value) {
return core()->currency($value);
return core()->formatBasePrice($value);
}
], [
'name' => 'or.grand_total',
@ -88,7 +88,7 @@ class OrderDataGrid
'label' => 'Grand Total',
'sortable' => false,
'wrapper' => function ($value) {
return core()->currency($value);
return core()->formatBasePrice($value);
}
], [
'name' => 'or.created_at',

View File

@ -294,9 +294,9 @@ class DashboardController extends Controller
$this->endDate = Carbon::now();
$this->lastStartDate = clone $this->startDate;
$this->lastEndDate = clone $this->endDate;
$this->lastEndDate = clone $this->startDate;
$this->lastStartDate->subDays($this->lastStartDate->diffInDays($this->lastEndDate));
$this->lastEndDate->subDays($this->lastStartDate->diffInDays($this->lastEndDate));
$this->lastStartDate->subDays($this->startDate->diffInDays($this->endDate));
// $this->lastEndDate->subDays($this->lastStartDate->diffInDays($this->lastEndDate));
}
}