diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index 65d02aaf..7521095c 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -95,7 +95,7 @@ class Inwardgateregister extends BaseController $data['transporter'] = $this->inwardgateregister_model->transporter(); $data['fromDate'] = date('d-m-Y', strtotime($fromDate)); $data['toDate'] = date('d-m-Y', strtotime($toDate)); - + $data['driverlist'] = $this->inwardgateregister_model->getdriverlist(); $this->loadViews("viewinwardgateregister", $this->global, $data, NULL); } @@ -146,6 +146,7 @@ class Inwardgateregister extends BaseController $result = $this->inwardgateregister_model->getpurchaseorder(); $result1 = $this->inwardgateregister_model->transporter(); + $data['driverlist'] = $this->inwardgateregister_model->getdriverlist(); $data['transporter'] = array_filter($result1 , function($item) { return ($item->isactive == 1); }); @@ -158,7 +159,7 @@ class Inwardgateregister extends BaseController }); $data['emp_data'] = []; // $data['emp_data'] = $this->inwardgateregister_model->getAdditionalIGRFile(); - // dd($data['PO_NO']);die; + // dd($data['driverlist']);die; $this->loadViews("inwardgateregister", $this->global, $data, NULL); } diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index df0de8f7..dbc8ab0c 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -1445,10 +1445,16 @@ class StockController extends BaseController - public function updateTrpProductionDetails($inserts, $freshEntry = false) + public function updateTrpProductionDetails($inserts = null, $freshEntry = false) { - $postData = $this->request->getPost(); - + + + $postData = json_decode($this->request->getPost('updateTrpProductionDetails')); + + + //converting std class object to associative array.. + $postData['updateTrpProductionDetails'] = json_decode(json_encode($postData), true); + if (empty($postData['updateTrpProductionDetails'])) { if (empty($inserts)) { return $this->response->setJSON(['error' => 'No data found to update']); diff --git a/app/Controllers/Supplier.php b/app/Controllers/Supplier.php index a1f66c34..f85b4d3b 100755 --- a/app/Controllers/Supplier.php +++ b/app/Controllers/Supplier.php @@ -159,6 +159,7 @@ class Supplier extends BaseController $file1 = $this->request->getFile('Cert_MSME'); $file2 = $this->request->getFile('Cert_GST'); $file3 = $this->request->getFile('Cert_BANK'); + $file4 = $this->request->getFile('Cert_PAN'); $path = ROOTPATH.'public/uploads/images/'; if ($file2 && $file2->isValid() && !$file2->hasMoved()) { @@ -190,6 +191,17 @@ class Supplier extends BaseController else{ $supplier['Cert_BANK'] = NULL; } + + if ($file4 && $file4->isValid() && !$file4->hasMoved()) { + if(!is_dir($path)) { mkdir($path, 0777, true); } + $PAN_DOC = $file4->getName(); + $file4->move($path,$PAN_DOC); + $supplier['Cert_PAN'] = $PAN_DOC; + } + else{ + $supplier['Cert_PAN'] = NULL; + } + $result = $this->supplier_model->addNewsupplier($supplier); if ($result > 0) { diff --git a/app/Models/Inwardgateregister_model.php b/app/Models/Inwardgateregister_model.php index 129cd233..01a5c87f 100755 --- a/app/Models/Inwardgateregister_model.php +++ b/app/Models/Inwardgateregister_model.php @@ -193,7 +193,7 @@ class Inwardgateregister_model extends Model function viewpurchaseorder($PO) { - $subQuery = 'SELECT distinct POM.PONO, POL.MaterialCode, POL.Quantity, POL.ReceivedQuantity, (POL.Quantity - POL.ReceivedQuantity) as PendingQty, QuantityRejected, POL.PONO, MM.MaterialName, MM.UOM + $subQuery = 'SELECT distinct POM.PONO, POL.MaterialCode, POL.Quantity, POL.ReceivedQuantity, (POL.Quantity - POL.ReceivedQuantity) as PendingQty, QuantityRejected, POL.PONO, MM.MaterialName, MM.UOM,POL.Rate FROM t_purchaseorder_master POM LEFT JOIN t_purchaseorder_lineitem POL ON POL.PONO = POM.PONO LEFT JOIN t_igr_master IGM ON IGM.PONO = POL.PONO @@ -519,12 +519,30 @@ class Inwardgateregister_model extends Model $builder = $this->db->table('t_igr_master igr') ->distinct() - ->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity,POL.Rate,POM.POType,POM.IsOpenOrder') + ->select("igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity,POL.Rate,POM.POType,POM.IsOpenOrder, + SUM( + CASE + WHEN POM.POType = 'IMPORT' + THEN COALESCE(it.IGST, 0) + WHEN POM.POType = 'CAPITAL' AND POM.CapitalRange = 0 + THEN COALESCE(it.IGST, 0) + WHEN POM.POType = 'CAPITAL' AND POM.CapitalRange = 1 + THEN COALESCE(st.CGST, 0) + COALESCE(st.SGST, 0) + COALESCE(st.IGST, 0) + WHEN POM.POType = 'REVENUE' + THEN COALESCE(rt.CGST, 0) + COALESCE(rt.SGST, 0) + COALESCE(rt.IGST, 0) + WHEN POM.POType = 'SERVICE' + THEN COALESCE(st.CGST, 0) + COALESCE(st.SGST, 0) + COALESCE(st.IGST, 0) + ELSE 0 + END + ) AS TaxInPercentage", false) ->join('t_igr_details igrd', 'igrd.IGRNO = igr.IGRNO') ->join('t_purchaseorder_master POM', 'igr.PONO = POM.PONO') ->join('t_purchaseorder_lineitem POL', 'igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ') ->join('t_supplierdetailsn sup', 'sup.SupplierID = POM.SupplierID') ->join('t_materialmaster MM', 'MM.MaterialCode = igrd.MaterialCode') + ->join('t_service_tax st', 'st.LineItemNo = POL.LineItemNo' , 'left') + ->join('t_revenue_tax rt', 'rt.LineItemNo = POL.LineItemNo' , 'left') + ->join('t_import_tax it', 'it.LineItemNo = POL.LineItemNo' , 'left') ->where('igr.IGRNO', $IGRNO); $query = $builder->get(); @@ -1204,6 +1222,16 @@ class Inwardgateregister_model extends Model ]; } + public function getdriverlist() + { + + $query = $this->db->query('SELECT DriverName,DriverMobileNumber + FROM t_igr_master + WHERE DriverName != "" + GROUP BY DriverName,DriverMobileNumber'); + $result = $query->getResultArray(); + return $result; + } } \ No newline at end of file diff --git a/app/Views/addSupplier.php b/app/Views/addSupplier.php index 5065cb42..290943dc 100755 --- a/app/Views/addSupplier.php +++ b/app/Views/addSupplier.php @@ -109,23 +109,28 @@ Tax Related Data
-
+
-
- - -
-
-
+
+ + +
+
+ + +
+
+
+
diff --git a/app/Views/expense_list.php b/app/Views/expense_list.php index 1334d989..7d6fe756 100755 --- a/app/Views/expense_list.php +++ b/app/Views/expense_list.php @@ -113,6 +113,7 @@ Created Date + Created By Non-IGRNO Supplier Name Item Description @@ -124,7 +125,6 @@ IGST Total Status - Created By Action @@ -152,6 +152,7 @@ } ?> +
@@ -178,7 +179,6 @@ -
-
- -
+
+ +
- +
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - $trpProductionDetail) - { - + - $trpProductionDetail) { - + + format('d-m-Y'); - if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} - ?> - - > - - - - - - - - + ?>> - - - - + + + + - - - + + + + + + + - - - + + + - - - + + + - - - + + + - + + + - - - + + + - + + + - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - - - - - - - - - - - - - + + + - + + + - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0, + 'coldStart' => 0, + 'breakdownHours' => 0, + 'burnerFiringHours' => 0, + 'sandFeedingHours' => 0, + 'gasReceiptBg' => 0, + 'gasReceiptPg' => 0, + 'physicalGasConsumption' => 0, + 'drierGasConsumption' => 0, + 'coatingGasConsumption' => 0, + 'trpPlusDrierGasConsumption' => 0, + 'trpPhysicalGasPerTon' => 0, + 'panelGasConsumption' => 0, + 'panelGasPerTon' => 0, + 'ALs_wcs' => 0, + 'ALe_wcs' => 0, + 'ME_wcs' => 0, + 'SI_wcs' => 0, + 'caparo_wcs' => 0, + 'Nemak_wcs' => 0, + 'DR_wcs' => 0, + 'edRunningHours' => 0, + 'edProduction' => 0, + 'edUsage' => 0, + 'trpProduction' => 0, + 'trpProductionPerHour' => 0, + 'coating' => 0, + 'ALs_crs' => 0, + 'Nemak_crs' => 0, + 'ME_crs' => 0, + 'BI_crs' => 0, + 'Karmen_crs' => 0, + 'waterReceipt' => 0, + 'waterConsumption' => 0, + 'ebReading' => 0, + 'ebReadingPerUnitTon' => 0, + 'workingPersonEngineers' => 0, + 'workingPersonSupervisiors' => 0, + 'workingPersonOperators' => 0, + 'msSeperation' => 0, + 'edWaste' => 0, + 'coolerBags' => 0, + 'edPlus20Waste' => 0, + 'cycloneWaste' => 0 + + ]; + } + + // Sum values for the material + + $summary['totalHours'] += is_numeric($trpProductionDetail['totalHours']) ? $trpProductionDetail['totalHours'] : 0; + $summary['coldStart'] += is_numeric($trpProductionDetail['coldStart']) ? $trpProductionDetail['coldStart'] : 0; + $summary['breakdownHours'] += is_numeric($trpProductionDetail['breakdownHours']) ? $trpProductionDetail['breakDownHours'] : 0; + $summary['burnerFiringHours'] += is_numeric($trpProductionDetail['burnerFiringHours']) ? $trpProductionDetail['burnerFiringHours'] : 0; + $summary['sandFeedingHours'] += is_numeric($trpProductionDetail['sandFeedingHours']) ? $trpProductionDetail['sandFeedingHours'] : 0; + $summary['gasReceiptBg'] += is_numeric($trpProductionDetail['gasReceiptBg']) ? $trpProductionDetail['gasReceiptBg'] : 0; + $summary['gasReceiptPg'] += is_numeric($trpProductionDetail['gasReceiptPg']) ? $trpProductionDetail['gasReceiptPg'] : 0; + $summary['physicalGasConsumption'] += is_numeric($trpProductionDetail['physicalGasConsumption']) ? $trpProductionDetail['physicalGasConsumption'] : 0; + $summary['drierGasConsumption'] += is_numeric($trpProductionDetail['drierGasConsumption']) ? $trpProductionDetail['drierGasConsumption'] : 0; + $summary['coatingGasConsumption'] += is_numeric($trpProductionDetail['coatingGasConsumption']) ? $trpProductionDetail['coatingGasConsumption'] : 0; + $summary['trpPlusDrierGasConsumption'] += is_numeric($trpProductionDetail['trpPlusDrierGasConsumption'])? $trpProductionDetail['trpPlusDrierGasConsumption'] : 0; + $summary['trpPhysicalGasPerTon'] += is_numeric($trpProductionDetail['trpPhysicalGasPerTon']) ? $trpProductionDetail['trpPhysicalGasPerTon'] : 0; + $summary['panelGasConsumption'] += is_numeric($trpProductionDetail['panelGasConsumption']) ? $trpProductionDetail['panelGasConsumption'] : 0; + $summary['panelGasPerTon'] += is_numeric($trpProductionDetail['panelGasPerTon']) ? $trpProductionDetail['panelGasPerTon'] : 0; + $summary['ALs_wcs'] += is_numeric($trpProductionDetail['ALs_wcs']) ? $trpProductionDetail['ALs_wcs'] : 0; + $summary['ALe_wcs'] += is_numeric($trpProductionDetail['ALe_wcs']) ? $trpProductionDetail['ALe_wcs'] : 0; + $summary['ME_wcs'] += is_numeric($trpProductionDetail['ME_wcs']) ? $trpProductionDetail['ME_wcs'] : 0; + $summary['SI_wcs'] += is_numeric($trpProductionDetail['SI_wcs']) ? $trpProductionDetail['SI_wcs'] : 0; + $summary['caparo_wcs'] += is_numeric($trpProductionDetail['caparo_wcs']) ? $trpProductionDetail['caparo_wcs'] : 0; + $summary['Nemak_wcs'] += is_numeric($trpProductionDetail['Nemak_wcs']) ? $trpProductionDetail['Nemak_wcs'] : 0; + $summary['DR_wcs'] += is_numeric($trpProductionDetail['DR_wcs']) ? $trpProductionDetail['DR_wcs'] : 0; + $summary['edRunningHours'] += is_numeric($trpProductionDetail['edRunningHours']) ? $trpProductionDetail['edRunningHours'] : 0; + $summary['edProduction'] += is_numeric($trpProductionDetail['edProduction']) ? $trpProductionDetail['edProduction'] : 0; + $summary['edUsage'] += is_numeric($trpProductionDetail['edUsage']) ? $trpProductionDetail['edUsage'] : 0; + $summary['trpProduction'] += is_numeric($trpProductionDetail['trpProduction']) ? $trpProductionDetail['trpProduction'] : 0; + $summary['trpProductionPerHour'] += is_numeric($trpProductionDetail['trpProductionPerHour']) ? $trpProductionDetail['trpProductionPerHour'] : 0; + $summary['coating'] += is_numeric($trpProductionDetail['coating']) ? $trpProductionDetail['coating'] : 0; + $summary['ALs_crs'] += is_numeric($trpProductionDetail['ALs_crs']) ? $trpProductionDetail['ALs_crs'] : 0; + $summary['Nemak_crs'] += is_numeric($trpProductionDetail['Nemak_crs']) ? $trpProductionDetail['Nemak_crs'] : 0; + $summary['ME_crs'] += is_numeric($trpProductionDetail['ME_crs']) ? $trpProductionDetail['ME_crs'] : 0; + $summary['BI_crs'] += is_numeric($trpProductionDetail['BI_crs']) ? $trpProductionDetail['BI_crs'] : 0; + $summary['Karmen_crs'] += is_numeric($trpProductionDetail['Karmen_crs']) ? $trpProductionDetail['Karmen_crs'] : 0; + $summary['waterReceipt'] += is_numeric($trpProductionDetail['waterReceipt']) ? $trpProductionDetail['waterReceipt'] : 0; + $summary['waterConsumption'] += is_numeric($trpProductionDetail['waterConsumption']) ? $trpProductionDetail['waterConsumption'] : 0; + $summary['ebReading'] += is_numeric($trpProductionDetail['ebReading']) ? $trpProductionDetail['ebReading'] : 0; + $summary['ebReadingPerUnitTon'] += is_numeric($trpProductionDetail['ebReadingPerUnitTon']) ? $trpProductionDetail['ebReadingPerUnitTon'] : 0; + $summary['workingPersonEngineers'] += is_numeric($trpProductionDetail['workingPersonEngineers']) ? $trpProductionDetail['workingPersonEngineers'] : 0; + $summary['workingPersonSupervisiors'] += is_numeric($trpProductionDetail['workingPersonSupervisiors']) ? $trpProductionDetail['workingPersonSupervisiors'] : 0; + $summary['workingPersonOperators'] += is_numeric($trpProductionDetail['workingPersonOperators']) ? $trpProductionDetail['workingPersonOperators'] : 0; + $summary['msSeperation'] += is_numeric($trpProductionDetail['msSeperation']) ? $trpProductionDetail['msSeperation'] : 0; + $summary['edWaste'] += is_numeric($trpProductionDetail['edWaste']) ? $trpProductionDetail['edWaste'] : 0; + $summary['coolerBags'] += is_numeric($trpProductionDetail['coolerBags']) ? $trpProductionDetail['coolerBags'] : 0; + $summary['edPlus20Waste'] += is_numeric($trpProductionDetail['edPlus20Waste']) ? $trpProductionDetail['edPlus20Waste'] : 0; + $summary['cycloneWaste'] += is_numeric($trpProductionDetail['cycloneWaste']) ? $trpProductionDetail['cycloneWaste'] : 0; + } ?> + + + + +
Date Opening Time Closing Time Total Hours Cold Start Break Down Hours Burner Firing Hours Sand Feeding Hours Gas Receipt Physical Gas Consumption Drier Gas Consumption Coating Gas Consumption TRP plus Drier Gas Consumption TRP Physical Gas Per Ton Panel Gas Consumption Panel Gas Per Ton Incoming Sand/ Lump details ED details TRP Sand Usage Water EB Reading EB Unit Per Ton Working Persons Maintanence Details Description MS Seperation ED Waste Cooler Bags ED +20 Waste Cyclone Waste Date Opening Time Closing Time Total Hours Cold Start Break Down Hours Burner Firing Hours Sand Feeding Hours Gas Receipt Physical Gas Consumption Drier Gas Consumption Coating Gas Consumption TRP plus Drier Gas Consumption TRP Physical Gas Per Ton Panel Gas Consumption Panel Gas Per Ton Incoming Sand/ Lump details ED details TRP Sand Usage Water EB Reading EB Unit Per Ton Working Persons Maintanence Details Description MS Seperation ED Waste Cooler Bags ED +20 Waste Cyclone Waste
BGPG AL(S) AL(E) ME SI caparo Nemak DRRunning Hours Production Usage Production Production Per Hour Coating Hindhuja NemakME BI Karmen Receipt Consumption Engineers SupervisorsOperators Roller Drivers Nature Of Maintenance Location
BGPG AL(S) AL(E) ME SI caparo Nemak DRRunning Hours Production Usage Production Production Per Hour Coating Hindhuja NemakME BI Karmen Receipt Consumption Engineers SupervisorsOperators Roller Drivers Nature Of Maintenance Location
- - - - - + + + + + - - - - - - - - - - - - - - - - + + - - + + - - + + + + - - + + + + - - - - - - - - + + - - - - - - - - - - - - - - + + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - - - - - - - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date Opening Time Closing Time Total Hours Cold Start Break Down Hours Burner Firing Hours Sand Feeding Hours Gas Receipt Physical Gas Consumption Drier Gas Consumption Coating Gas Consumption TRP plus Drier Gas Consumption TRP Physical Gas Per Ton Panel Gas Consumption Panel Gas Per Ton Incoming Sand/ Lump details ED details TRP Sand Usage Water EB Reading EB Unit Per Ton Working Persons Maintanence Details Description MS Seperation ED Waste Cooler Bags ED +20 Waste Cyclone Waste
BGPG AL(S) AL(E) ME SI caparo Nemak DRRunning Hours Production Usage Production Production Per Hour Coating Hindhuja NemakME BI Karmen Receipt Consumption Engineers SupervisorsOperators Roller Drivers Nature Of Maintenance Location
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + -
+ +
@@ -911,35 +1533,35 @@
-
-