stock module - 19-03-2025

This commit is contained in:
vadivelJ96 2025-03-19 17:26:04 +05:30
parent e689da9ad0
commit ff4c28d76f
3 changed files with 28 additions and 5 deletions

View File

@ -8,7 +8,7 @@ use CodeIgniter\Validation\Exceptions\ValidationException;
use App\Models\Rawmaterialdetails_model; use App\Models\Rawmaterialdetails_model;
use App\Models\MaterialCategoriesModel; use App\Models\Config_model;
use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Spreadsheet;
@ -30,7 +30,7 @@ use DateTime;
class Rawmaterialdetails extends BaseController class Rawmaterialdetails extends BaseController
{ {
protected $rawmaterialdetails_model; protected $rawmaterialdetails_model;
protected $materialCategories_model; protected $config_model;
protected $session; protected $session;
/** /**
@ -40,7 +40,7 @@ class Rawmaterialdetails extends BaseController
{ {
parent::__construct(); parent::__construct();
$this->rawmaterialdetails_model = new Rawmaterialdetails_model(); $this->rawmaterialdetails_model = new Rawmaterialdetails_model();
$this->materialCategories_model = new MaterialCategoriesModel(); $this->config_model = new Config_model();
$this->session = session(); $this->session = session();
helper('form'); //$this->load->library('form_validation'); helper('form'); //$this->load->library('form_validation');
// $this->load->library('pagination'); // $this->load->library('pagination');
@ -82,7 +82,7 @@ class Rawmaterialdetails extends BaseController
$data['userRecords'] = $this->rawmaterialdetails_model->rawmaterialListing($isActiveFilter); $data['userRecords'] = $this->rawmaterialdetails_model->rawmaterialListing($isActiveFilter);
$data['showArchive'] = $showArchive ; $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->global['pageTitle'] = 'RawMaterial Listing';
$this->loadViews("rawmaterialListing", $this->global, $data, NULL); $this->loadViews("rawmaterialListing", $this->global, $data, NULL);

View File

@ -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;
}
} }

View File

@ -95,7 +95,7 @@
if (!empty($materialCategoryList)) { if (!empty($materialCategoryList)) {
foreach ($materialCategoryList as $record) { foreach ($materialCategoryList as $record) {
?> ?>
<option value="<?php echo $record['category_name']?>"><?php echo $record['category_name']?></option> <option value="<?php echo $record['ConfigValue']?>"><?php echo $record['ConfigValue']?></option>
<?php } } ?> <?php } } ?>
</select> </select>
</div> </div>