budget type added in po screen
This commit is contained in:
parent
4c49fe4f2e
commit
06c58fa2ee
@ -1114,8 +1114,7 @@ class purchaseorder extends BaseController
|
||||
$Qualitycheck=1;
|
||||
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'
|
||||
IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
|
||||
@ -36,6 +36,7 @@ array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
|
||||
$InsuranceNo='';
|
||||
$ServiceTypeOptions='';
|
||||
$DescriptionOfPo = '';
|
||||
$BudgetType = '';
|
||||
|
||||
|
||||
if(!empty($INRSYMBOL))
|
||||
@ -88,6 +89,7 @@ if(!empty($POMaster))
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$ServiceTypeOptions=$Req->POSubType;
|
||||
$DescriptionOfPo = $Req->Description_Of_Service;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
}
|
||||
}
|
||||
@ -529,15 +531,15 @@ function ExceedQuantityCheck()
|
||||
var ReqAmount = parseFloat(ValuetoCheck);
|
||||
var BudAmount = parseFloat(budgetAmount);
|
||||
|
||||
if(ReqAmount > BudAmount )
|
||||
{
|
||||
swal('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(ReqAmount > BudAmount )
|
||||
// {
|
||||
// swal('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.');
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
}
|
||||
function calculateServiceTax(varBasicValue)
|
||||
{
|
||||
@ -1074,6 +1076,27 @@ $(document).ready(function () {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-right: 0px;">
|
||||
<label for="BudgetType">Budget Type</label>
|
||||
<select id='BudgetType' name='BudgetType'>
|
||||
<?php if($BudgetType== 'CAPITAL')
|
||||
{
|
||||
$opt1='CAPITAL';
|
||||
$opt2='REVENUE';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$opt1='REVENUE';
|
||||
$opt2='CAPITAL';
|
||||
} ?>
|
||||
|
||||
|
||||
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
|
||||
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!--End new fields 1 sep-->
|
||||
@ -1473,11 +1496,10 @@ $(document).ready(function () {
|
||||
$data = array('name' => 'EditOtheritemDescription','value' => set_value('EditOtheritemDescription'),'id'=>'EditOtheritemDescription', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
<label>UOM</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -2239,6 +2261,8 @@ $(document).ready(function () {
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>">
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
@ -2301,6 +2325,14 @@ var userid = '';
|
||||
};
|
||||
|
||||
|
||||
$("#BudgetType").change(function(){
|
||||
|
||||
var aa = $("#BudgetType option:selected").text();
|
||||
|
||||
$('#Budget').val(aa);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#EditotherDescription').hide();
|
||||
$('#otherdescription').hide();
|
||||
@ -2933,11 +2965,11 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||
// swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
return false;
|
||||
}
|
||||
// return false;
|
||||
// }
|
||||
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
|
||||
swal('Please Enter Other Payment Details');
|
||||
$('#Otherpayment').focus();
|
||||
|
||||
178
application/views/alterpurchaseorder.php
Executable file → Normal file
178
application/views/alterpurchaseorder.php
Executable file → Normal file
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
//r
|
||||
$insuranceStatus = array(
|
||||
array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
|
||||
);
|
||||
@ -1728,13 +1727,38 @@ function calculatePackaging(isEdit)
|
||||
|
||||
}
|
||||
}
|
||||
function rfilealert()
|
||||
{
|
||||
var file = $('#imag').val();
|
||||
|
||||
if (file=='')
|
||||
{
|
||||
swal('File not found');
|
||||
SpecialPOcheck();
|
||||
}
|
||||
else{
|
||||
SpecialPOcheck();
|
||||
}
|
||||
}
|
||||
|
||||
function sfilealert()
|
||||
{
|
||||
|
||||
var file1 = $('#images1').val();
|
||||
if (file1=='')
|
||||
{
|
||||
swal('File not found');
|
||||
SpecialPOcheck();
|
||||
}
|
||||
else{
|
||||
SpecialPOcheck();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function SpecialPOcheck()
|
||||
{
|
||||
|
||||
|
||||
|
||||
// swal('splpo')
|
||||
//$('#content').loader('show');
|
||||
POcheck=$("input:radio[name='Quality']:checked").val();
|
||||
@ -2225,6 +2249,14 @@ Editchange();
|
||||
|
||||
}
|
||||
|
||||
else if($('#BudgetType').val()=="0")
|
||||
{
|
||||
swal('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
else if(input=='REVENUE' && $('#Deliverydate').val()=='' && radioValue==0){
|
||||
@ -2803,7 +2835,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<div class="col-md-6" style="padding: 0px;">
|
||||
|
||||
|
||||
<label id="typeOptions">Service Type Options<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5;">*</span></label>
|
||||
<label id="typeOptions">Service Type Options</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
@ -2898,6 +2930,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-->
|
||||
|
||||
@ -3063,21 +3110,15 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5">
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG" id="images" name="images"/>
|
||||
<label for="images">Select Company file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG" id="imag" name="images" onChange="filecheck();"/>
|
||||
<label for="images">Select file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!--<div class="col-md-12 text-right" style="padding-bottom:1%;">
|
||||
<div class="col-md-4" style="margin-left: 64%;">
|
||||
<a class="btn btn-primary Add" onclick="addtable();"><span class="bold">Add LineItem</span></a>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
<!-- <div class="col-md-12 text-right">
|
||||
// <a class="btn btn-primary font Add" id="addtable"><span class="bold">Add table</span></a>
|
||||
// </div>-->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<table id="specialtable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||
@ -3107,7 +3148,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<a class="btn btn-primary Add" onclick="addtable();"><span class="bold">Add table</span></a>
|
||||
</div> -->
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<a class="btn btn-primary ok" ID="ExciseOption12" onclick="SpecialPOcheck();" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-primary ok" ID="ExciseOption12" onclick="rfilealert();" > <span class="bold">Submit</span></a>
|
||||
|
||||
<a class="btn btn-primary" data-dismiss="modal" onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
@ -3134,7 +3175,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<input type = "file" size = "20" input accept=".docx,.pdx,.doc.JPG,.PNG" id="images1" name="images1"/>
|
||||
<input type = "file" size = "20" input accept=".docx,.pdx,.doc.JPG,.PNG" id="images1" name="images1" onChange="sfilecheck();"/>
|
||||
<label for="images">Select Company file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
|
||||
@ -3150,7 +3191,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<div class="col-md-12 text-right">
|
||||
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<a class="btn btn-primary ok" ID="ExciseOption12" onclick="SpecialPOcheck();" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-primary ok" ID="ExciseOption12" onclick="sfilealert();" > <span class="bold">Submit</span></a>
|
||||
|
||||
<a class="btn btn-primary" data-dismiss="modal" onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
@ -3297,7 +3338,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1000px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #3c;color:#fff;">
|
||||
|
||||
<center><h4>Edit Service Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -3620,7 +3661,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1150px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #3c;color:#fff;">
|
||||
<center><h4>Edit Revenue Purchase Order Line Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
@ -4329,7 +4370,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1000px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<center><h4>Add Service Purchase Order Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
@ -4631,7 +4672,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
|
||||
<center><h4>Add Import Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -5132,7 +5173,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
|
||||
<center><h4>Add Capital Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -5726,6 +5767,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" />
|
||||
|
||||
@ -5868,6 +5911,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();
|
||||
@ -6096,7 +6158,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
swal(data);
|
||||
//$('#txtRowCount').val('');
|
||||
//$('#txtDeletedRow').val('');
|
||||
|
||||
@ -6105,7 +6167,7 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -6406,7 +6468,7 @@ $('#PoTypeOptions').change(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -6460,7 +6522,7 @@ $('#PoTypeOptions').change(function()
|
||||
else
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert("Error");
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -6510,7 +6572,7 @@ $('#PoTypeOptions').change(function()
|
||||
else
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert("Error");
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -6656,7 +6718,7 @@ $('#PoTypeOptions').change(function()
|
||||
else
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert("Error");
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -6790,15 +6852,15 @@ $('#PoTypeOptions').change(function()
|
||||
var ReqAmount = parseFloat(ValuetoCheck);
|
||||
var BudAmount = parseFloat(budgetAmount);
|
||||
|
||||
if(ReqAmount > BudAmount )
|
||||
{
|
||||
swal('Your exceeding the Avaiable Budget :'+ budgetAmount +'.Please adjust the Product to proceed further.');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(ReqAmount > BudAmount )
|
||||
// {
|
||||
// swal('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
|
||||
@ -7467,11 +7529,11 @@ $('#content').loader('hide');
|
||||
}
|
||||
|
||||
|
||||
else if(parseInt($('#AvalBuget').val()) < parseInt(TextTotalOrderValueSummaryService)) {
|
||||
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// else if(parseInt($('#AvalBuget').val()) < parseInt(TextTotalOrderValueSummaryService)) {
|
||||
// swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
return false;
|
||||
}
|
||||
// return false;
|
||||
// }
|
||||
else if($('#Otherpayment').val()=='' && $('#PaymentMethod').val()=='PT08'){
|
||||
swal('Please Enter Other Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
@ -7563,8 +7625,8 @@ $('#content').loader('hide');
|
||||
|
||||
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
@ -7587,11 +7649,11 @@ $('#SpcialInstruction').val(splinstr);
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
else if(parseInt($('#AvalBuget').val()) < parseInt(finalbasicamtrate)) {
|
||||
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// else if(parseInt($('#AvalBuget').val()) < parseInt(finalbasicamtrate)) {
|
||||
// swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
return false;
|
||||
}
|
||||
// return false;
|
||||
// }
|
||||
else if($('#insuranceStatus').val() == 'YES' && $('#insuranceNo').val() == '' ) {
|
||||
swal('Please Enter Insurance Number..!');
|
||||
|
||||
@ -8624,6 +8686,30 @@ var specialservicerow=0;
|
||||
|
||||
|
||||
}//add click function closed
|
||||
function filecheck()
|
||||
{
|
||||
|
||||
//$('#content').loader('show');
|
||||
var file = $('#imag').val();
|
||||
swal(file);
|
||||
if(file!='')
|
||||
{
|
||||
|
||||
swal('Your file added successfully');
|
||||
}
|
||||
|
||||
}
|
||||
function sfilecheck()
|
||||
{
|
||||
//$('#content').loader('show');
|
||||
var file1 = $('#images1').val();
|
||||
if(file1!='')
|
||||
{
|
||||
|
||||
swal('Your file added successfully');
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
$insuranceStatus = array(
|
||||
array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
|
||||
);
|
||||
$insuranceStatus = array(
|
||||
array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
|
||||
);
|
||||
$requestedBy=$RequistionDetails[0]->FirstName;
|
||||
$Updateddt = new DateTime($RequistionDetails[0]->ReqDate);
|
||||
$UpdatedOn=$Updateddt->format('d-m-Y');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$res_arr_values = array();
|
||||
$DeliverOption='';
|
||||
$UpdatedOn=$Updateddt->format('d-m-Y');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$res_arr_values = array();
|
||||
$DeliverOption='';
|
||||
$SupId = '';
|
||||
$SupName = '';
|
||||
$Address = '';
|
||||
@ -23,13 +23,12 @@
|
||||
$TotalSgst = 0.0;
|
||||
$TotalIgst = 0.0;
|
||||
$OtherAmt = 0.0;
|
||||
$TotalFreightvalue=0.0;
|
||||
$TotalFreightvalue=0.0;
|
||||
|
||||
|
||||
|
||||
$totassesable=0;
|
||||
$totSubtotal=0;
|
||||
$totigst=0;
|
||||
$totassesable=0;
|
||||
$totSubtotal=0;
|
||||
$totigst=0;
|
||||
|
||||
$TotalSummary = 0.0;
|
||||
$TotalBasicAmount = 0.0;
|
||||
@ -70,9 +69,9 @@
|
||||
$PaymentDays='';
|
||||
$PayableAT='';
|
||||
$ExchangeDate='';
|
||||
$ExchangeRateOn='';
|
||||
$ExchangeRateOn='';
|
||||
|
||||
$CapitalRange='';
|
||||
$CapitalRange='';
|
||||
$PoStatusName='';
|
||||
$otherPayment='';
|
||||
$INR='';
|
||||
@ -82,7 +81,7 @@
|
||||
|
||||
$ExitExchangeRate='';
|
||||
|
||||
$ModeOfShipment='';
|
||||
$ModeOfShipment='';
|
||||
$SupplierReference='';
|
||||
$SuppliersOfferNo='';
|
||||
$OtherReferences='';
|
||||
@ -90,6 +89,8 @@
|
||||
$InsuranceOptions='';
|
||||
$InsuranceNo='';
|
||||
$ServiceTypeOptions='';
|
||||
$BudgetType = '';
|
||||
|
||||
if(!empty($INRSYMBOL))
|
||||
{
|
||||
foreach ($INRSYMBOL as $INR)
|
||||
@ -119,7 +120,7 @@ if(!empty($POMaster))
|
||||
|
||||
$SupId = $Req->SupplierID;
|
||||
|
||||
$SupName = $Req->SupplierName;
|
||||
$SupName = $Req->SupplierName;
|
||||
$Address = $Req->Address;
|
||||
$pdt = new DateTime($Req->PODate);
|
||||
$PODate = $pdt->format('d-m-Y');
|
||||
@ -165,6 +166,7 @@ if(!empty($POMaster))
|
||||
$InsuranceOptions=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$ServiceTypeOptions=$Req->POSubType;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
}
|
||||
|
||||
@ -377,6 +379,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
if($("#EditCgst").val() != '' ){$("#EditIgst").prop("readonly", true);}
|
||||
$("#PaymentMethod").select2();
|
||||
//Initialize Select2 Elements
|
||||
$("#drpSupplier").select2();
|
||||
@ -884,6 +887,29 @@ $("#PaymentMethod").select2();
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-right: 0px;">
|
||||
<label for="BudgetType">Budget Type</label>
|
||||
<select id='BudgetType' name='BudgetType'>
|
||||
<?php if($BudgetType== 'CAPITAL')
|
||||
{
|
||||
$opt1='CAPITAL';
|
||||
$opt2='REVENUE';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$opt1='REVENUE';
|
||||
$opt2='CAPITAL';
|
||||
} ?>
|
||||
|
||||
|
||||
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
|
||||
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div><!--End new fields 1 sep-->
|
||||
|
||||
</div>
|
||||
@ -1323,7 +1349,7 @@ $("#PaymentMethod").select2();
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1160px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Add Capital Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -1639,9 +1665,9 @@ $("#PaymentMethod").select2();
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$data = array('name' => 'Igst','value' => set_value('Igst',0),'id'=>'Igst', 'class' => 'form-control num' ,'placeholder' => 'IGST TAX PERCENTAGE','onchange'=>'Ratechange()','onkeypress'=>'return isNumberKey(event);');
|
||||
echo form_input($data);
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -2068,7 +2094,7 @@ $("#PaymentMethod").select2();
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1160px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Edit Capital Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -2810,7 +2836,7 @@ $("#PaymentMethod").select2();
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1160px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>View Capital Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -3143,8 +3169,7 @@ $("#PaymentMethod").select2();
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" id="" style="padding: 0px;">
|
||||
<div class="col-md-12" id="" style="padding: 0px;">
|
||||
<div class="col-md-5 col-md-offset-4" align="right">
|
||||
<label>Total Amount <?php echo "($INR)"?></label>
|
||||
</div>
|
||||
@ -3157,6 +3182,7 @@ $("#PaymentMethod").select2();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12" style="padding:1%;" ></div>
|
||||
<div class="col-md-12" style="border:1px solid #000;padding:0px;" id="ViewModalImportTaxHide" style="display:none;">
|
||||
<br/>
|
||||
@ -3756,6 +3782,8 @@ $("#PaymentMethod").select2();
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
|
||||
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED )
|
||||
{
|
||||
@ -3867,6 +3895,17 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#BudgetType").change(function(){
|
||||
|
||||
var aa = $("#BudgetType option:selected").text();
|
||||
|
||||
$('#Budget').val(aa);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
$("#PODate").datepicker({
|
||||
@ -3965,7 +4004,7 @@ var PaymentOtherData = '<?php echo $otherPayment; ?>';
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the SupplierID');
|
||||
alert('Please select the SupplierID');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -4051,7 +4090,7 @@ var PaymentOtherData = '<?php echo $otherPayment; ?>';
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
return false;
|
||||
}
|
||||
id = '';
|
||||
@ -4094,7 +4133,7 @@ var PaymentOtherData = '<?php echo $otherPayment; ?>';
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the MaterialCode');
|
||||
alert('Please select the MaterialCode');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -4136,7 +4175,7 @@ var PaymentOtherData = '<?php echo $otherPayment; ?>';
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the MaterialCode');
|
||||
alert('Please select the MaterialCode');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -4186,10 +4225,12 @@ var PaymentOtherData = '<?php echo $otherPayment; ?>';
|
||||
}
|
||||
function ChangeSgst(){
|
||||
$('#Sgst').val($('#Cgst').val());
|
||||
$("#Igst").prop("readonly", true);
|
||||
Ratechange();
|
||||
}
|
||||
function ChangeEditSgst(){
|
||||
$('#EditSgst').val($('#EditCgst').val());
|
||||
$("#EditIgst").prop("readonly", true);
|
||||
EditRatechange();
|
||||
}
|
||||
/*
|
||||
@ -4202,19 +4243,19 @@ EditRatechange();
|
||||
|
||||
if($('#Reqnumber').val() == "0")
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
$('#Reqnumber').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#MaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please select the Material Code');
|
||||
alert('Please select the Material Code');
|
||||
$('#MaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CostCenter').val() == "0")
|
||||
{
|
||||
swal('Please select the CostCenterCode');
|
||||
alert('Please select the CostCenterCode');
|
||||
$('#CostCenter').focus();
|
||||
return false;
|
||||
}
|
||||
@ -4267,8 +4308,8 @@ EditRatechange();
|
||||
|
||||
|
||||
$('#AfterCgst').val(calculateCgstTax(CPtotal,$("#Cgst").val()== '' ? "0.00" : $('#Cgst').val()));
|
||||
$('#AfterSgst').val(calculateSgstTax(CPtotal,$("#Sgst").val()== '' ? "0.00" : $('#Sgst').val()));
|
||||
$('#AfterIgst').val(calculateIgstTax(CPtotal,$("#Igst").val()== '' ? "0.00" : $('#Igst').val()));
|
||||
$('#AfterSgst').val(calculateSgstTax(CPtotal,$("#Sgst").val()== '' ? "0.00" : $('#Sgst').val()));
|
||||
$('#AfterIgst').val(calculateIgstTax(CPtotal,$("#Igst").val()== '' ? "0.00" : $('#Igst').val()));
|
||||
|
||||
|
||||
Calculateloadingcharge();
|
||||
@ -4399,7 +4440,7 @@ Calculateloadingcharge();
|
||||
//alert(ReqQuantity);
|
||||
if(EnterQuantity > ReqQuantity)
|
||||
{
|
||||
swal('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
|
||||
$('#CPQuantity').focus();
|
||||
return false;
|
||||
@ -4747,16 +4788,16 @@ if(isNaN(CustomDutyExpenses))
|
||||
var ReqAmount = parseFloat(ValuetoCheck);
|
||||
var BudAmount = parseFloat(budgetAmount);
|
||||
|
||||
if(ReqAmount > BudAmount )
|
||||
{
|
||||
swal('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.');
|
||||
// if(ReqAmount > BudAmount )
|
||||
// {
|
||||
// alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.');
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -4994,59 +5035,59 @@ if(isNaN(CustomDutyExpenses))
|
||||
else{
|
||||
basicAmountRate=parseFloat(basicAmountRate) - parseFloat(discountRate);
|
||||
}
|
||||
if(basicAmountRate > avalbudAmt)
|
||||
{
|
||||
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('#CPRate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(basicAmountRate > avalbudAmt)
|
||||
// {
|
||||
// alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#CPRate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
function validateCapitalTax()
|
||||
{
|
||||
if($('#Reqnumber').val() == "0")
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
$('#Reqnumber').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CostCenter').val() == "0")
|
||||
{
|
||||
swal('Please select the Cost center');
|
||||
alert('Please select the Cost center');
|
||||
$('#CostCenter').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#MaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please select the Material Code');
|
||||
alert('Please select the Material Code');
|
||||
$('#MaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CPQuantity').val() == '')
|
||||
{
|
||||
swal('Please Enter the Quantity value');
|
||||
alert('Please Enter the Quantity value');
|
||||
$('#CPQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CPQuantity').val() == "0")
|
||||
{
|
||||
swal('Please Enter the Valid Quantity value');
|
||||
alert('Please Enter the Valid Quantity value');
|
||||
$('#CPQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CPRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate of the Item');
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#CPRate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CPRate').val() == "0")
|
||||
{
|
||||
swal('Please Enter the Valid Rate of the Item');
|
||||
alert('Please Enter the Valid Rate of the Item');
|
||||
$('#CPRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -5472,11 +5513,11 @@ function DeleteRow(rowid)
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
swal(data);
|
||||
alert(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
swal("Error");
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}});
|
||||
@ -5743,6 +5784,7 @@ function DeleteRow(rowid)
|
||||
$('#EditCgst').val($('#Cgst'+userid).val());
|
||||
$('#EditSgst').val($('#Sgst'+userid).val());
|
||||
$('#EditIgst').val($('#Igst'+userid).val());
|
||||
if($('#Cgst'+userid).val() != '0.00'){$("#EditIgst").prop("readonly", true);}
|
||||
$('#EditAfterCgst').val($('#AfterCgst'+userid).val());
|
||||
$('#EditAfterSgst').val($('#AfterSgst'+userid).val());
|
||||
$('#EditAfterIgst').val($('#AfterIgst'+userid).val());
|
||||
@ -5898,7 +5940,8 @@ function DeleteRow(rowid)
|
||||
$('#ViewAfterSgst').val($('#AfterSgst'+userid).val());
|
||||
$('#ViewAfterIgst').val($('#AfterIgst'+userid).val());
|
||||
$('#ViewOtherAllowances').val($('#OtherAmt'+userid).val());
|
||||
$('#ViewTotalAmountlocal').val(cellval[9].innerHTML);
|
||||
$('#ViewTotalAmountlocal').val(cellval[9].innerHTML);
|
||||
|
||||
|
||||
$('#drpFreightviewloc').val($("#Ftype"+userid).val());
|
||||
$('#NOOfTripslocview').val($("#NoTrip"+userid).val());
|
||||
@ -6032,7 +6075,7 @@ function DeleteRow(rowid)
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the MaterialCode');
|
||||
alert('Please select the MaterialCode');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -6122,20 +6165,20 @@ var basicAmountRate = parseFloat($('#CapitalToatlOrder').val());
|
||||
{
|
||||
if(document.getElementById('serviceTax').rows.length < 2)
|
||||
{
|
||||
swal('Please Select Line item to Create PO');
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Otherpayment').val()=='' && $('#PaymentMethod').val()=='PT08'){
|
||||
swal('Please Enter Other Payable Terms Description');
|
||||
alert('Please Enter Other Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
}
|
||||
else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) {
|
||||
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
return false;
|
||||
}
|
||||
// return false;
|
||||
// }
|
||||
else
|
||||
{
|
||||
|
||||
@ -6153,7 +6196,7 @@ var basicAmountRate = parseFloat($('#CapitalToatlOrder').val());
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
swal(data);
|
||||
alert(data);
|
||||
$('#content').loader('hide');
|
||||
|
||||
$('#txtRowCount').val('');
|
||||
@ -6168,7 +6211,7 @@ var basicAmountRate = parseFloat($('#CapitalToatlOrder').val());
|
||||
else
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
swal("Error");
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -6216,19 +6259,19 @@ function clearAfterAddLineItemAdd(){
|
||||
|
||||
if($('#EditReqnumber').val() == "0")
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
$('#EditReqnumber').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditMaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please select the Material Code');
|
||||
alert('Please select the Material Code');
|
||||
$('#EditMaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditCostCenter').val() == "0")
|
||||
{
|
||||
swal('Please select the CostCenterCode');
|
||||
alert('Please select the CostCenterCode');
|
||||
$('#EditCostCenter').focus();
|
||||
return false;
|
||||
}
|
||||
@ -6454,7 +6497,7 @@ var Freight=parseFloat($('#txtAfterFreightlocview').val() == '' ? '0.00' : $('#t
|
||||
//alert(ReqQuantity);
|
||||
if(EnterQuantity > ReqQuantity)
|
||||
{
|
||||
swal('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
|
||||
$('#EditCPQuantity').focus();
|
||||
return false;
|
||||
@ -6744,43 +6787,43 @@ function validateEditCapitalTax()
|
||||
|
||||
if($('#EditReqnumber').val() == "0")
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
$('#EditReqnumber').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditCostCenter').val() == "0")
|
||||
{
|
||||
swal('Please select the Cost center');
|
||||
alert('Please select the Cost center');
|
||||
$('#EditCostCenter').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditMaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please select the Material Code');
|
||||
alert('Please select the Material Code');
|
||||
$('#EditMaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditCPQuantity').val() == '')
|
||||
{
|
||||
swal('Please Enter the Quantity value');
|
||||
alert('Please Enter the Quantity value');
|
||||
$('#EditCPQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditCPQuantity').val() == "0")
|
||||
{
|
||||
swal('Please Enter the Valid Quantity value');
|
||||
alert('Please Enter the Valid Quantity value');
|
||||
$('#EditCPQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditCPRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate of the Item');
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#EditCPRate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditCPRate').val() == "0")
|
||||
{
|
||||
swal('Please Enter the Valid Rate of the Item');
|
||||
alert('Please Enter the Valid Rate of the Item');
|
||||
$('#EditCPRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -6883,16 +6926,16 @@ var Freight=parseFloat($('#txtAfterFreightlocedit').val() == '' ? '0.00' : $('#t
|
||||
else{
|
||||
basicAmountRate=parseFloat(basicAmountRate)- parseFloat(discountRate);
|
||||
}
|
||||
if(basicAmountRate > avalbudAmt)
|
||||
{
|
||||
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('#EditCPRate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(basicAmountRate > avalbudAmt)
|
||||
// {
|
||||
// alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#EditCPRate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@ -7305,7 +7348,7 @@ $('#drpFreight').change(function() {
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#drpFreight').val("0");
|
||||
$('#CPRate').focus();
|
||||
}
|
||||
@ -7346,7 +7389,7 @@ $('#drpEditFreight').change(function() {
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#drpEditFreight').val("0");
|
||||
$('#EditCPRate').focus();
|
||||
}
|
||||
@ -7387,7 +7430,7 @@ $('#drpViewFreight').change(function() {
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#drpViewFreight').val("0");
|
||||
$('#ViewCPRate').focus();
|
||||
}
|
||||
@ -7402,7 +7445,7 @@ function calculateFreight(isEdit)
|
||||
|
||||
if($('#AfterBasicPriceTax').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#CPRate').focus();
|
||||
$('#txtFreight').val('') ;
|
||||
return false;
|
||||
@ -7414,7 +7457,7 @@ function calculateFreight(isEdit)
|
||||
var FreightType =$("#drpFreight").val();
|
||||
if(FreightType == "0")
|
||||
{
|
||||
swal('Please select Freight Type');
|
||||
alert('Please select Freight Type');
|
||||
$('#txtFreight').val('');
|
||||
$("#drpFreight").focus();
|
||||
}
|
||||
@ -7447,7 +7490,7 @@ function calculateFreight(isEdit)
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
if($('#NOOfTrips').val()==''){
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#NOOfTrips").focus();
|
||||
$('#txtFreight').val(0)
|
||||
@ -7482,7 +7525,7 @@ function calculateFreight(isEdit)
|
||||
|
||||
if($('#ViewAfterBasicPriceTax').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#ViewCPRate').focus();
|
||||
$('#txtViewFreight').val('') ;
|
||||
return false;
|
||||
@ -7494,7 +7537,7 @@ function calculateFreight(isEdit)
|
||||
var FreightType =$("#drpViewFreight").val();
|
||||
if(FreightType == "0")
|
||||
{
|
||||
swal('Please select Freight Type');
|
||||
alert('Please select Freight Type');
|
||||
$('#txtViewFreight').val('');
|
||||
$("#drpViewFreight").focus();
|
||||
}
|
||||
@ -7524,7 +7567,7 @@ function calculateFreight(isEdit)
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
if($('#ViewNOOfTrips').val()==''){
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#ViewNOOfTrips").focus();
|
||||
$('#txtViewFreight').val(0)
|
||||
@ -7593,7 +7636,7 @@ function calculateFreight(isEdit)
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
if($('#NOOfTrips').val()==''){
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#NOOfTrips").focus();
|
||||
$('#txtFreight').val(0)
|
||||
@ -7658,7 +7701,7 @@ function calculateFreight(isEdit)
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
if($('#EditNOOfTrips').val()==''){
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#EditNOOfTrips").focus();
|
||||
$('#txtEditFreight').val(0)
|
||||
@ -7691,7 +7734,7 @@ function calculateFreight(isEdit)
|
||||
{
|
||||
if($('#EditAfterBasicPriceTax').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditCPRate').focus();
|
||||
$('#txtEditFreight').val('') ;
|
||||
return false;
|
||||
@ -7703,7 +7746,7 @@ function calculateFreight(isEdit)
|
||||
var FreightType =$("#drpEditFreight").val();
|
||||
if(FreightType == "0")
|
||||
{
|
||||
swal('Please select Freight Type');
|
||||
alert('Please select Freight Type');
|
||||
$('#txtEditFreight').val('');
|
||||
$("#drpEditFreight").focus();
|
||||
}
|
||||
@ -7733,7 +7776,7 @@ function calculateFreight(isEdit)
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
if($('#EditNOOfTrips').val()==''){
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#EditNOOfTrips").focus();
|
||||
$('#txtEditFreight').val(0)
|
||||
@ -7790,7 +7833,7 @@ function calculateFreight(isEdit)
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Rate Field Value');
|
||||
alert('Please Rate Field Value');
|
||||
|
||||
$('#CPRate').focus();
|
||||
}
|
||||
@ -7820,7 +7863,7 @@ $('#EditDiscountType').change(function() {
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Select MaterialCode and Rate Field Value');
|
||||
alert('Please Select MaterialCode and Rate Field Value');
|
||||
$('#EditDiscountType').val("0");
|
||||
$('#EditCPRate').focus();
|
||||
}
|
||||
@ -7837,7 +7880,7 @@ function calculateDiscount(isEdit)
|
||||
|
||||
if($('#CPRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#CPRate').focus();
|
||||
$('#txtDiscount').val('');
|
||||
return false;
|
||||
@ -7850,7 +7893,7 @@ function calculateDiscount(isEdit)
|
||||
|
||||
if(DiscountType == "0")
|
||||
{
|
||||
swal('Please Select the discount Type');
|
||||
alert('Please Select the discount Type');
|
||||
$('#txtDiscount').val('');
|
||||
$("#DiscountType").focus();
|
||||
}
|
||||
@ -7896,7 +7939,7 @@ function calculateDiscount(isEdit)
|
||||
|
||||
if(DiscountType == "0")
|
||||
{
|
||||
swal('Please Select the discount Type');
|
||||
alert('Please Select the discount Type');
|
||||
$('#txtEditDiscount').val('');
|
||||
$("#EditDiscountType").focus();
|
||||
}
|
||||
@ -8021,7 +8064,7 @@ $('#drpFreightloc').change(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Select MaterialCode and Rate Field Value');
|
||||
alert('Please Select MaterialCode and Rate Field Value');
|
||||
$('#drpFreightloc').val("0");
|
||||
$('#Rate').focus();
|
||||
}
|
||||
@ -8192,7 +8235,7 @@ $('#drpFreighteditloc').change(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Select MaterialCode and Rate Field Value');
|
||||
alert('Please Select MaterialCode and Rate Field Value');
|
||||
$('#drpFreighteditloc').val("0");
|
||||
$('#Rate').focus();
|
||||
}
|
||||
|
||||
@ -73,6 +73,7 @@ foreach ($PaymentTerms as $TER)
|
||||
$ServiceDescription = '';
|
||||
$CapitalRange = '';
|
||||
$otherPayment='';
|
||||
$BudgetType = '';
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
//print_r($POMaster);
|
||||
@ -106,6 +107,7 @@ if(!empty($POMaster))
|
||||
$revenuesubtype = $Req->POSubType;
|
||||
$insurencestatus = $Req->InsuranceStatus;
|
||||
$insurenceno = $Req->InsuranceNumber;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
// echo $insurenceno;
|
||||
// echo $otherPayment;
|
||||
}
|
||||
@ -204,6 +206,7 @@ if(!empty($RequistionDetails))
|
||||
var SchName = <?php echo json_encode($DeliverSchedule); ?>;
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
var insurancestatus = '<?php echo $insurencestatus;?>';
|
||||
var budgettype='<?php echo $BudgetType;?>';
|
||||
var insuranceno = '<?php echo $insurenceno;?>';
|
||||
var statuscheck='<?php echo $PONOStatus;?>';
|
||||
|
||||
@ -1928,10 +1931,16 @@ function calculatePackaging(isEdit)
|
||||
|
||||
$('#IGSTAddModel').attr("style","display:none;");
|
||||
$('#SGSTAddModel').removeAttr("style");
|
||||
$('#RevenueIgst').val(0);
|
||||
$('#RevenueAfterIgst').val(0);
|
||||
$('#txttaxcheck').val(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$('#EditSgst').val(0);
|
||||
$('#EditAfterSgst').val(0);
|
||||
$('#EditCgst').val(0);
|
||||
$('#EditAfterCgst').val(0);
|
||||
$('#CST').removeAttr("style");
|
||||
$('#TotICST').removeAttr("style");
|
||||
$('#Vat').attr("style","display:none;");
|
||||
@ -1942,6 +1951,11 @@ function calculatePackaging(isEdit)
|
||||
$('#SGSTViewModel').attr("style","display:none;");
|
||||
$('#IGSTAddModel').removeAttr("style");
|
||||
$('#SGSTAddModel').attr("style","display:none;");
|
||||
$('#RevenueCgst').val(0);
|
||||
$('#RevenueAfterCgst').val(0);
|
||||
$('#RevenueSgst').val(0);
|
||||
$('#RevenueAfterIgst').val(0);
|
||||
$('#txttaxcheck').val(1);
|
||||
}
|
||||
}
|
||||
$(document).ready(function () {
|
||||
@ -2084,16 +2098,16 @@ function validateEditExceedLimit()
|
||||
var basicAmountRate = parseFloat($('#txtEditBasicValue').val());
|
||||
var totalAmount = parseFloat($('#txtEditTotalOrderValue').val());
|
||||
|
||||
if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt)
|
||||
{
|
||||
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt)
|
||||
// {
|
||||
// swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#EditRate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
function calculateEditTotalValue()
|
||||
@ -2518,6 +2532,29 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="padding-right: 0px;">
|
||||
<label for="BudgetType">Budget Type</label>
|
||||
<select id='BudgetType' name='BudgetType'>
|
||||
<?php if($BudgetType== 'CAPITAL')
|
||||
{
|
||||
$opt1='CAPITAL';
|
||||
$opt2='REVENUE';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$opt1='REVENUE';
|
||||
$opt2='CAPITAL';
|
||||
} ?>
|
||||
|
||||
|
||||
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
|
||||
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -4123,6 +4160,10 @@ function calculateEditTaxValue()
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>">
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||
<input type="hidden" name="txttaxcheck" id="txttaxcheck" value=""/>
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
@ -4178,6 +4219,17 @@ function calculateEditTaxValue()
|
||||
<script>
|
||||
var index = <?php echo $index; ?>;
|
||||
var userid = '';
|
||||
var taxcheck=0;
|
||||
|
||||
$("#BudgetType").change(function(){
|
||||
|
||||
var aa = $("#BudgetType option:selected").text();
|
||||
|
||||
$('#Budget').val(aa);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#REVENUE").on("shown.bs.modal", function(e) {
|
||||
|
||||
@ -4186,7 +4238,7 @@ $("#REVENUE").on("shown.bs.modal", function(e) {
|
||||
|
||||
$('.AddRevenue').click(function(){
|
||||
tinyMCE.triggerSave();
|
||||
if(validateRevenueTax() && validateExceedLimit() && ExceedQuantityCheck())
|
||||
if(validateRevenueTax() && ExceedQuantityCheck())
|
||||
{
|
||||
var temp = parseInt(index)+1;
|
||||
var Reqnumber = $('#ReqNo').val();
|
||||
@ -4371,9 +4423,15 @@ clearRevenueModalFields();
|
||||
$('#PackVal'+userid).val(PackVal);
|
||||
$('#AfterPackVal'+userid).val(AfterPackVal);
|
||||
$('#RevenueCgst'+userid).val(Cgst);
|
||||
var taxvaluecheck = $('#txttaxcheck').val();
|
||||
if(taxvaluecheck == 1)
|
||||
{
|
||||
$('#RevenueAfterSgst'+userid).val(0);
|
||||
$('#RevenueSgst'+userid).val(0);
|
||||
}
|
||||
$('#RevenueAfterCgst'+userid).val(AfterCgst);
|
||||
$('#RevenueAfterSgst'+userid).val(AfterSgst);
|
||||
$('#RevenueSgst'+userid).val(Sgst);
|
||||
//$('#RevenueAfterSgst'+userid).val(AfterSgst);
|
||||
//$('#RevenueSgst'+userid).val(Sgst);
|
||||
$('#RevenueIgst'+userid).val(Igst);
|
||||
$('#RevenueAfterIgst'+userid).val(AfterIgst);
|
||||
$('#FreightType'+userid).val(FreightType);
|
||||
@ -4717,17 +4775,17 @@ function validateBudgetExceedLimit()
|
||||
{
|
||||
//alert(data);
|
||||
avalbudAmt = parseFloat(data);
|
||||
if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
|
||||
{
|
||||
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
// if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
|
||||
// {
|
||||
// swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#Rate').focus();
|
||||
// return false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@ -4928,11 +4986,11 @@ var totaldiscount = $('#txtTotalDiscount').val();
|
||||
//{
|
||||
// return false;
|
||||
//}
|
||||
else if(parseInt(AvlBudAmt) < (parseInt(txtTotalbasicamount)- parseInt(totaldiscount))){
|
||||
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// else if(parseInt(AvlBudAmt) < (parseInt(txtTotalbasicamount)- parseInt(totaldiscount))){
|
||||
// swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
return false;
|
||||
}
|
||||
// return false;
|
||||
// }
|
||||
|
||||
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
|
||||
swal('Please Enter Payable Terms Description');
|
||||
@ -5254,6 +5312,10 @@ $("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||
$('#txtEditInsurance').val($('#Insval'+userid).val());
|
||||
|
||||
$('#txtEditTotalOrderValue').val($('#TotalOrderValue'+userid).val());
|
||||
|
||||
var x = $("input:radio[name='Range']:checked").val();
|
||||
|
||||
|
||||
$('#EditAfterCgst').val($('#RevenueAfterCgst'+userid).val());
|
||||
$('#EditAfterSgst').val($('#RevenueAfterSgst'+userid).val());
|
||||
$('#EditAfterIgst').val($('#RevenueAfterIgst'+userid).val());
|
||||
|
||||
@ -5,14 +5,11 @@ $Value='';
|
||||
$EXCRATE=0;
|
||||
$parentPO= '';
|
||||
$ServiceDescription='';
|
||||
//$Value="$";
|
||||
//echo $ExchangeRate;
|
||||
//echo $Currency;
|
||||
//echo $unicode;
|
||||
|
||||
$Value=$unicode;
|
||||
//echo $Value;
|
||||
|
||||
$Currencycode=$currencycode;
|
||||
//echo $Currencycode;
|
||||
|
||||
$Terms='';
|
||||
$DeliverySchedule='';
|
||||
|
||||
@ -20,7 +17,7 @@ foreach ($CurrencyDetail as $Detail)
|
||||
{
|
||||
$Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
|
||||
}
|
||||
//echo $Cur;
|
||||
|
||||
|
||||
|
||||
foreach ($PaymentTerms as $TER)
|
||||
@ -121,6 +118,7 @@ $SupplierRef='';
|
||||
$SupOfferno='';
|
||||
$Otherref='';
|
||||
$Fincap='';
|
||||
$BudgetType = '';
|
||||
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
@ -168,6 +166,7 @@ if(!empty($POMaster))
|
||||
$Insurance=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$Importoption=$Req->POSubType;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
}
|
||||
}
|
||||
|
||||
@ -829,6 +828,34 @@ tinymce.init({
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2" style="padding-right: 0px;">
|
||||
<label for="BudgetType">Budget Type</label>
|
||||
<select id='BudgetType' name='BudgetType'>
|
||||
<?php if($BudgetType== 'CAPITAL')
|
||||
{
|
||||
$opt1='CAPITAL';
|
||||
$opt2='REVENUE';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$opt1='REVENUE';
|
||||
$opt2='CAPITAL';
|
||||
} ?>
|
||||
|
||||
|
||||
<option value=<?php echo $opt1;?>><?php echo $opt1;?></option>
|
||||
<option value=<?php echo $opt2;?>><?php echo $opt2;?></option>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -860,7 +887,7 @@ if($PONOStatus == PO_RELEASED)
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1091px;font-size:12px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
|
||||
<center><h4>Add Import Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -1473,7 +1500,7 @@ echo form_textarea($data);
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1091px;font-size:12px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
|
||||
<center><h4>Edit Import Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -2069,7 +2096,7 @@ echo form_textarea($data);
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1091px; font-size: 12px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>View Import Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -3030,6 +3057,8 @@ echo form_textarea($data);
|
||||
<input type="hidden" name="txtRow" id="txtRow" value="<?php echo $index;?>"/>
|
||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
|
||||
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) {
|
||||
if($PONOStatus == PO_DRAFT){?>
|
||||
@ -3138,6 +3167,18 @@ var NilType = '<?php echo NILTYPE;?>';
|
||||
|
||||
|
||||
|
||||
|
||||
$("#BudgetType").change(function(){
|
||||
|
||||
var aa = $("#BudgetType option:selected").text();
|
||||
|
||||
$('#Budget').val(aa);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#Importoption').attr("style", "pointer-events: none;");
|
||||
|
||||
$('#Insurance').change(function() {
|
||||
@ -3355,7 +3396,7 @@ $('#drpSupplier').change(function() {
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the SupplierID');
|
||||
alert('Please select the SupplierID');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3445,7 +3486,7 @@ $("#txtBasicValue").val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
return false;
|
||||
}
|
||||
id = '';
|
||||
@ -3487,7 +3528,7 @@ $("#txtBasicValue").val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the MaterialCode');
|
||||
alert('Please select the MaterialCode');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3528,7 +3569,7 @@ function EditQtyZerocheck()
|
||||
{
|
||||
if(($('#EditRate').val()=="0")||$('#EditQuantity').val()=="0"||($('#EditRate').val()=='')||$('#EditQuantity').val()=='')
|
||||
{
|
||||
swal('Please Enter A Valid Number for Rate and Quantity');
|
||||
alert('Please Enter A Valid Number for Rate and Quantity');
|
||||
$('#EdittxtBasicValue').val(0);
|
||||
$('#EditimBasicPrice').val(0);
|
||||
var txtexchangerate=parseFloat($('#ExchangeRate').val());
|
||||
@ -3576,7 +3617,7 @@ function QtyZerocheck()
|
||||
{
|
||||
if(($('#Rate').val()=="0")||$('#Quantity').val()=="0"||($('#Rate').val()=='')||$('#Quantity').val()=='')
|
||||
{
|
||||
swal('Please Enter A Valid Number for Rate and Quantity');
|
||||
alert('Please Enter A Valid Number for Rate and Quantity');
|
||||
$('#txtBasicValue').val(0);
|
||||
$('#imBasicPrice').val(0);
|
||||
$('#ExchangeRt').val(0);
|
||||
@ -3598,19 +3639,19 @@ function Ratechange()
|
||||
//alert();
|
||||
if($('#ReqNo').val() == "0")
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
$('#ReqNo').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#MaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please select the Material Code');
|
||||
alert('Please select the Material Code');
|
||||
$('#MaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CostCenter').val() == "0")
|
||||
{
|
||||
swal('Please select the CostCenterCode');
|
||||
alert('Please select the CostCenterCode');
|
||||
$('#CostCenter').focus();
|
||||
return false;
|
||||
}
|
||||
@ -3799,7 +3840,7 @@ function ExceedEditQuantityCheck()
|
||||
//var ReqQuantity=parseFloat($('#EditQuantity').val());
|
||||
if(EnterQuantity > ReqQuantity)
|
||||
{
|
||||
swal('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
$('#EditQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
@ -4300,7 +4341,7 @@ function ExceedQuantityCheck()
|
||||
var ReqQuantity = parseFloat(RequistQuantity);
|
||||
if(EnterQuantity > ReqQuantity)
|
||||
{
|
||||
swal('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
//$('#Quantity').val(RequistQuantity);
|
||||
$('#Quantity').focus();
|
||||
return false;
|
||||
@ -4330,16 +4371,16 @@ function validateEditExceedLimit()
|
||||
exp=basicAmountRate*exchangerate;
|
||||
//console.log(exp);
|
||||
|
||||
if(exp > totavlbud || totalAmount > totavlbud)
|
||||
{
|
||||
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(exp > totavlbud || totalAmount > totavlbud)
|
||||
// {
|
||||
// alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#EditRate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@ -4368,16 +4409,16 @@ var totavlbud=avalbudAmt+Sum;
|
||||
exp=basicAmountRate*exchangerate;
|
||||
//console.log(exp);
|
||||
|
||||
if(exp > totavlbud || totalAmount > totavlbud)
|
||||
{
|
||||
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(exp > totavlbud || totalAmount > totavlbud)
|
||||
// {
|
||||
// alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#Rate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@ -4737,37 +4778,37 @@ function validateImport()
|
||||
//alert();
|
||||
if($('#ReqNo').val() == "0")
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
$('#ReqNo').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CostCenter').val() == "0")
|
||||
{
|
||||
swal('Please select the Cost center');
|
||||
alert('Please select the Cost center');
|
||||
$('#CostCenter').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#MaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please select the Material Code');
|
||||
alert('Please select the Material Code');
|
||||
$('#MaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Quantity').val() == '')
|
||||
{
|
||||
swal('Please Enter the Quantity value');
|
||||
alert('Please Enter the Quantity value');
|
||||
$('#Quantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Rate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate of the Item');
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#imBasicPrice').val()=='')
|
||||
{
|
||||
swal('Please Enter Basic Price In Us');
|
||||
alert('Please Enter Basic Price In Us');
|
||||
$('#imBasicPrice').focus();
|
||||
return false;
|
||||
}
|
||||
@ -5561,11 +5602,11 @@ function DeleteRow(rowid)
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
swal(data);
|
||||
alert(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
swal("Error");
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}});
|
||||
@ -5681,16 +5722,16 @@ function Budgetcheck()
|
||||
var totordring=totalorderedamount*Exchange;
|
||||
var TotalSum=totavlbud;
|
||||
//console.log(TotalSum);
|
||||
if(totordring>TotalSum)
|
||||
{
|
||||
swal('You are Exceeding The Budget');
|
||||
return false;
|
||||
}
|
||||
// if(totordring>TotalSum)
|
||||
// {
|
||||
// alert('You are Exceeding The Budget');
|
||||
// return false;
|
||||
// }
|
||||
|
||||
else
|
||||
{
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@ -5741,7 +5782,7 @@ if(validate()&&Budgetcheck())
|
||||
if(document.getElementById('ImportTax').rows.length <= 0)
|
||||
{
|
||||
|
||||
swal('Please Select Line item to Create PO');
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
@ -5759,7 +5800,7 @@ if(validate()&&Budgetcheck())
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
swal(data);
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
//$('#SpcialInstruction').val('');
|
||||
@ -5769,7 +5810,7 @@ if(validate()&&Budgetcheck())
|
||||
}
|
||||
else
|
||||
{
|
||||
swal("Error");
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -5892,7 +5933,7 @@ $('#edittxtAfterFreight').val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Select MaterialCode and Rate Field Value');
|
||||
alert('Please Select MaterialCode and Rate Field Value');
|
||||
$('#drpEditFreight').val("0");
|
||||
$('#EditRate').focus();
|
||||
}
|
||||
@ -5940,7 +5981,7 @@ if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Select MaterialCode and Rate Field Value');
|
||||
alert('Please Select MaterialCode and Rate Field Value');
|
||||
$('#drpaddFreight').val("0");
|
||||
$('#Rate').focus();
|
||||
}
|
||||
@ -5960,14 +6001,14 @@ function calculateFreight(isEdit)
|
||||
{ //alert();
|
||||
if($('#MaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please Select the Material Code');
|
||||
alert('Please Select the Material Code');
|
||||
$('#MaterialCode').focus();
|
||||
$('#txtFreight').val('') ;
|
||||
return false;
|
||||
}
|
||||
else if($('#Rate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#Rate').focus();
|
||||
$('#addtxtFreight').val('') ;
|
||||
return false;
|
||||
@ -5979,7 +6020,7 @@ function calculateFreight(isEdit)
|
||||
var FreightType =$("#drpaddFreight").val();
|
||||
if(FreightType == "0")
|
||||
{
|
||||
swal('Please select Freight Type');
|
||||
alert('Please select Freight Type');
|
||||
$('#addtxtFreight').val('');
|
||||
$("#drpaddFreight").focus();
|
||||
}
|
||||
@ -6010,7 +6051,7 @@ function calculateFreight(isEdit)
|
||||
{
|
||||
if($('#addNOOfTrips').val()=='')
|
||||
{
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#addNOOfTrips").focus();
|
||||
$('#addtxtFreight').val(0)
|
||||
@ -6053,14 +6094,14 @@ function calculateFreight(isEdit)
|
||||
// alert('af');
|
||||
if($('#EditMaterialCode').val() == '')
|
||||
{
|
||||
swal('Please Select the Material Code');
|
||||
alert('Please Select the Material Code');
|
||||
$('#EditMaterialCode').focus();
|
||||
$('#edittxtFreight').val('');
|
||||
return false;
|
||||
}
|
||||
else if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditRate').focus();
|
||||
$('#edittxtFreight').val('');
|
||||
return false;
|
||||
@ -6071,7 +6112,7 @@ function calculateFreight(isEdit)
|
||||
var FreightType =$("#drpeditFreight").val();
|
||||
if(FreightType == "0")
|
||||
{
|
||||
swal('Please select Freight Type');
|
||||
alert('Please select Freight Type');
|
||||
$('#edittxtFreight').val('');
|
||||
$("#drpeditFreight").focus();
|
||||
}
|
||||
@ -6101,7 +6142,7 @@ function calculateFreight(isEdit)
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
if($('#editNOOfTrips').val()==''){
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#editNOOfTrips").focus();
|
||||
$('#edittxtFreight').val(0)
|
||||
@ -6142,7 +6183,7 @@ function calculateFreight(isEdit)
|
||||
var FreightType =$("#drpviewFreight").val();
|
||||
if(FreightType == "0")
|
||||
{
|
||||
swal('Please select Freight Type');
|
||||
alert('Please select Freight Type');
|
||||
$('#viewtxtFreight').val('');
|
||||
$("#drpviewFreight").focus();
|
||||
}
|
||||
@ -6172,7 +6213,7 @@ function calculateFreight(isEdit)
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
if($('#viewNOOfTrips').val()==''){
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#viewNOOfTrips").focus();
|
||||
$('#viewtxtFreight').val(0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user