diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index 21879290..a1c0dd9f 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -1158,7 +1158,19 @@ function UpdateAmendServicePurchaseOrder() $OtherPayment=$this->input->post('Otherpayment'); + $Insurance=$this->input->post('Insurance'); + if($Insurance=='YES') + { + + $Insurancenumber=$this->input->post('insurancenumber'); + $insurestatus='1'; + } + else + { + $Insurancenumber=''; + $insurestatus='0'; + } // addmodeofshipment @@ -1191,7 +1203,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); + $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); //print_r($POMaster); //die(); diff --git a/application/views/editImportAmendPO.php b/application/views/editImportAmendPO.php index 29c69a8a..8566ca29 100755 --- a/application/views/editImportAmendPO.php +++ b/application/views/editImportAmendPO.php @@ -149,6 +149,9 @@ if(!empty($POMaster)) $Otherpay=$Req->PaymentOtherDescription; + $Insurance=$Req->InsuranceStatus; + $InsuranceNo=$Req->InsuranceNumber; + } } //$AvilableBudget=0; @@ -725,11 +728,23 @@ if(!empty($RequistionDetails)) - 'NO',"1"=>'YES'); - - echo form_dropdown('Insurance', $options1,set_value('Insurance'),'id="Insurance"' ,'class="form-control"'); ?> + @@ -1970,11 +1985,16 @@ var NilType = ''; $('#Insurance').change(function() { -var insure=$('#Insurance').val(); -if(insure=='1') + +//var insure=$('#Insurance').val(); +var insure=$("#Insurance :selected").text(); +//console.log(insure); + +if(insure=='YES') { $('#insurancenum').show(); } + else { $('#insurancenum').hide(); @@ -1983,8 +2003,22 @@ else }); +var insureoption=; +var insureno=; +//console.log(insureoption); +if(insureoption==1) +{ + $('#insurancenum').show(); + $('#insurancenumber').val(insureno); +} + +else +{ + $('#insurancenum').hide(); +} + var paymentoption=; var payvalue=;