amendment insurance

This commit is contained in:
venbatechnologies@gmail.com 2017-09-09 10:41:02 +05:30
parent 13287df4c2
commit 4e9ead4cff
2 changed files with 54 additions and 8 deletions

View File

@ -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();

View File

@ -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))
<?php
$options1 = array("0"=>'NO',"1"=>'YES');
echo form_dropdown('Insurance', $options1,set_value('Insurance'),'id="Insurance"' ,'class="form-control"'); ?>
<select id='Insurance' name='Insurance'>
<?php if($Insurance==1)
{
$opt1='YES';
$opt2='NO';
}
else
{
$opt1='NO';
$opt2='YES';
} ?>
<option value="NO"><?php echo $opt1;?></option>
<option value="YES"><?php echo $opt2;?></option>
</select>
</div>
@ -1970,11 +1985,16 @@ var NilType = '<?php echo 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=<?php echo json_encode($Insurance,JSON_PRETTY_PRINT)?>;
var insureno=<?php echo json_encode($InsuranceNo,JSON_PRETTY_PRINT)?>;
//console.log(insureoption);
if(insureoption==1)
{
$('#insurancenum').show();
$('#insurancenumber').val(insureno);
}
else
{
$('#insurancenum').hide();
}
var paymentoption=<?php echo json_encode($PaymentTerms,JSON_PRETTY_PRINT)?>;
var payvalue=<?php echo json_encode($Otherpay,JSON_PRETTY_PRINT)?>;