diff --git a/app/Controllers/Amendmentpurchaseorder.php b/app/Controllers/Amendmentpurchaseorder.php index df3325dc..ea0fc03c 100755 --- a/app/Controllers/Amendmentpurchaseorder.php +++ b/app/Controllers/Amendmentpurchaseorder.php @@ -266,7 +266,8 @@ class Amendmentpurchaseorder extends BaseController } $POType = $this->request->getPost('POType'); - $PoRange = $this->request->getPost('Range'); + $Local_Interstate = $this->request->getPost('Range'); + $PaymentTermsText = $this->request->getPost('beforePaymentTermsText'); $PaymentTerms = $this->request->getPost('PaymentTerms'); $Otherpayment = $this->request->getPost('Otherpayment'); @@ -308,7 +309,7 @@ class Amendmentpurchaseorder extends BaseController } $AmendmentNewPoNo = generate_amendment_po_number($PONO); - $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult); + $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $Local_Interstate, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult); $file = $this->request->getFile('POFile'); $requestfilename = $file->getName(); $PrePOFile = $this->request->getPost('PrePOFile'); diff --git a/app/Controllers/Assetdetails.php b/app/Controllers/Assetdetails.php index ec4fe370..24396451 100755 --- a/app/Controllers/Assetdetails.php +++ b/app/Controllers/Assetdetails.php @@ -435,6 +435,7 @@ class Assetdetails extends BaseController $User = $this->request->getPost('User'); $SupplierName = $this->request->getPost('SupplierName'); $DateOfPurchase = $this->request->getPost('DateOfPurchase'); + $DOpurchase = ""; if ($DateOfPurchase != '') { $DOpurchase = get_date_time_format($DateOfPurchase); } diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index 77651838..dbc2587b 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -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 diff --git a/app/Models/FactoryMachineModel.php b/app/Models/FactoryMachineModel.php index 6c363b76..3e77c081 100644 --- a/app/Models/FactoryMachineModel.php +++ b/app/Models/FactoryMachineModel.php @@ -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(); diff --git a/app/Models/TrpProductionModel.php b/app/Models/TrpProductionModel.php index 55277d90..de14aba0 100644 --- a/app/Models/TrpProductionModel.php +++ b/app/Models/TrpProductionModel.php @@ -146,7 +146,7 @@ class TrpProductionModel extends Model $builder->join('t_trp_sand_use tsu', 'tsu.date = tpmd.date', 'left'); // Subquery: Coating Machine Gas Consumption - $subquery1 = $this->db->table('t_coatingMachineDetails') + $subquery1 = $this->db->table('t_coatingmachinedetails') ->select('date, SUM(totalGasConsumption) AS totalGasConsumption') ->groupBy('date') ->getCompiledSelect(false); // Convert Query Builder to raw SQL; @@ -154,7 +154,7 @@ class TrpProductionModel extends Model $builder->join("({$subquery1}) tcmd", 'tcmd.date = tpmd.date', 'left'); // Subquery: Drier Machine Gas Consumption - $subquery2 = $this->db->table('t_drierMachineDetails') + $subquery2 = $this->db->table('t_driermachinedetails') ->select('date, SUM(total_gas_consumption) AS totalGasConsumption') ->groupBy('date') ->getCompiledSelect(false); // Convert Query Builder to raw SQL; diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index ae89c7d9..ba342ca7 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1251,8 +1251,8 @@ if (!empty($getlogpodtl)) { Item Code Item Description Line Item Specs - Quantity UOM + Quantity Rate Basic Amount Tax Amount @@ -1285,7 +1285,8 @@ if (!empty($getlogpodtl)) { MaterialCode ?> MaterialName, 0, 13, "..."); echo $shortName; ?> - + + @@ -1296,9 +1297,7 @@ if (!empty($getlogpodtl)) { - LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; - } ?> + LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?> Quantity ?> UOM ?> @@ -1309,9 +1308,9 @@ if (!empty($getlogpodtl)) { Taxamount ?> TotalValue ?> - + + + @@ -1660,7 +1659,7 @@ if (!empty($getlogpodtl)) {   Submit   OK -   Submit + @@ -2622,7 +2621,7 @@ if (!empty($getlogpodtl)) { // Taxvalue: TotalTaxValue, // TotalValue: TotalOrderValue // })); - PONOStatus = + var PONOStatus = ""; var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName; var rowHtml = ` @@ -2917,8 +2916,6 @@ if (!empty($getlogpodtl)) { $('#OtheritemDescription').val(''); } - var DeletedMaterialCode = ''; - var DeletedMaterialName = ''; function DeleteRow(rowid) { @@ -3152,6 +3149,7 @@ if (!empty($getlogpodtl)) { +
@@ -456,49 +460,26 @@ } ?> - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ Total + - - - - - (avg) (avg)
Date ShiftMachine On TimeMachine Off TimeMachine Running(hr)Customer Name GradeTotal CoatingTotal Coating Sand(kg)Total Gas ConsumptionHour GasHour QTY(kg)
- Total - - - - - - (avg) (avg)
diff --git a/app/Views/stock/bagStockDetails.php b/app/Views/stock/bagStockDetails.php index 6b529812..9820c631 100644 --- a/app/Views/stock/bagStockDetails.php +++ b/app/Views/stock/bagStockDetails.php @@ -235,6 +235,9 @@ } */ + tfoot tr { + background-color:rgb(235, 236, 203); + } @@ -304,7 +307,7 @@
" - class="form-control mt-2" data-provide="datepicker" + class="form-control mt-2" data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
@@ -419,7 +422,7 @@
- " + " class="form-control mt-2" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1"> @@ -585,45 +588,27 @@ + + -
- + - - - - - - - - - - - + - + + + + + - - - - - - - - - - - + - + - -
+ Total +
Total SumOpening StockReceiptUsedBalance Stock
- Total -
-
@@ -682,12 +667,15 @@ > + foreach($previousMonthBagStockDetails as $index => $previousMonthBagStockDetail) + { + if($previousMonthBagStockDetail['materialCode'] == $bagMaterial['MaterialCode']){ + echo $previousMonthBagStockDetail['balanceStock'] ; + break; + } + + } + ?> @@ -704,8 +692,15 @@ data-id=" " > + foreach($previousMonthBagStockDetails as $index => $previousMonthBagStockDetail) + { + if($previousMonthBagStockDetail['materialCode'] == $bagMaterial['MaterialCode']){ + echo $previousMonthBagStockDetail['balanceStock'] ; + break; + } + + } + ?> @@ -1272,4 +1267,17 @@ }; }); + + + \ No newline at end of file diff --git a/app/Views/stock/dieselStockDetails.php b/app/Views/stock/dieselStockDetails.php index 5f0fedf1..4e46e21c 100644 --- a/app/Views/stock/dieselStockDetails.php +++ b/app/Views/stock/dieselStockDetails.php @@ -226,8 +226,9 @@ max-width: 100px; } - - + tfoot tr{ + background-color:rgb(235, 236, 203); + } @@ -683,67 +684,40 @@ foreach ($period as $day) { } ?> -
- + + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + - + - - - - - - + + + + + + + + + + + - - - - -
Total Sum Opening Purchase Diesel Filling Diesel Balance StockOpening ReadingClosing ReadingFilling DieselConsumptionRunning HoursMileage
- Total - + Total +
-
@@ -839,10 +813,18 @@ foreach ($period as $day) { - > + > + + $previousMonthDieselMachineStockDetail) + { + if($previousMonthDieselMachineStockDetail['machine_id'] == $dieselMachine['id']){ + echo $previousMonthDieselMachineStockDetail['closing_reading'] ; + break; + } + + } + ?> - + $previousMonthDieselMachineStockDetail) + { + if($previousMonthDieselMachineStockDetail['machine_id'] == $dieselMachine['id']){ + echo $previousMonthDieselMachineStockDetail['closing_reading'] ; + break; + } + + } + + ?>
@@ -503,62 +507,29 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - -
Date valueDrier On Time Drier Off TimeRunning HrsSupplier Name input Sand Qty (Metric Ton)inputp Sand Moisture(%)Sand Dried Qty (Metric Ton)Total Gas ConsumptionGas Per TonQty Per Hrs (Metric Ton)Moisture Loss Qty (Metric Ton)Dust Qty (Metric Ton)
- Total - ----
- - + + Total + + - + - + + - + + - + + + + + + + + + +

diff --git a/app/Views/stock/dustAndRoughStockDetails.php b/app/Views/stock/dustAndRoughStockDetails.php index a9860050..405c77ff 100644 --- a/app/Views/stock/dustAndRoughStockDetails.php +++ b/app/Views/stock/dustAndRoughStockDetails.php @@ -228,6 +228,10 @@ max-width: 150px; } + tfoot tr { + background-color:rgb(235, 236, 203); + } + @@ -273,10 +277,9 @@ data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
-
+
-