stock module - 19-03-2025

This commit is contained in:
vadivelJ96 2025-03-19 15:31:00 +05:30
parent 28015007f3
commit aed59fb573
2 changed files with 2 additions and 16 deletions

View File

@ -147,7 +147,6 @@ class Rawmaterialdetails extends BaseController
$this->rawmaterialdetails_model = new rawmaterialdetails_model();
$data['material'] = $this->rawmaterialdetails_model->getmaterialType();
$data['materialcategory'] = $this->rawmaterialdetails_model->getmaterialCategory();
// $data['materialCategoryList']= $this->materialCategories_model->where('is_active',1)->findAll();
$data['UOM'] = $this->rawmaterialdetails_model->getUOM();
$data['assetcode'] = $this->rawmaterialdetails_model->getAssetcode();
$data['costcentercode'] = $this->rawmaterialdetails_model->getcostcentercode();
@ -210,20 +209,6 @@ class Rawmaterialdetails extends BaseController
$MaterialType = $this->request->getPost('MaterialType');
$UOM = $this->request->getPost('UOM');
$MaterialCategory = $this->request->getPost('MatCate');
$materialcategoryarray = $this->rawmaterialdetails_model->getmaterialCategory();
foreach ($materialcategoryarray as $mc) {
$TempArr[] = $mc->ConfigValue;
}
//print_r($TempArr);
if (in_array($MaterialCategory, $TempArr)) {
//echo "Match found";
} else {
//echo "Match not found";
$configcode = 'C023';
$config = array('Config_ID' => $configcode, 'ConfigValue' => $MaterialCategory);
$query = $this->rawmaterialdetails_model->insertvalueintoconfig($config);
}
$Remarks = $this->request->getPost('remarks');
$HSN = $this->request->getPost('HSNcode');
$CreatedBy = $this->session->get('userId');

View File

@ -67,6 +67,7 @@ class TrpProductionModel extends Model
$materialCodes = array_column($subquery, 'materialCode'); // Extracts 'materialCode' values
// Define your table
@ -261,7 +262,7 @@ class TrpProductionModel extends Model
->whereIn('tigrd.MaterialCode', $materialCodes)
->where('tigrd.CreatedDate >=', $startDate)
->where('tigrd.CreatedDate <=', $endDate)
->groupBy('DATE(tigrd.CreatedDate)')
->groupBy('DATE(tigm.CreatedDate)')
->getCompiledSelect(false); // Convert Query Builder to raw SQL