diff --git a/app/Controllers/Emergencypurchaseorder.php b/app/Controllers/Emergencypurchaseorder.php index 78b9e3e9..e4e5fdcb 100755 --- a/app/Controllers/Emergencypurchaseorder.php +++ b/app/Controllers/Emergencypurchaseorder.php @@ -208,7 +208,9 @@ class Emergencypurchaseorder extends BaseController $newPONO = generate_po_number($lastPONO); // PO Master $POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $ServiceWorkStatus, 'POType' => $POType, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => $DescriptionOfPo, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder); - $file = $this->request->getFile('POFile'); + $file = null; + if($POType == "SERVICE"){ $file = $this->request->getFile('ServiceFile');} + if($POType == "REVENUE"){ $file = $this->request->getFile('RevenueFile');} if($file !== null){ $requestfilename = $file->getName(); if (!empty($requestfilename)) { diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index 92c925fb..a680ad47 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -1442,6 +1442,8 @@ function updateIGRWeight(){ if ($value1 != $value && $key1 == $key) { $value = ($key1 == "IGRStatus") ? $this->inwardgateregister_model->get_status($value) : $value; $value1 = ($key1 == "IGRStatus") ? $this->inwardgateregister_model->get_status($value1) : $value1; + $value = ($key1 == "TransporterId") ? $this->inwardgateregister_model->get_TransporterId($value) : $value; + $value1 = ($key1 == "TransporterId") ? $this->inwardgateregister_model->get_TransporterId($value1) : $value1; // Store each changed field in an array $history_entries[] = [ 'field' => $key1, diff --git a/app/Models/Inwardgateregister_model.php b/app/Models/Inwardgateregister_model.php index 74ab8b73..57eba79c 100755 --- a/app/Models/Inwardgateregister_model.php +++ b/app/Models/Inwardgateregister_model.php @@ -1361,5 +1361,16 @@ $builder = $this->db->table('t_igr_history') return $StatusName; } + public function get_TransporterId($value){ + $builder = $this->db->table('t_transporter') + ->select('id,name') + ->where('id', $value); + + $query = $builder->get()->getRow(); + + $transportername = $query ? $query->name : null; + return $transportername; + } + } \ No newline at end of file diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index 90d8379b..01011b4b 100755 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -3049,7 +3049,7 @@ if (!empty($INRSYMBOL)) {
-
+
@@ -3155,7 +3155,7 @@ if (!empty($INRSYMBOL)) {
-
+
@@ -5208,6 +5208,7 @@ if (!empty($INRSYMBOL)) { + - - + - - + + + - - - - - - - - - - - +