diff --git a/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php b/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php index ce2e09ea2..3595d3cf7 100644 --- a/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php @@ -48,6 +48,7 @@ public function prepareQueryBuilder() 'quotes.tax_amount', 'quotes.adjustment_amount', 'quotes.grand_total', + 'quotes.created_at', 'users.id as user_id', 'users.name as user_name', 'persons.id as person_id', @@ -162,6 +163,17 @@ public function addColumns() return core()->formatBasePrice($row->grand_total, 2); }, ]); + + $this->addColumn([ + 'index' => 'created_at', + 'label' => trans('admin::app.datagrid.created_at'), + 'type' => 'date_range', + 'searchable' => false, + 'sortable' => true, + 'closure' => function ($row) { + return core()->formatDate($row->created_at); + }, + ]); } /** diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index fd1f13806..fe0e64811 100644 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -305,7 +305,7 @@ public function getSingletonInstance($className) */ public function formatDate($date) { - return Carbon::parse($date)->format('d M Y H:i'); + return Carbon::parse($date)->format('d M Y h:iA'); } /**