diff --git a/CHANGELOG.md b/CHANGELOG.md index f9244a38..5c9ff5d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -188,6 +188,8 @@ - Fixed other minor issues ## [3.3.1] +- Fixed sorting on Shipment list columns from joined tables (Tracking number, Receiver, Address, City) +- Changed default sort on Shipment list to show latest shipments first - Fixed incorrect COD label amount when discount code is applied - Fixed parcelshop info not displaying in backoffice order view when customer city differs from parcelshop city - Fixed shipment creation overwriting parcelshop address data with customer address data @@ -199,4 +201,4 @@ - Fixed automatic PUDO point pre-selection in LIST mode - Fixed PUDO shipment CSS styling - Added timeframes to shipment request -- Fixed DPDBaltics menu item disappearing from sidebar when navigating to module pages \ No newline at end of file +- Fixed DPDBaltics menu item disappearing from sidebar when navigating to module pages diff --git a/controllers/admin/AdminDPDBalticsShipmentController.php b/controllers/admin/AdminDPDBalticsShipmentController.php index 1aafef8b..bd75499e 100644 --- a/controllers/admin/AdminDPDBalticsShipmentController.php +++ b/controllers/admin/AdminDPDBalticsShipmentController.php @@ -49,12 +49,15 @@ public function initToolbar() private function initList() { $this->list_no_link = true; + $this->_defaultOrderBy = 'id_dpd_shipment'; + $this->_defaultOrderWay = 'DESC'; $this->fields_list = [ 'tracking_number' => [ 'title' => $this->module->l('Tracking number'), 'type' => 'text', - 'havingFilter' => true + 'havingFilter' => true, + 'order_key' => 'oc!tracking_number', ], 'date_print' => [ 'title' => $this->module->l('Printing date'), @@ -69,17 +72,20 @@ private function initList() 'receiver_name' => [ 'title' => $this->module->l('Receiver'), 'type' => 'text', - 'havingFilter' => true + 'havingFilter' => true, + 'order_key' => 'c!lastname', ], 'address1' => [ 'title' => $this->module->l('Address'), 'type' => 'text', - 'havingFilter' => true + 'havingFilter' => true, + 'order_key' => 'addr!address1', ], 'city' => [ 'title' => $this->module->l('City'), 'type' => 'text', - 'havingFilter' => true + 'havingFilter' => true, + 'order_key' => 'addr!city', ], 'reference1' => [ 'title' => $this->module->l('Cust Ref 1'),