diff --git a/app/Controllers/FactoryMachineController.php b/app/Controllers/FactoryMachineController.php index e23a2c1a..82dbe414 100644 --- a/app/Controllers/FactoryMachineController.php +++ b/app/Controllers/FactoryMachineController.php @@ -83,7 +83,10 @@ class FactoryMachineController extends BaseController $this->global['pageTitle'] = 'Factory Machine Master Details'; - $data['masterData'] = $this->factoryMachineMaster_model->where('is_active', 1)->findAll(); + $data['masterData'] = $this->factoryMachineMaster_model->where('is_active', 1) + ->where('is_active', 1) + ->orderBy('created_at','DESC') + ->findAll(); return $this->loadViews("factoryMachineMasterDetails", $this->global, $data, NULL); @@ -95,7 +98,10 @@ class FactoryMachineController extends BaseController $id = $this->request->getPost('id'); - $data = $this->factoryMachineMaster_model->where('id', $id)->where('is_active', 1)->first(); + $data = $this->factoryMachineMaster_model->where('id', $id) + ->where('is_active', 1) + ->orderBy('created_at','DESC') + ->first(); return $this->loadViews("factoryMachineMasterDetails", $this->global, $data, NULL);