diff --git a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php index 15a40d8f3..ff15a711a 100755 --- a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php @@ -28,13 +28,14 @@ class OrderDataGrid extends DataGrid $leftJoin->on('order_address_billing.order_id', '=', 'orders.id') ->where('order_address_billing.address_type', 'billing'); }) - ->addSelect('orders.id', 'base_sub_total', 'base_grand_total', 'orders.created_at', 'channel_name', 'status') + ->addSelect('orders.id', 'orders.base_sub_total', 'orders.base_grand_total', 'orders.created_at', 'channel_name', 'status') ->addSelect(DB::raw('CONCAT(order_address_billing.first_name, " ", order_address_billing.last_name) as billed_to')) ->addSelect(DB::raw('CONCAT(order_address_shipping.first_name, " ", order_address_shipping.last_name) as shipped_to')); $this->addFilter('billed_to', DB::raw('CONCAT(order_address_billing.first_name, " ", order_address_billing.last_name)')); $this->addFilter('shipped_to', DB::raw('CONCAT(order_address_shipping.first_name, " ", order_address_shipping.last_name)')); $this->addFilter('id', 'orders.id'); + $this->addFilter('created_at', 'orders.created_at'); $this->setQueryBuilder($queryBuilder); } diff --git a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php index a16a4ae27..494cff384 100755 --- a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php @@ -26,14 +26,14 @@ class OrderShipmentsDataGrid extends DataGrid }) ->leftJoin('orders as ors', 'shipments.order_id', '=', 'ors.id') ->leftJoin('inventory_sources as is', 'shipments.inventory_source_id', '=', 'is.id') - ->select('shipments.id as shipment_id', 'shipments.order_id as shipment_order_id', 'shipments.total_qty as shipment_total_qty', 'is.name as inventory_source_name', 'ors.created_at as orderdate', 'shipments.created_at as shipment_created_at') + ->select('shipments.id as shipment_id', 'shipments.order_id as shipment_order_id', 'shipments.total_qty as shipment_total_qty', 'is.name as inventory_source_name', 'ors.created_at as order_date', 'shipments.created_at as shipment_created_at') ->addSelect(DB::raw('CONCAT(order_address_shipping.first_name, " ", order_address_shipping.last_name) as shipped_to')); $this->addFilter('shipment_id', 'shipments.id'); $this->addFilter('shipment_order_id', 'shipments.order_id'); $this->addFilter('shipment_total_qty', 'shipments.total_qty'); $this->addFilter('inventory_source_name', 'is.name'); - $this->addFilter('orderdate', 'ors.created_at'); + $this->addFilter('order_date', 'ors.created_at'); $this->addFilter('shipment_created_at', 'shipments.created_at'); $this->addFilter('shipped_to', DB::raw('CONCAT(order_address_shipping.first_name, " ", order_address_shipping.last_name)')); @@ -79,7 +79,7 @@ class OrderShipmentsDataGrid extends DataGrid ]); $this->addColumn([ - 'index' => 'orderdate', + 'index' => 'order_date', 'label' => trans('admin::app.datagrid.order-date'), 'type' => 'datetime', 'sortable' => true, diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php index 9de1f411d..30821ddba 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -24,11 +24,12 @@ class ProductDataGrid extends DataGrid $queryBuilder = DB::table('products_grid') ->leftJoin('products', 'products_grid.product_id', '=', 'products.id') ->leftJoin('attribute_families', 'products.attribute_family_id', '=', 'attribute_families.id') - ->select('products_grid.product_id as product_id', 'products_grid.sku as product_sku', 'products_grid.name as productname', 'products.type as product_type', 'products_grid.status', 'products_grid.price', 'products_grid.quantity', 'attribute_families.name as attribute_family'); + ->select('products_grid.product_id as product_id', 'products_grid.sku as product_sku', 'products_grid.name as product_name', 'products.type as product_type', 'products_grid.status', 'products_grid.price', 'products_grid.quantity', 'attribute_families.name as attribute_family'); $this->addFilter('product_id', 'products_grid.product_id'); - $this->addFilter('productname', 'products_grid.name'); + $this->addFilter('product_name', 'products_grid.name'); $this->addFilter('product_sku', 'products_grid.sku'); + $this->addFilter('status', 'products_grid.status'); $this->addFilter('product_type', 'products.type'); $this->addFilter('attribute_family', 'attribute_families.name'); @@ -57,7 +58,7 @@ class ProductDataGrid extends DataGrid ]); $this->addColumn([ - 'index' => 'productname', + 'index' => 'product_name', 'label' => trans('admin::app.datagrid.name'), 'type' => 'string', 'searchable' => true,