bugdet check removal in emergency po

This commit is contained in:
venbatechnologies@gmail.com 2018-01-31 12:06:03 +05:30
parent 4704039c45
commit c27589d3e2
3 changed files with 67 additions and 19 deletions

View File

@ -248,6 +248,8 @@ function addfile1()
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$BudgetType = $this->input->post('Budget');
$createddt = $dt->format('Y-m-d H:i:s');
//$PaymentTerms=$this->input->post('PaymentMethod');
@ -300,7 +302,7 @@ function addfile1()
// PO Master
$POList = array('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'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions);
$POList = array('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'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'BudgetType'=>$BudgetType);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$ServiceTypeOptions);
$PONO = '';
@ -484,6 +486,8 @@ $RequestedBy = $this->input->post('drpDepartment');
$RowCount=$this->input->post('txtRowCount1');
$BudgetType = $this->input->post('Budget');
//echo $RowCount;
// $DeletedRow = $this->input->post('TextDeletedRowCount');
@ -528,7 +532,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$RegNo = $Req[0]['ReqNo'];
}
// PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck);
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
//print_r($POList);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);

View File

@ -17,7 +17,7 @@ class purchaseorder_model extends CI_Model
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}

View File

@ -2224,6 +2224,14 @@ Editchange();
}
else if($('#BudgetType').val()=="0")
{
alert('Please Select Budget Type');
$('#BudgetType').focus();
return false;
}
else if(input=='REVENUE' && $('#Deliverydate').val()=='' && radioValue==0){
@ -2897,6 +2905,21 @@ function populateValueMainFormForDeleteItem(rowid)
</div>
</div>
<div class="col-md-2" style="padding-right: 0px;">
<label for="BudgetType">Budget Type</label>
<?php
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
?>
</div>
</div>
</div><!--End new fields 1 sep-->
@ -5725,6 +5748,8 @@ function populateValueMainFormForDeleteItem(rowid)
<input type="hidden" name="txtDeletedRow1" id="txtDeletedRow1" />
<input type="hidden" name="CheckLocalInter" id="CheckLocalInter" />
<input type="hidden" name="Budget" id="Budget" />
<input type="hidden" name="txtSpecial" id="txtSpecial" />
@ -5867,6 +5892,25 @@ function populateValueMainFormForDeleteItem(rowid)
<script>
var index = '1';
var userid = '';
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$('.AddRevenue').click(function(){
tinyMCE.triggerSave();
@ -6789,15 +6833,15 @@ $('#PoTypeOptions').change(function()
var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount )
{
alert('Your exceeding the Avaiable Budget :'+ budgetAmount +'.Please adjust the Product to proceed further.');
return false;
}
else
{
// if(ReqAmount > BudAmount )
// {
// alert('Your exceeding the Avaiable Budget :'+ budgetAmount +'.Please adjust the Product to proceed further.');
// return false;
// }
// else
// {
return true;
}
// }
}
/**
* This function is used when clicking add service button that time store the info for submit
@ -7466,11 +7510,11 @@ $('#content').loader('hide');
}
else if(parseInt($('#AvalBuget').val()) < parseInt(TextTotalOrderValueSummaryService)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// else if(parseInt($('#AvalBuget').val()) < parseInt(TextTotalOrderValueSummaryService)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false;
}
// return false;
// }
else if($('#Otherpayment').val()=='' && $('#PaymentMethod').val()=='PT08'){
alert('Please Enter Other Payable Terms Description');
$('#Otherpayment').focus();
@ -7586,11 +7630,11 @@ $('#SpcialInstruction').val(splinstr);
$('#Deliverydt').focus();
return false;
}
else if(parseInt($('#AvalBuget').val()) < parseInt(finalbasicamtrate)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// else if(parseInt($('#AvalBuget').val()) < parseInt(finalbasicamtrate)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false;
}
// return false;
// }
else if($('#insuranceStatus').val() == 'YES' && $('#insuranceNo').val() == '' ) {
alert('Please Enter Insurance Number..!');