From 3d3e1ff37cc4eb6d7f51a3c541789e5723c6f380 Mon Sep 17 00:00:00 2001 From: vadivel J Date: Mon, 7 Oct 2024 17:28:11 +0530 Subject: [PATCH] fixed live issue of viewIGR listing -vadivel J --- app/Controllers/Purchaseorder.php | 13 ++++++++----- app/Models/Inwardgateregister_model.php | 3 +++ app/Models/Purchaseorder_model.php | 2 +- app/Views/alterpurchaseorder.php | 5 ++++- app/Views/editCapitalPo.php | 4 +--- app/Views/servicePurchaseorder.php | 6 +++--- app/Views/viewinwardgateregister.php | 25 +++++++++++++++---------- 7 files changed, 35 insertions(+), 23 deletions(-) diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php index b26c2587..a3251720 100755 --- a/app/Controllers/Purchaseorder.php +++ b/app/Controllers/Purchaseorder.php @@ -58,12 +58,14 @@ class Purchaseorder extends BaseController $this->loadViews("addPO", $this->global, NULL, NULL); } + function viewfullpurchaseorder() { $this->global['pageTitle'] = 'View Purchase Order'; $this->loadViews("viewfullpurchaseorder", $this->global, Null); } + function advancerequest() { $this->global['pageTitle'] = 'Advance Request'; @@ -77,6 +79,7 @@ class Purchaseorder extends BaseController } + function requisition($listErrors = null) { @@ -99,6 +102,7 @@ class Purchaseorder extends BaseController } + /** * This function is used to load the purchaseorder list */ @@ -117,12 +121,11 @@ class Purchaseorder extends BaseController // echo "
";
     // print_r($data['POData']);die;
     $this->global['pageTitle'] = 'Purchase Orders';
-
-
-
+    
 
     $this->loadViews("POlist", $this->global, $data, NULL);
   }
+
   function validate_req($str = null)
   {
     if (empty($str)) {
@@ -2949,7 +2952,7 @@ class Purchaseorder extends BaseController
     $Qualitycheck = 1;
 
 
-    $POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
+    $POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
     if ($POStatus == 'ST026') {
       $POList['ApprovedOn'] = get_current_date_time();
       $POList['ApprovedBy'] = $this->session->get('userId');
@@ -3220,7 +3223,7 @@ class Purchaseorder extends BaseController
 
 
 
-          $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'ServiceMaterialDescription' => $CapitalItemDescription, 'Per' => $Per);
+          $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CostCenterCode' => $CostCenter, 'ServiceMaterialDescription' => $CapitalItemDescription, 'Per' => $Per);
           $POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO, $LineItemNo, $POLineItemList);
           if ($capitalType == '1') {
             $ServiceTaxList = array('CGST' => $Cgst, 'After_CGST' => $AfterCgst, 'SGST' => $Sgst, 'After_SGST' => $AfterSgst, 'IGST' => $Igst, 'After_IGST' => $AfterIgst, 'otherallowance' => $OtherAmt, 'TotalValue' => $TaxtotalOrderValue, 'UpdateBY' => $CreateBy, 'UpdatedOn' => $createddt, 'discount' => $DiscountType, 'discountval' => $DiscountValue, 'Afterdiscountval' => $AfterDiscount, 'FreightType' => $FreightTypeloc, 'NoOfTrip' => $FreightNoofTriploc, 'FreightValue' => $Freightrateloc, 'AfterFreightValue' => $FreightAmountloc);
diff --git a/app/Models/Inwardgateregister_model.php b/app/Models/Inwardgateregister_model.php
index 1e9534d1..a0bd5054 100755
--- a/app/Models/Inwardgateregister_model.php
+++ b/app/Models/Inwardgateregister_model.php
@@ -361,6 +361,9 @@ class Inwardgateregister_model extends Model
 			->orderBy('igr.CreatedDate', 'desc');
         $query = $builder->get();
         $result = $query->getResult();
+
+	
+
 		// echo $this->db->getLastQuery()->getQuery();die;
         return $result;
     }
diff --git a/app/Models/Purchaseorder_model.php b/app/Models/Purchaseorder_model.php
index 80cb10ce..3118bfae 100755
--- a/app/Models/Purchaseorder_model.php
+++ b/app/Models/Purchaseorder_model.php
@@ -390,7 +390,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
 	function purchaseorderListing($forwhat = '')
 	{
 		$builder = $this->db->table('t_purchaseorder_master POMast')->distinct()
-			->select('POMast.PONO,supp.SupplierName,TotalOrderValue,PODate,Stat.StatusName,Stat.StatusCode,POMast.POType as ReqType,DeliveryDate,DeliverySchedule,DeliveryOption,POMast.CapitalRange')
+			->select('POMast.PONO,POMast.CreatedDate,supp.SupplierName,TotalOrderValue,PODate,Stat.StatusName,Stat.StatusCode,POMast.POType as ReqType,DeliveryDate,DeliverySchedule,DeliveryOption,POMast.CapitalRange')
 			->join('t_supplierdetailsn supp', 'supp.SupplierID = POMast.SupplierID')
 			->join('t_status Stat', 'Stat.StatusCode = POMast.Status')
 			->join('t_purchaseorder_lineitem LineItem', 'POMast.PONO = LineItem.PONO')
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php
index 2d1f6c3a..58ef159c 100755
--- a/app/Views/alterpurchaseorder.php
+++ b/app/Views/alterpurchaseorder.php
@@ -2616,7 +2616,10 @@ if (!empty($INRSYMBOL)) {
                                     
                                         $poDt=new DateTime('now', new DateTimeZone('Asia/Kolkata'));
                                         $formattedDate = $poDt->format('Y-m-d');
-                                        $data = array('type' => 'date', 'name' => 'PODate', 'value' => set_value('PODate', $formattedDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;');
+                                        $data = array('type' => 'date', 'name' => 'PODate', 
+                                        'value' => set_value('PODate',$formattedDate), 'min' => $formattedDate,
+                                        'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 
+                                        'onkeypress' => 'return false;');
                                         echo form_input($data);
                                         ?>
                                     
diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php
index 4d31a392..f9b39b23 100755
--- a/app/Views/editCapitalPo.php
+++ b/app/Views/editCapitalPo.php
@@ -5782,9 +5782,7 @@ if (!empty($getlogpodtl)) {
 
   }
 
-  function Save(status) {
-    alert('save function - what are you doing');
-  }
+  
 
   function Save(status) {
     if (status == '0') {
diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php
index 09015242..347b1778 100755
--- a/app/Views/servicePurchaseorder.php
+++ b/app/Views/servicePurchaseorder.php
@@ -544,7 +544,7 @@ if (!empty($INRSYMBOL)) {
 		$("#PODate").datepicker({
 			format: 'dd-mm-yyyy',
 			startDate: new Date(),
-			clearBtn: true
+			clearBtn: false
 		});
 		$("#PaymentTerms").select2();
 
@@ -782,7 +782,7 @@ if (!empty($INRSYMBOL)) {
 								
- +