From ff4c28d76fdf0974533e351fe0492bbf0290e722 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Wed, 19 Mar 2025 17:26:04 +0530 Subject: [PATCH] stock module - 19-03-2025 --- app/Controllers/Rawmaterialdetails.php | 8 ++++---- app/Models/Config_model.php | 23 +++++++++++++++++++++++ app/Views/rawmaterialListing.php | 2 +- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/app/Controllers/Rawmaterialdetails.php b/app/Controllers/Rawmaterialdetails.php index 9eba527b..35fbeb25 100755 --- a/app/Controllers/Rawmaterialdetails.php +++ b/app/Controllers/Rawmaterialdetails.php @@ -8,7 +8,7 @@ use CodeIgniter\Validation\Exceptions\ValidationException; use App\Models\Rawmaterialdetails_model; -use App\Models\MaterialCategoriesModel; +use App\Models\Config_model; use PhpOffice\PhpSpreadsheet\Spreadsheet; @@ -30,7 +30,7 @@ use DateTime; class Rawmaterialdetails extends BaseController { protected $rawmaterialdetails_model; - protected $materialCategories_model; + protected $config_model; protected $session; /** @@ -40,7 +40,7 @@ class Rawmaterialdetails extends BaseController { parent::__construct(); $this->rawmaterialdetails_model = new Rawmaterialdetails_model(); - $this->materialCategories_model = new MaterialCategoriesModel(); + $this->config_model = new Config_model(); $this->session = session(); helper('form'); //$this->load->library('form_validation'); // $this->load->library('pagination'); @@ -82,7 +82,7 @@ class Rawmaterialdetails extends BaseController $data['userRecords'] = $this->rawmaterialdetails_model->rawmaterialListing($isActiveFilter); $data['showArchive'] = $showArchive ; - $data['materialCategoryList']= $this->materialCategories_model->where('is_active',1)->findAll(); + $data['materialCategoryList']= $this->config_model->getMaterialCategoryList(); $this->global['pageTitle'] = 'RawMaterial Listing'; $this->loadViews("rawmaterialListing", $this->global, $data, NULL); diff --git a/app/Models/Config_model.php b/app/Models/Config_model.php index cfa08f74..884a3a71 100755 --- a/app/Models/Config_model.php +++ b/app/Models/Config_model.php @@ -315,4 +315,27 @@ return $result; } + + public function getMaterialCategoryList(){ + + $result = $this->db->table('t_configdetails') + ->select('ConfigValue') + ->where('Config_ID','C023') + ->get() + ->getResultArray(); + + return $result; + + } + + + + + + + + + + + } \ No newline at end of file diff --git a/app/Views/rawmaterialListing.php b/app/Views/rawmaterialListing.php index 7197d41f..98d66678 100755 --- a/app/Views/rawmaterialListing.php +++ b/app/Views/rawmaterialListing.php @@ -95,7 +95,7 @@ if (!empty($materialCategoryList)) { foreach ($materialCategoryList as $record) { ?> - +