changes in stock module 06-03-2025
This commit is contained in:
parent
7f722ceef9
commit
88966bc5f5
@ -1331,13 +1331,6 @@ class StockController extends BaseController
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Get the previous month's last date diesel stock details for next month updation
|
||||
|
||||
$previousMonth = DateTime::createFromFormat('Y-m', $month)->modify('-1 month')->format('Y-m');
|
||||
@ -1416,46 +1409,7 @@ class StockController extends BaseController
|
||||
|
||||
// Reset the structure to have indexed arrays without the date keys
|
||||
$data['groupedDieselMachineStockDetails'] = array_values($groupedByDate);
|
||||
|
||||
|
||||
|
||||
//temp_code_s_2025_02
|
||||
|
||||
// getting diesel machines for creating table headers
|
||||
// checking already existing stock if yes then get the diesel machines id from the existing stock
|
||||
// if not get all the diesel machines from the factory Machine master table
|
||||
|
||||
// if (!empty($data['groupedDieselMachineStockDetails'])) {
|
||||
|
||||
// $result = $groupedByDate[$date];
|
||||
|
||||
// $distinctMachineId = [];
|
||||
|
||||
// foreach ($result as $index => $eachResult) {
|
||||
// $distinctMachineId[] = $result[$index]['machine_id'];
|
||||
// }
|
||||
|
||||
// $dieselMachines = $this->factoryMachine_model
|
||||
// ->whereIn('id', $distinctMachineId)
|
||||
// ->orderBy('id', 'asc')
|
||||
// ->get()
|
||||
// ->getResultArray();
|
||||
|
||||
|
||||
// } else {
|
||||
|
||||
// $dieselMachines = $this->factoryMachine_model
|
||||
// ->where('is_active', 1)
|
||||
// ->where('energy_type', 'Diesel')
|
||||
// ->orderBy('id', 'asc')
|
||||
// ->get()
|
||||
// ->getResultArray();
|
||||
|
||||
// }
|
||||
|
||||
//temp_code_e_2025_02
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1819,35 +1773,6 @@ class StockController extends BaseController
|
||||
$data['groupedPowerConsumptionStockDetails'] = array_values($groupedByDate);
|
||||
|
||||
|
||||
//temp_code_s_2025_02
|
||||
|
||||
// getting electric machines for creating table headers
|
||||
// checking already existing stock if yes then get the electric machines id from the existing stock
|
||||
// if not get all the electric machines from the factory Machine master table
|
||||
|
||||
// if (!empty($data['groupedPowerConsumptionStockDetails'])) {
|
||||
|
||||
// $result = $groupedByDate[$date];
|
||||
|
||||
// $distinctMachineId = [];
|
||||
|
||||
// foreach ($result as $index => $eachResult) {
|
||||
// $distinctMachineId[] = $result[$index]['machine_id'];
|
||||
// }
|
||||
|
||||
// $electricMachines = $this->factoryMachine_model->getSelectedElectricMachines($distinctMachineId);
|
||||
|
||||
|
||||
// } else {
|
||||
|
||||
// $electricMachines = $this->factoryMachine_model->getAllActiveElectricMachines();
|
||||
|
||||
// }
|
||||
|
||||
//temp_code_e_2025_02
|
||||
|
||||
|
||||
|
||||
$electricMachinesCount = count($electricMachines);
|
||||
|
||||
$data['electricMachinesCount'] = $electricMachinesCount;
|
||||
@ -2279,34 +2204,7 @@ class StockController extends BaseController
|
||||
// Reset the structure to have indexed arrays without the date keys
|
||||
$data['groupedResinStockDetails'] = array_values($groupedByDate);
|
||||
|
||||
|
||||
//temp_code_s_2025_02
|
||||
|
||||
// getting resin material for creating table headers
|
||||
// checking already existing stock if yes then get the material code from the existing stock
|
||||
// if not get all the material codes currently isActive from the raw material details table
|
||||
|
||||
// if (!empty($data['groupedResinStockDetails'])) {
|
||||
|
||||
// $result = $groupedByDate[$date];
|
||||
|
||||
// $distinctMaterialCodes = [];
|
||||
|
||||
// foreach ($result as $index => $eachResult) {
|
||||
// $distinctMaterialCodes[] = $result[$index]['materialCode'];
|
||||
// }
|
||||
|
||||
// $resinMaterials = $this->rawmaterialdetails_model->getSelectedResinMaterialCode($distinctMaterialCodes);
|
||||
|
||||
// } else {
|
||||
|
||||
// $resinMaterials = $this->rawmaterialdetails_model->getAllResinMaterialCode();
|
||||
|
||||
// }
|
||||
|
||||
//temp_code_e_2025_02
|
||||
|
||||
|
||||
|
||||
// getting customer for creating table headers
|
||||
// checking already existing stock if yes then get customer from the existing stock
|
||||
// if not set customer in db , then set '' empty string
|
||||
@ -2655,32 +2553,7 @@ class StockController extends BaseController
|
||||
|
||||
// Reset the structure to have indexed arrays without the date keys
|
||||
$data['groupedBagStockDetails'] = array_values($groupedByDate);
|
||||
|
||||
|
||||
|
||||
//temp_code_s_2025_02
|
||||
|
||||
// // getting bag material for creating table headers
|
||||
// // checking already existing stock if yes then get the material code from the existing bag
|
||||
// // if not get all the material codes from the raw material details table
|
||||
|
||||
// if (!empty($data['groupedBagStockDetails'])) {
|
||||
// $result = $groupedByDate[$date];
|
||||
|
||||
// $distinctMaterialCodes = [];
|
||||
|
||||
// foreach ($result as $index => $eachResult) {
|
||||
// $distinctMaterialCodes[] = $result[$index]['materialCode'];
|
||||
// }
|
||||
|
||||
// $bagMaterials = $this->rawmaterialdetails_model->getSelectedBagMaterialCode($distinctMaterialCodes);
|
||||
|
||||
// } else {
|
||||
// $bagMaterials = $this->rawmaterialdetails_model->getAllBagMaterialCode();
|
||||
// }
|
||||
|
||||
//temp_code_e_2025_02
|
||||
|
||||
|
||||
|
||||
// getting customer for creating table headers
|
||||
// checking already existing stock if yes then get customer from the existing stock
|
||||
|
||||
@ -92,7 +92,7 @@ class FactoryMachineModel extends Model
|
||||
$result = $this->db->table('t_factorymachinemaster')
|
||||
->where('is_active', 1)
|
||||
->where('energy_type', 'diesel')
|
||||
->orderBy('id', 'desc')
|
||||
->orderBy('id', 'asc')
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user