diff --git a/modules/public_pages/erp/order/sales_order/controllers/SordersController.php b/modules/public_pages/erp/order/sales_order/controllers/SordersController.php index 4496ad75..d8193065 100755 --- a/modules/public_pages/erp/order/sales_order/controllers/SordersController.php +++ b/modules/public_pages/erp/order/sales_order/controllers/SordersController.php @@ -37,8 +37,10 @@ public function index() $s_data['slmaster_id'] = $this->_data['slmaster_id']; } - if (isset($this->_data['status'])) { + if (isset($this->_data['status']) && $this->_data['status'] !== 'all') { $s_data['status'] = $this->_data['status']; + } elseif (isset($this->_data['status']) && $this->_data['status'] == 'all') { + $s_data['status'] = array_keys($this->_templateobject->getEnumOptions('status')); } else { $s_data['status'] = [ $this->_templateobject->newStatus(), @@ -53,7 +55,7 @@ public function index() } - if (!empty($s_data)) { + if (isset($this->_data['slmaster_id']) && isset($this->_data['status']) && $this->_data['status'] == 'all') { $this->setSearch('sordersSearch', 'useDefault', $s_data, null ); } else { $this->setSearch('sordersSearch', 'useDefault', $s_data, null, true); @@ -678,7 +680,7 @@ public function view() 'controller' => $this->name, 'action' => 'index', 'slmaster_id' => $order->slmaster_id, - 'status' => '' + 'status' => 'all' ), 'tag' => 'view quotes/orders' );