edit import insurance
This commit is contained in:
parent
1f79e199b4
commit
13287df4c2
@ -1356,13 +1356,22 @@ function addNewImportPurchaseOrder()
|
||||
$importoption=$this->input->post('Importoption');
|
||||
// echo $importoption;
|
||||
// die();
|
||||
|
||||
|
||||
$Insurance=$this->input->post('Insurance');
|
||||
|
||||
if($Insurance==1)
|
||||
{
|
||||
|
||||
$Insurancenumber=$this->input->post('insurancenumber');
|
||||
}
|
||||
else
|
||||
{
|
||||
$Insurancenumber='';
|
||||
}
|
||||
|
||||
// $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);
|
||||
$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);
|
||||
|
||||
//print_r($POList);
|
||||
//die();
|
||||
@ -1580,13 +1589,32 @@ function addNewImportPurchaseOrder()
|
||||
$SupplierOffer=$this->input->post('editsupplierofferno');
|
||||
$otherRef=$this->input->post('editotherreference');
|
||||
$finCap=$this->input->post('editfincap');
|
||||
|
||||
|
||||
|
||||
$importoption=$this->input->post('Importoption');
|
||||
// echo $importoption;
|
||||
// die();
|
||||
$Insurance=$this->input->post('Insurance');
|
||||
|
||||
if($Insurance=='YES')
|
||||
{
|
||||
|
||||
$Insurancenumber=$this->input->post('insurancenumber');
|
||||
$insurestatus='1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$Insurancenumber='';
|
||||
$insurestatus='0';
|
||||
}
|
||||
// PO Master
|
||||
// PO Master
|
||||
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms);
|
||||
|
||||
|
||||
|
||||
$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);
|
||||
$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);
|
||||
//echo $PONO;
|
||||
//echo $TotalOrder;
|
||||
//print_r($POList);
|
||||
|
||||
@ -158,9 +158,28 @@ if(!empty($POMaster))
|
||||
$SupOfferno=$Req->Supplier_Offer_No;
|
||||
$Otherref=$Req->Other_Reference;
|
||||
$Fincap=$Req->Fincap;
|
||||
|
||||
$Insurance=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
}
|
||||
}
|
||||
//echo $ServiceDescription;
|
||||
|
||||
//echo $InsuranceNo;
|
||||
|
||||
$ins='';
|
||||
if($Insurance==1)
|
||||
{
|
||||
$ins='YES';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ins='NO';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$SavedSum=$Orderedsum*$ExchangeRate;
|
||||
//echo $SavedSum;
|
||||
$AvilableBudget=$SavedSum+$AvlAmount;
|
||||
@ -714,11 +733,24 @@ 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>
|
||||
|
||||
@ -3122,11 +3154,15 @@ var NilType = '<?php echo NILTYPE;?>';
|
||||
|
||||
$('#Insurance').change(function() {
|
||||
|
||||
var insure=$('#Insurance').val();
|
||||
//var insure=$('#Insurance').val();
|
||||
|
||||
var insure=$("#Insurance :selected").text();
|
||||
|
||||
|
||||
// var insure=$('#Insurance').Value();
|
||||
//console.log(insure);
|
||||
|
||||
if(insure=='1')
|
||||
if(insure=='YES')
|
||||
{
|
||||
$('#insurancenum').show();
|
||||
}
|
||||
@ -3139,6 +3175,21 @@ 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($PaymentTermsCode,JSON_PRETTY_PRINT)?>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user