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')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$BudgetType = $this->input->post('Budget');
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
//$PaymentTerms=$this->input->post('PaymentMethod'); //$PaymentTerms=$this->input->post('PaymentMethod');
@ -300,7 +302,7 @@ function addfile1()
// PO Master // 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); $POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$ServiceTypeOptions);
$PONO = ''; $PONO = '';
@ -484,6 +486,8 @@ $RequestedBy = $this->input->post('drpDepartment');
$RowCount=$this->input->post('txtRowCount1'); $RowCount=$this->input->post('txtRowCount1');
$BudgetType = $this->input->post('Budget');
//echo $RowCount; //echo $RowCount;
// $DeletedRow = $this->input->post('TextDeletedRowCount'); // $DeletedRow = $this->input->post('TextDeletedRowCount');
@ -528,7 +532,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$RegNo = $Req[0]['ReqNo']; $RegNo = $Req[0]['ReqNo'];
} }
// PO Master // 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); //print_r($POList);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype); $POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);

View File

@ -17,7 +17,7 @@ class purchaseorder_model extends CI_Model
$query = $this->db->get(); $query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result(); 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){ else if(input=='REVENUE' && $('#Deliverydate').val()=='' && radioValue==0){
@ -2897,6 +2905,21 @@ function populateValueMainFormForDeleteItem(rowid)
</div> </div>
</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>
</div><!--End new fields 1 sep--> </div><!--End new fields 1 sep-->
@ -5725,6 +5748,8 @@ function populateValueMainFormForDeleteItem(rowid)
<input type="hidden" name="txtDeletedRow1" id="txtDeletedRow1" /> <input type="hidden" name="txtDeletedRow1" id="txtDeletedRow1" />
<input type="hidden" name="CheckLocalInter" id="CheckLocalInter" /> <input type="hidden" name="CheckLocalInter" id="CheckLocalInter" />
<input type="hidden" name="Budget" id="Budget" />
<input type="hidden" name="txtSpecial" id="txtSpecial" /> <input type="hidden" name="txtSpecial" id="txtSpecial" />
@ -5867,6 +5892,25 @@ function populateValueMainFormForDeleteItem(rowid)
<script> <script>
var index = '1'; var index = '1';
var userid = ''; var userid = '';
$("#BudgetType").change(function(){
var aa = $("#BudgetType option:selected").text();
$('#Budget').val(aa);
});
$('.AddRevenue').click(function(){ $('.AddRevenue').click(function(){
tinyMCE.triggerSave(); tinyMCE.triggerSave();
@ -6789,15 +6833,15 @@ $('#PoTypeOptions').change(function()
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
alert('Your exceeding the Avaiable Budget :'+ budgetAmount +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ budgetAmount +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
/** /**
* This function is used when clicking add service button that time store the info for submit * 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)) { // else if(parseInt($('#AvalBuget').val()) < parseInt(TextTotalOrderValueSummaryService)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // 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'){ else if($('#Otherpayment').val()=='' && $('#PaymentMethod').val()=='PT08'){
alert('Please Enter Other Payable Terms Description'); alert('Please Enter Other Payable Terms Description');
$('#Otherpayment').focus(); $('#Otherpayment').focus();
@ -7586,11 +7630,11 @@ $('#SpcialInstruction').val(splinstr);
$('#Deliverydt').focus(); $('#Deliverydt').focus();
return false; return false;
} }
else if(parseInt($('#AvalBuget').val()) < parseInt(finalbasicamtrate)) { // else if(parseInt($('#AvalBuget').val()) < parseInt(finalbasicamtrate)) {
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // 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() == '' ) { else if($('#insuranceStatus').val() == 'YES' && $('#insuranceNo').val() == '' ) {
alert('Please Enter Insurance Number..!'); alert('Please Enter Insurance Number..!');