From 08bfa3d1f41822c44dcf9e28ffe95a2a621e36b8 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 9 Sep 2017 11:31:39 +0530 Subject: [PATCH] po options --- .../controllers/amendmentpurchaseorder.php | 7 +++-- application/controllers/purchaseorder.php | 6 ++-- application/views/editImportAmendPO.php | 29 +++++++++++++------ application/views/editimportpo.php | 28 +++++++++++++----- 4 files changed, 48 insertions(+), 22 deletions(-) diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index a1c0dd9f..2c9b1520 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -1170,7 +1170,10 @@ function UpdateAmendServicePurchaseOrder() { $Insurancenumber=''; $insurestatus='0'; - } + } + + + $importoption=$this->input->post('Importoption'); // addmodeofshipment @@ -1203,7 +1206,7 @@ function UpdateAmendServicePurchaseOrder() //echo $RowCount; // PO Master // PO Master - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'POType'=>$POType,'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'Import_PlaceofOrgin'=>$Palaceoforigin,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'AmendedDetails'=>$MAD,'PaymentOtherDescription'=>$OtherPayment,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber); + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'POType'=>$POType,'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'Import_PlaceofOrgin'=>$Palaceoforigin,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'AmendedDetails'=>$MAD,'PaymentOtherDescription'=>$OtherPayment,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption); //print_r($POMaster); //die(); diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 6072c261..3d8cc8ea 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1371,7 +1371,7 @@ function addNewImportPurchaseOrder() // $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType); - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption); //print_r($POList); //die(); @@ -1579,7 +1579,7 @@ function addNewImportPurchaseOrder() $updateddt = $dt->format('Y-m-d H:i:s'); $PaymentTerms=$this->input->post('PaymentTerms'); - $OtherPayment=$this->input->post('Otherpayment'); + $OtherPayment=$this->input->post('Otherpayment'); $Palaceoforigin=$this->input->post('PlaceOforigin'); // $Payableat=$this->input->post('PayableAT'); @@ -1614,7 +1614,7 @@ function addNewImportPurchaseOrder() - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption); //echo $PONO; //echo $TotalOrder; //print_r($POList); diff --git a/application/views/editImportAmendPO.php b/application/views/editImportAmendPO.php index 8566ca29..a4e333cb 100755 --- a/application/views/editImportAmendPO.php +++ b/application/views/editImportAmendPO.php @@ -151,6 +151,7 @@ if(!empty($POMaster)) $Insurance=$Req->InsuranceStatus; $InsuranceNo=$Req->InsuranceNumber; + $Importoption=$Req->POSubType; } } @@ -704,19 +705,29 @@ if(!empty($RequistionDetails)) 'Select Import Option'); - + //$options1 = array("0"=>'Select Import Option'); if(!empty($PoTypeOptions)) - { - foreach ($PoTypeOptions as $payment): +{ + foreach ($PoTypeOptions as $payment): - $options1[$payment->ConfigValue] = $payment->ConfigValue; - //$options6[$pay->PaymentID] = $pay->PaymentTerms; + if($Importoption==$payment->ConfigValue) + { - endforeach; - } + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } - echo form_dropdown('Importoption', $options1,set_value('Importoption'),'id="Importoption"' ,'class="form-control"'); ?> + endforeach; + foreach ($PoTypeOptions as $payment): + + if($Importoption!=$payment->ConfigValue) + { + + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } + endforeach; +} + + echo form_dropdown('Importoption', $options2,set_value('Importoption'),'id="Importoption"' ,'class="form-control"'); ?> diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php index 93f7d453..54b1040d 100755 --- a/application/views/editimportpo.php +++ b/application/views/editimportpo.php @@ -161,6 +161,7 @@ if(!empty($POMaster)) $Insurance=$Req->InsuranceStatus; $InsuranceNo=$Req->InsuranceNumber; + $Importoption=$Req->POSubType; } } @@ -706,21 +707,32 @@ if(!empty($RequistionDetails)) 'Select Import Option'); + // $options2 = array("0"=>'Select Import Option'); if(!empty($PoTypeOptions)) - { - foreach ($PoTypeOptions as $payment): +{ + foreach ($PoTypeOptions as $payment): - $options1[$payment->ConfigValue] = $payment->ConfigValue; - //$options6[$pay->PaymentID] = $pay->PaymentTerms; + if($Importoption==$payment->ConfigValue) + { - endforeach; - } + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } - echo form_dropdown('Importoption', $options1,set_value('Importoption'),'id="Importoption"' ,'class="form-control"'); ?> + endforeach; + foreach ($PoTypeOptions as $payment): + + if($Importoption!=$payment->ConfigValue) + { + + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } + endforeach; +} + + echo form_dropdown('Importoption', $options2,set_value('Importoption'),'id="Importoption"' ,'class="form-control"'); ?>