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
|
// 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');
|
$previousMonth = DateTime::createFromFormat('Y-m', $month)->modify('-1 month')->format('Y-m');
|
||||||
@ -1419,45 +1412,6 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$dieselMachinesCount = count($dieselMachines);
|
$dieselMachinesCount = count($dieselMachines);
|
||||||
|
|
||||||
@ -1819,35 +1773,6 @@ class StockController extends BaseController
|
|||||||
$data['groupedPowerConsumptionStockDetails'] = array_values($groupedByDate);
|
$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);
|
$electricMachinesCount = count($electricMachines);
|
||||||
|
|
||||||
$data['electricMachinesCount'] = $electricMachinesCount;
|
$data['electricMachinesCount'] = $electricMachinesCount;
|
||||||
@ -2280,33 +2205,6 @@ class StockController extends BaseController
|
|||||||
$data['groupedResinStockDetails'] = array_values($groupedByDate);
|
$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
|
// getting customer for creating table headers
|
||||||
// checking already existing stock if yes then get customer from the existing stock
|
// checking already existing stock if yes then get customer from the existing stock
|
||||||
// if not set customer in db , then set '' empty string
|
// if not set customer in db , then set '' empty string
|
||||||
@ -2657,31 +2555,6 @@ class StockController extends BaseController
|
|||||||
$data['groupedBagStockDetails'] = array_values($groupedByDate);
|
$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
|
// getting customer for creating table headers
|
||||||
// checking already existing stock if yes then get customer from the existing stock
|
// checking already existing stock if yes then get customer from the existing stock
|
||||||
// if not set customer as '' empty string
|
// if not set customer as '' empty string
|
||||||
|
|||||||
@ -92,7 +92,7 @@ class FactoryMachineModel extends Model
|
|||||||
$result = $this->db->table('t_factorymachinemaster')
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->where('energy_type', 'diesel')
|
->where('energy_type', 'diesel')
|
||||||
->orderBy('id', 'desc')
|
->orderBy('id', 'asc')
|
||||||
->get()
|
->get()
|
||||||
->getResultArray();
|
->getResultArray();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user