some changes in view file

This commit is contained in:
venbatechnologies 2018-03-23 14:45:21 +05:30
parent 5c6219d307
commit 4c49fe4f2e
5 changed files with 7826 additions and 7662 deletions

View File

@ -85,6 +85,9 @@
$ServiceTypeOptions=''; $ServiceTypeOptions='';
$FinalTotalBasic = 0; $FinalTotalBasic = 0;
$BudgetType = '';
$INR=''; $INR='';
$INRSYM=''; $INRSYM='';
if(!empty($INRSYMBOL)) if(!empty($INRSYMBOL))
@ -170,6 +173,7 @@ if(!empty($POMaster))
$InsuranceOptions=$Req->InsuranceStatus; $InsuranceOptions=$Req->InsuranceStatus;
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType; $ServiceTypeOptions=$Req->POSubType;
$BudgetType = $Req->BudgetType;
} }
} }
@ -875,6 +879,35 @@ document.getElementById('dispatchinternational').style.display = 'block';
</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>
</div> </div>
</div> </div>
@ -1287,7 +1320,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
<!-- Modal content--> <!-- Modal content-->
<form> <form>
<div class="modal-content" style="width:1117px;"> <div class="modal-content" style="width:1117px;">
<div class="modal-header" style="background-color: #5d0411;color:#fff;"> <div class="modal-header" style="background-color: #5d0411;color:#fff;">
<center><h4>Edit Capital Purchase Order Item </h4></center> <center><h4>Edit Capital Purchase Order Item </h4></center>
</div> </div>
@ -2315,6 +2348,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
var SelectedMaterialList = { var SelectedMaterialList = {
Mat: [] Mat: []
}; };
$('#BudgetType').attr("style", "pointer-events: none;");
var index=<?php echo $index; ?> +1; var index=<?php echo $index; ?> +1;
var myArray = <?php echo json_encode($res_arr_values); ?>; var myArray = <?php echo json_encode($res_arr_values); ?>;
@ -2417,7 +2452,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
} }
else else
{ {
swal('Please select the SupplierID'); alert('Please select the SupplierID');
return false; return false;
} }
@ -2503,7 +2538,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
} }
else else
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
return false; return false;
} }
id = ''; id = '';
@ -2546,7 +2581,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
} }
else else
{ {
swal('Please select the MaterialCode'); alert('Please select the MaterialCode');
return false; return false;
} }
@ -2588,7 +2623,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
} }
else else
{ {
swal('Please select the MaterialCode'); alert('Please select the MaterialCode');
return false; return false;
} }
@ -2977,16 +3012,16 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
swal('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
@ -3001,47 +3036,47 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
var basicAmountRate = parseFloat($('#CPTotalAmount').val()); var basicAmountRate = parseFloat($('#CPTotalAmount').val());
var totalAmount = parseFloat($('#txtTotalOrderValue').val()); var totalAmount = parseFloat($('#txtTotalOrderValue').val());
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#CPRate').focus(); // $('#CPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
function validateCapitalTax() function validateCapitalTax()
{ {
if($('#Reqnumber').val() == "0") if($('#Reqnumber').val() == "0")
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
$('#Reqnumber').focus(); $('#Reqnumber').focus();
return false; return false;
} }
else if($('#CostCenter').val() == "0") else if($('#CostCenter').val() == "0")
{ {
swal('Please select the Cost center'); alert('Please select the Cost center');
$('#CostCenter').focus(); $('#CostCenter').focus();
return false; return false;
} }
else if($('#MaterialCode').val() == "0") else if($('#MaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#MaterialCode').focus(); $('#MaterialCode').focus();
return false; return false;
} }
else if($('#CPQuantity').val() == '') else if($('#CPQuantity').val() == '')
{ {
swal('Please Enter the Quantity value'); alert('Please Enter the Quantity value');
$('#CPQuantity').focus(); $('#CPQuantity').focus();
return false; return false;
} }
else if($('#CPRate').val() == '') else if($('#CPRate').val() == '')
{ {
swal('Please Enter the Rate of the Item'); alert('Please Enter the Rate of the Item');
$('#CPRate').focus(); $('#CPRate').focus();
return false; return false;
} }
@ -3320,7 +3355,7 @@ $('#PurQuantity').val('');
} }
else else
{ {
swal('Please select the MaterialCode'); alert('Please select the MaterialCode');
return false; return false;
} }
@ -3413,21 +3448,21 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
//alert(AvlBudAmt); //alert(AvlBudAmt);
if(document.getElementById('serviceTax').rows.length < 2) 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(); $('#Deliverydt').focus();
return false; return false;
} }
else if($('#Otherpayment').val()=='' && $('#PaymentMethod').val()=='PT08'){ else if($('#Otherpayment').val()=='' && $('#PaymentMethod').val()=='PT08'){
swal('Please Enter Other Payable Terms Description'); alert('Please Enter Other Payable Terms Description');
$('#Otherpayment').focus(); $('#Otherpayment').focus();
return false; return false;
} }
else if(parseInt(AvlBudAmt) < parseInt(basicamt)) { // else if(parseInt(AvlBudAmt) < parseInt(basicamt)) {
swal('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 else
{ {
@ -3445,7 +3480,7 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
success:function(data) { success:function(data) {
if(data) if(data)
{ {
swal(data); alert(data);
$('#content').loader('hide'); $('#content').loader('hide');
$('#txtRowCount').val(''); $('#txtRowCount').val('');
@ -3458,7 +3493,7 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
else else
{ {
$('#content').loader('hide'); $('#content').loader('hide');
swal("Error"); alert("Error");
} }
} }
@ -3486,19 +3521,19 @@ EditRatechange();
if($('#EditReqnumber').val() == "0") if($('#EditReqnumber').val() == "0")
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
$('#EditReqnumber').focus(); $('#EditReqnumber').focus();
return false; return false;
} }
else if($('#EditMaterialCode').val() == "0") else if($('#EditMaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#EditMaterialCode').focus(); $('#EditMaterialCode').focus();
return false; return false;
} }
else if($('#EditCostCenter').val() == "0") else if($('#EditCostCenter').val() == "0")
{ {
swal('Please select the CostCenterCode'); alert('Please select the CostCenterCode');
$('#EditCostCenter').focus(); $('#EditCostCenter').focus();
return false; return false;
} }
@ -3918,43 +3953,43 @@ function validateEditCapitalTax()
if($('#EditReqnumber').val() == "0") if($('#EditReqnumber').val() == "0")
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
$('#EditReqnumber').focus(); $('#EditReqnumber').focus();
return false; return false;
} }
else if($('#EditCostCenter').val() == "0") else if($('#EditCostCenter').val() == "0")
{ {
swal('Please select the Cost center'); alert('Please select the Cost center');
$('#EditCostCenter').focus(); $('#EditCostCenter').focus();
return false; return false;
} }
else if($('#EditMaterialCode').val() == "0") else if($('#EditMaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#EditMaterialCode').focus(); $('#EditMaterialCode').focus();
return false; return false;
} }
else if($('#EditCPQuantity').val() == '') else if($('#EditCPQuantity').val() == '')
{ {
swal('Please Enter the Quantity value'); alert('Please Enter the Quantity value');
$('#EditCPQuantity').focus(); $('#EditCPQuantity').focus();
return false; return false;
} }
else if($('#EditCPQuantity').val() == "0") else if($('#EditCPQuantity').val() == "0")
{ {
swal('Please Enter the Valid Quantity value'); alert('Please Enter the Valid Quantity value');
$('#EditCPQuantity').focus(); $('#EditCPQuantity').focus();
return false; return false;
} }
else if($('#EditCPRate').val() == '') else if($('#EditCPRate').val() == '')
{ {
swal('Please Enter the Rate of the Item'); alert('Please Enter the Rate of the Item');
$('#EditCPRate').focus(); $('#EditCPRate').focus();
return false; return false;
} }
else if($('#EditCPRate').val() == "0") 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(); $('#EditCPRate').focus();
return false; return false;
} }
@ -4005,16 +4040,16 @@ function validateEditCapitalTax()
var basicAmountRate = parseFloat($('#EditCPTotalAmount').val()); var basicAmountRate = parseFloat($('#EditCPTotalAmount').val());
var totalAmount = parseFloat($('#EdittxtTotalOrderValue').val()); var totalAmount = parseFloat($('#EdittxtTotalOrderValue').val());
if(basicAmountRate > avalbudAmt) // if(basicAmountRate > avalbudAmt)
{ // {
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditCPRate').focus(); // $('#EditCPRate').focus();
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
@ -4307,7 +4342,7 @@ $('#EditDiscountType').change(function() {
} }
else else
{ {
swal('Please Select MaterialCode and Rate Field Value'); alert('Please Select MaterialCode and Rate Field Value');
$('#EditDiscountType').val("0"); $('#EditDiscountType').val("0");
$('#EditCPRate').focus(); $('#EditCPRate').focus();
} }
@ -4325,7 +4360,7 @@ function calculateDiscount(isEdit)
if($('#CPRate').val() == '') if($('#CPRate').val() == '')
{ {
swal('Please Enter the Rate value'); alert('Please Enter the Rate value');
$('#CPRate').focus(); $('#CPRate').focus();
$('#txtDiscount').val(''); $('#txtDiscount').val('');
return false; return false;
@ -4338,7 +4373,7 @@ function calculateDiscount(isEdit)
if(DiscountType == "0") if(DiscountType == "0")
{ {
swal('Please Select the discount Type'); alert('Please Select the discount Type');
$('#txtDiscount').val(''); $('#txtDiscount').val('');
$("#DiscountType").focus(); $("#DiscountType").focus();
} }
@ -4384,7 +4419,7 @@ function calculateDiscount(isEdit)
if(DiscountType == "0") if(DiscountType == "0")
{ {
swal('Please Select the discount Type'); alert('Please Select the discount Type');
$('#txtEditDiscount').val(''); $('#txtEditDiscount').val('');
$("#EditDiscountType").focus(); $("#EditDiscountType").focus();
} }
@ -4453,7 +4488,7 @@ function calculateFreight(isEdit)
if($('#AfterBasicPriceTax').val() == '') if($('#AfterBasicPriceTax').val() == '')
{ {
swal('Please Enter the Rate value'); alert('Please Enter the Rate value');
$('#CPRate').focus(); $('#CPRate').focus();
$('#txtFreight').val('') ; $('#txtFreight').val('') ;
return false; return false;
@ -4465,7 +4500,7 @@ function calculateFreight(isEdit)
var FreightType =$("#drpFreight").val(); var FreightType =$("#drpFreight").val();
if(FreightType == "0") if(FreightType == "0")
{ {
swal('Please select Freight Type'); alert('Please select Freight Type');
$('#txtFreight').val(''); $('#txtFreight').val('');
$("#drpFreight").focus(); $("#drpFreight").focus();
} }
@ -4498,7 +4533,7 @@ function calculateFreight(isEdit)
else if(FreightType == '<?php echo PERTRIP;?>') else if(FreightType == '<?php echo PERTRIP;?>')
{ {
if($('#NOOfTrips').val()==''){ if($('#NOOfTrips').val()==''){
swal('Please Enter No of Trip'); alert('Please Enter No of Trip');
$("#NOOfTrips").focus(); $("#NOOfTrips").focus();
$('#txtFreight').val(0) $('#txtFreight').val(0)
@ -4533,7 +4568,7 @@ function calculateFreight(isEdit)
if($('#ViewAfterBasicPriceTax').val() == '') if($('#ViewAfterBasicPriceTax').val() == '')
{ {
swal('Please Enter the Rate value'); alert('Please Enter the Rate value');
$('#ViewCPRate').focus(); $('#ViewCPRate').focus();
$('#txtViewFreight').val('') ; $('#txtViewFreight').val('') ;
return false; return false;
@ -4545,7 +4580,7 @@ function calculateFreight(isEdit)
var FreightType =$("#drpViewFreight").val(); var FreightType =$("#drpViewFreight").val();
if(FreightType == "0") if(FreightType == "0")
{ {
swal('Please select Freight Type'); alert('Please select Freight Type');
$('#txtViewFreight').val(''); $('#txtViewFreight').val('');
$("#drpViewFreight").focus(); $("#drpViewFreight").focus();
} }
@ -4575,7 +4610,7 @@ function calculateFreight(isEdit)
else if(FreightType == '<?php echo PERTRIP;?>') else if(FreightType == '<?php echo PERTRIP;?>')
{ {
if($('#ViewNOOfTrips').val()==''){ if($('#ViewNOOfTrips').val()==''){
swal('Please Enter No of Trip'); alert('Please Enter No of Trip');
$("#ViewNOOfTrips").focus(); $("#ViewNOOfTrips").focus();
$('#txtViewFreight').val(0) $('#txtViewFreight').val(0)
@ -4644,7 +4679,7 @@ function calculateFreight(isEdit)
else if(FreightType == '<?php echo PERTRIP;?>') else if(FreightType == '<?php echo PERTRIP;?>')
{ {
if($('#AmendNOOfTrips').val()==''){ if($('#AmendNOOfTrips').val()==''){
swal('Please Enter No of Trip'); alert('Please Enter No of Trip');
$("#AmendNOOfTrips").focus(); $("#AmendNOOfTrips").focus();
$('#AmendtxtFreight').val(0) $('#AmendtxtFreight').val(0)
@ -4709,7 +4744,7 @@ function calculateFreight(isEdit)
else if(FreightType == '<?php echo PERTRIP;?>') else if(FreightType == '<?php echo PERTRIP;?>')
{ {
if($('#EditNOOfTrips').val()==''){ if($('#EditNOOfTrips').val()==''){
swal('Please Enter No of Trip'); alert('Please Enter No of Trip');
$("#EditNOOfTrips").focus(); $("#EditNOOfTrips").focus();
$('#txtEditFreight').val(0) $('#txtEditFreight').val(0)
@ -4742,7 +4777,7 @@ function calculateFreight(isEdit)
{ {
if($('#EditAfterBasicPriceTax').val() == '') if($('#EditAfterBasicPriceTax').val() == '')
{ {
swal('Please Enter the Rate value'); alert('Please Enter the Rate value');
$('#EditCPRate').focus(); $('#EditCPRate').focus();
$('#txtEditFreight').val('') ; $('#txtEditFreight').val('') ;
return false; return false;
@ -4754,7 +4789,7 @@ function calculateFreight(isEdit)
var FreightType =$("#drpEditFreight").val(); var FreightType =$("#drpEditFreight").val();
if(FreightType == "0") if(FreightType == "0")
{ {
swal('Please select Freight Type'); alert('Please select Freight Type');
$('#txtEditFreight').val(''); $('#txtEditFreight').val('');
$("#drpEditFreight").focus(); $("#drpEditFreight").focus();
} }
@ -4784,7 +4819,7 @@ function calculateFreight(isEdit)
else if(FreightType == '<?php echo PERTRIP;?>') else if(FreightType == '<?php echo PERTRIP;?>')
{ {
if($('#EditNOOfTrips').val()==''){ if($('#EditNOOfTrips').val()==''){
swal('Please Enter No of Trip'); alert('Please Enter No of Trip');
$("#EditNOOfTrips").focus(); $("#EditNOOfTrips").focus();
$('#txtEditFreight').val(0) $('#txtEditFreight').val(0)
@ -4872,7 +4907,7 @@ $('#drpFreighteditloc').change(function()
} }
else else
{ {
swal('Please Select MaterialCode and Rate Field Value'); alert('Please Select MaterialCode and Rate Field Value');
$('#drpFreighteditloc').val("0"); $('#drpFreighteditloc').val("0");
$('#Rate').focus(); $('#Rate').focus();
} }

View File

@ -114,6 +114,9 @@ $StatusName='';
$Reqon = ''; $Reqon = '';
$Requestedby=''; $Requestedby='';
$RequesterName=''; $RequesterName='';
$BudgetType = '';
if(!empty($POMaster)) if(!empty($POMaster))
{ {
foreach ($POMaster as $Req) foreach ($POMaster as $Req)
@ -161,6 +164,7 @@ if(!empty($POMaster))
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$Importoption=$Req->POSubType; $Importoption=$Req->POSubType;
$InsuranceStatus=$Req->InsuranceStatus; $InsuranceStatus=$Req->InsuranceStatus;
$BudgetType = $Req->BudgetType;
} }
} }
@ -820,7 +824,33 @@ if(!empty($RequistionDetails))
</div> </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>
</div> </div>
</div> </div>
@ -845,7 +875,7 @@ if(!empty($RequistionDetails))
<!-- Modal content--> <!-- Modal content-->
<form> <form>
<div class="modal-content" style="width:1000px; font-size: 12px;" > <div class="modal-content" style="width:1000px; 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> <center><h4>Edit Import Purchase Order Item </h4></center>
</div> </div>
@ -1953,6 +1983,10 @@ var NilType = '<?php echo NILTYPE;?>';
}; };
$('#BudgetType').attr("style", "pointer-events: none;");
$('#Insurance').change(function() { $('#Insurance').change(function() {
//var insure=$('#Insurance').val(); //var insure=$('#Insurance').val();
@ -2150,7 +2184,7 @@ $('#drpSupplier').change(function() {
} }
else else
{ {
swal('Please select the SupplierID'); alert('Please select the SupplierID');
return false; return false;
} }
@ -2237,7 +2271,7 @@ $("#txtBasicValue").val('');
} }
else else
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
return false; return false;
} }
id = ''; id = '';
@ -2276,7 +2310,7 @@ $("#txtBasicValue").val('');
} }
else else
{ {
swal('Please select the MaterialCode'); alert('Please select the MaterialCode');
return false; return false;
} }
@ -2313,7 +2347,7 @@ function EditQtyZerocheck()
{ {
if(($('#EditRate').val()=="0")||$('#EditQuantity').val()=="0"||($('#EditRate').val()=='')||$('#EditQuantity').val()=='') 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); $('#EdittxtBasicValue').val(0);
$('#EditimBasicPrice').val(0); $('#EditimBasicPrice').val(0);
var txtexchangerate=parseFloat($('#ExchangeRate').val()); var txtexchangerate=parseFloat($('#ExchangeRate').val());
@ -2361,19 +2395,19 @@ function Ratechange(){
//alert(); //alert();
if($('#ReqNo').val() == "0") if($('#ReqNo').val() == "0")
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
$('#ReqNo').focus(); $('#ReqNo').focus();
return false; return false;
} }
else if($('#MaterialCode').val() == "0") else if($('#MaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#MaterialCode').focus(); $('#MaterialCode').focus();
return false; return false;
} }
else if($('#CostCenter').val() == "0") else if($('#CostCenter').val() == "0")
{ {
swal('Please select the CostCenterCode'); alert('Please select the CostCenterCode');
$('#CostCenter').focus(); $('#CostCenter').focus();
return false; return false;
} }
@ -2465,7 +2499,7 @@ function ExceedEditQuantityCheck()
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
if(EnterQuantity > 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.');
$('#EditQuantity').focus(); $('#EditQuantity').focus();
return false; return false;
} }
@ -2747,37 +2781,37 @@ function validateImport()
//alert(); //alert();
if($('#ReqNo').val() == "0") if($('#ReqNo').val() == "0")
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
$('#ReqNo').focus(); $('#ReqNo').focus();
return false; return false;
} }
else if($('#CostCenter').val() == "0") else if($('#CostCenter').val() == "0")
{ {
swal('Please select the Cost center'); alert('Please select the Cost center');
$('#CostCenter').focus(); $('#CostCenter').focus();
return false; return false;
} }
else if($('#MaterialCode').val() == "0") else if($('#MaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#MaterialCode').focus(); $('#MaterialCode').focus();
return false; return false;
} }
else if($('#Quantity').val() == '') else if($('#Quantity').val() == '')
{ {
swal('Please Enter the Quantity value'); alert('Please Enter the Quantity value');
$('#Quantity').focus(); $('#Quantity').focus();
return false; return false;
} }
else if($('#Rate').val() == '') else if($('#Rate').val() == '')
{ {
swal('Please Enter the Rate of the Item'); alert('Please Enter the Rate of the Item');
$('#Rate').focus(); $('#Rate').focus();
return false; return false;
} }
else if($('#imBasicPrice').val()=='') else if($('#imBasicPrice').val()=='')
{ {
swal('Please Enter Basic Price In Us'); alert('Please Enter Basic Price In Us');
$('#imBasicPrice').focus(); $('#imBasicPrice').focus();
return false; return false;
} }
@ -3199,7 +3233,7 @@ function validateEditExceedLimit()
if(exp > totavlbud || totalAmount > totavlbud) if(exp > totavlbud || totalAmount > totavlbud)
{ {
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.'); alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditRate').focus(); $('#EditRate').focus();
return false; return false;
} }
@ -3329,16 +3363,16 @@ function Budgetcheck()
var totordring=totalorderedamount*Exchange; var totordring=totalorderedamount*Exchange;
var TotalSum=totavlbud; var TotalSum=totavlbud;
//console.log(TotalSum); //console.log(TotalSum);
if(totordring>TotalSum) // if(totordring>TotalSum)
{ // {
swal('You are Exceeding The Budget Amount'); // alert('You are Exceeding The Budget Amount');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} //}
} }
@ -3363,7 +3397,7 @@ if(validate()&&Budgetcheck())
if(document.getElementById('ImportTax').rows.length <= 0) 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(); $('#Deliverydt').focus();
return false; return false;
} }
@ -3381,7 +3415,7 @@ if(validate()&&Budgetcheck())
if(data) if(data)
{ {
$('#content').loader('hide'); $('#content').loader('hide');
swal(data); alert(data);
$('#txtRowCount').val(''); $('#txtRowCount').val('');
$('#txtDeletedRow').val(''); $('#txtDeletedRow').val('');
//$('#SpcialInstruction').val(''); //$('#SpcialInstruction').val('');
@ -3391,7 +3425,7 @@ if(validate()&&Budgetcheck())
} }
else else
{ {
swal("Error"); alert("Error");
} }
} }
@ -3484,7 +3518,7 @@ $('#drpamendFreight').change(function(){
} }
else else
{ {
swal('Please Select MaterialCode and Rate Field Value'); alert('Please Select MaterialCode and Rate Field Value');
$('#drpamendFreight').val("0"); $('#drpamendFreight').val("0");
$('#EditRate').focus(); $('#EditRate').focus();
} }
@ -3502,14 +3536,14 @@ function calculateFreight()
//alert('af'); //alert('af');
if($('#EditMaterialCode').val() == '') if($('#EditMaterialCode').val() == '')
{ {
swal('Please Select the Material Code'); alert('Please Select the Material Code');
$('#EditMaterialCode').focus(); $('#EditMaterialCode').focus();
$('#edittxtFreight').val(''); $('#edittxtFreight').val('');
return false; return false;
} }
else if($('#EditRate').val() == '') else if($('#EditRate').val() == '')
{ {
swal('Please Enter the Rate value'); alert('Please Enter the Rate value');
$('#EditRate').focus(); $('#EditRate').focus();
$('#AmendtxtFreight').val(''); $('#AmendtxtFreight').val('');
return false; return false;
@ -3520,7 +3554,7 @@ function calculateFreight()
var FreightType =$("#drpamendFreight").val(); var FreightType =$("#drpamendFreight").val();
if(FreightType == "0") if(FreightType == "0")
{ {
swal('Please select Freight Type'); alert('Please select Freight Type');
$('#AmendtxtFreight').val(''); $('#AmendtxtFreight').val('');
$("#drpamendFreight").focus(); $("#drpamendFreight").focus();
} }
@ -3550,7 +3584,7 @@ function calculateFreight()
else if(FreightType == '<?php echo PERTRIP;?>') else if(FreightType == '<?php echo PERTRIP;?>')
{ {
if($('#AmendNOOfTrips').val()==''){ if($('#AmendNOOfTrips').val()==''){
swal('Please Enter No of Trip'); alert('Please Enter No of Trip');
$("#AmendNOOfTrips").focus(); $("#AmendNOOfTrips").focus();
$('#AmendtxtFreight').val(0) $('#AmendtxtFreight').val(0)

File diff suppressed because it is too large Load Diff

275
application/views/editServiceAmendPO.php Executable file → Normal file
View File

@ -38,6 +38,8 @@
$InsuranceNo=''; $InsuranceNo='';
$ServiceTypeOptions=''; $ServiceTypeOptions='';
$DescriptionOfPo = ''; $DescriptionOfPo = '';
$BudgetType = '';
if(!empty($INRSYMBOL)) if(!empty($INRSYMBOL))
{ {
@ -92,10 +94,14 @@
$InsuranceNo=$Req->InsuranceNumber; $InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType; $ServiceTypeOptions=$Req->POSubType;
$DescriptionOfPo = $Req->Description_Of_Service; $DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
} }
} }
if(!empty($RequistionDetails)) if(!empty($RequistionDetails))
{ {
@ -279,7 +285,7 @@ $('#drpSupplier').change(function() {
} }
else else
{ {
swal('Please select the SupplierID'); alert('Please select the SupplierID');
return false; return false;
} }
@ -404,7 +410,7 @@ for(i=2;i<=rows;i++){
} }
else else
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
return false; return false;
} }
id = ''; id = '';
@ -438,7 +444,7 @@ $('#MaterialCode').change(function() {
} }
else else
{ {
swal('Please select the MaterialCode'); alert('Please select the MaterialCode');
return false; return false;
} }
@ -475,7 +481,7 @@ $("#EditQuantity").val('');
} }
else else
{ {
swal('Please select the MaterialCode'); alert('Please select the MaterialCode');
return false; return false;
} }
@ -487,19 +493,19 @@ function Ratechange(){
if($('#ReqNo').val() == "0") if($('#ReqNo').val() == "0")
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
$('#ReqNo').focus(); $('#ReqNo').focus();
return false; return false;
} }
else if($('#MaterialCode').val() == "0") else if($('#MaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#MaterialCode').focus(); $('#MaterialCode').focus();
return false; return false;
} }
else if($('#CostCenter').val() == "0") else if($('#CostCenter').val() == "0")
{ {
swal('Please select the CostCenterCode'); alert('Please select the CostCenterCode');
$('#CostCenter').focus(); $('#CostCenter').focus();
return false; return false;
} }
@ -536,7 +542,7 @@ function EditRatechange(){
if($('#EditCostCenter').val() == "0") if($('#EditCostCenter').val() == "0")
{ {
swal('Please select the CostCenterCode'); alert('Please select the CostCenterCode');
$('#EditCostCenter').focus(); $('#EditCostCenter').focus();
return false; return false;
} }
@ -600,15 +606,15 @@ function IGSTchange()
var ReqAmount = parseFloat(ValuetoCheck); var ReqAmount = parseFloat(ValuetoCheck);
var BudAmount = parseFloat(budgetAmount); var BudAmount = parseFloat(budgetAmount);
if(ReqAmount > BudAmount ) // if(ReqAmount > BudAmount )
{ // {
swal('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.'); // alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.');
return false; // return false;
} // }
else // else
{ // {
return true; return true;
} // }
} }
@ -1065,6 +1071,34 @@ $(document).ready(function () {
</div> </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>
</div><!--End new fields 1 sep--> </div><!--End new fields 1 sep-->
@ -1082,7 +1116,7 @@ $(document).ready(function () {
<!-- Modal content--> <!-- Modal content-->
<form> <form>
<div class="modal-content" style="width:900px;"> <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>Edit Service Purchase Order Item </h4></center> <center><h4>Edit Service Purchase Order Item </h4></center>
</div> </div>
<div align="left"> <div align="left">
@ -1151,17 +1185,25 @@ $(document).ready(function () {
?> ?>
</div> </div>
</div> </div>
<div class="col-md-3" id=EditotherDescription>
<label>Item Description</label>
<div class="form-group">
<?php <div class="col-md-3" id=EditotherDescription>
$data = array('name' => 'EditOtheritemDescription','value' => set_value('EditOtheritemDescription'),'id'=>'EditOtheritemDescription', 'class' => 'form-control' ,'readonly' => 'true'); <label>Item Description</label>
echo form_input($data); <div class="form-group">
?> <?php
</div> $data = array('name' => 'EditOtheritemDescription','value' => set_value('EditOtheritemDescription'),'id'=>'EditOtheritemDescription', 'class' => 'form-control' ,'readonly' => 'true');
</div> echo form_input($data);
<div class="col-md-3"> ?>
</div>
</div>
<div class="col-md-3">
<label>UOM</label> <label>UOM</label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -1399,7 +1441,7 @@ $(document).ready(function () {
} }
?> ?>
<tr id="<?php echo $index ; ?>"> <tr id="<?php echo $index ; ?>">
<td align="left"><?php echo $index ; ?></td> <td align="left"><?php echo $index ; ?></td>
<td><?php echo $record->ReqNo ?></td> <td><?php echo $record->ReqNo ?></td>
<td><?php echo $record->MaterialCode ?></td> <td><?php echo $record->MaterialCode ?></td>
@ -1413,76 +1455,75 @@ $(document).ready(function () {
<td align="right"><?php echo $record->Quantity ?></td> <td align="right"><?php echo $record->Quantity ?></td>
<td align="right"><?php echo $record->ReceivedQuantity ?></td> <td align="right"><?php echo $record->ReceivedQuantity ?></td>
<td align="right"><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td> <td align="right"><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td>
<input type="hidden" name="<?php echo 'Reqnumber'.$index ?>" id="<?php echo 'Reqnumber'.$index ?>" value="<?php echo $record->ReqNo ; ?>" /> <input type="hidden" name="<?php echo 'Reqnumber'.$index ?>" id="<?php echo 'Reqnumber'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->ReqNo ; ?>" /> <input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
<input type="hidden" name="<?php echo 'AvilBudget'.$index ?>" id="<?php echo 'AvilBudget'.$index ?>" value="<?php echo $AvlAmount ; ?>" /> <input type="hidden" name="<?php echo 'AvilBudget'.$index ?>" id="<?php echo 'AvilBudget'.$index ?>" value="<?php echo $AvlAmount ; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo'.$index ?>" id="<?php echo 'LineItemNo'.$index ?>" value="<?php echo $record->LineItemNo ; ?>" /> <input type="hidden" name="<?php echo 'LineItemNo'.$index ?>" id="<?php echo 'LineItemNo'.$index ?>" value="<?php echo $record->LineItemNo ; ?>" />
<input type="hidden" name="<?php echo 'costCode'.$index ?>" id="<?php echo 'costCode'.$index ?>" value="<?php echo $record->CostCenterCode ; ?>" />
<input type="hidden" name="<?php echo 'materialCode'.$index ?>" id="<?php echo 'materialCode'.$index ?>" value="<?php echo $record->MaterialCode ; ?>" />
<input type="hidden" name="<?php echo 'materialName'.$index ?>" id="<?php echo 'materialName'.$index ?>" value="<?php echo $record->MaterialName ; ?>" />
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
<input type="hidden" name="<?php echo 'per'.$index ?>" id="<?php echo 'per'.$index ?>" value="<?php echo $record->Per ; ?>" />
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'beforequantity'.$index ?>" id="<?php echo 'beforequantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'itemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
<input type="hidden" name="<?php echo 'beforeitemRate'.$index ?>" id="<?php echo 'beforeitemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
<input type="hidden" name="<?php echo 'Cgst'.$index ?>" id="<?php echo 'Cgst'.$index ?>" value="<?php echo $record->CGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeCgst'.$index ?>" id="<?php echo 'beforeCgst'.$index ?>" value="<?php echo $record->CGST ; ?>" />
<input type="hidden" name="<?php echo 'AfterCgst'.$index ?>" id="<?php echo 'AfterCgst'.$index ?>" value="<?php echo $record->After_CGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeCgstvalue'.$index ?>" id="<?php echo 'beforeCgstvalue'.$index ?>" value="<?php echo $record->After_CGST ; ?>" />
<input type="hidden" name="<?php echo 'Sgst'.$index ?>" id="<?php echo 'Sgst'.$index ?>" value="<?php echo $record->SGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeSgst'.$index ?>" id="<?php echo 'beforeSgst'.$index ?>" value="<?php echo $record->SGST ; ?>" />
<input type="hidden" name="<?php echo 'AfterSgst'.$index ?>" id="<?php echo 'AfterSgst'.$index ?>" value="<?php echo $record->After_SGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeSgstvalue'.$index ?>" id="<?php echo 'beforeSgstvalue'.$index ?>" value="<?php echo $record->After_SGST ; ?>" />
<input type="hidden" name="<?php echo 'Igst'.$index ?>" id="<?php echo 'Igst'.$index ?>" value="<?php echo $record->IGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeIgst'.$index ?>" id="<?php echo 'beforeIgst'.$index ?>" value="<?php echo $record->IGST ; ?>" />
<input type="hidden" name="<?php echo 'AfterIgst'.$index ?>" id="<?php echo 'AfterIgst'.$index ?>" value="<?php echo $record->After_IGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeIgstvalue'.$index ?>" id="<?php echo 'beforeIgstvalue'.$index ?>" value="<?php echo $record->After_IGST ; ?>" />
<input type="hidden" name="<?php echo 'otherallowance'.$index ?>" id="<?php echo 'otherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
<input type="hidden" name="<?php echo 'beforeotherallowance'.$index ?>" id="<?php echo 'beforeotherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
<input type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
<input type="hidden" name="<?php echo 'servicematerialdescription'.$index ?>" id="<?php echo 'servicematerialdescription'.$index ?>" value="<?php echo $record->ServiceMaterialDescription ; ?>" />
<input type="hidden" name="<?php echo 'Frequency'.$index ?>" id="<?php echo 'Frequency'.$index ?>" value="<?php echo $Frequency; ?>" />
<input type="hidden" name="<?php echo 'FrequencyNo'.$index ?>" id="<?php echo 'FrequencyNo'.$index ?>" value="<?php echo $FrequencyNo ; ?>" />
<input type="hidden" name="<?php echo 'FrequencyValue'.$index ?>" id="<?php echo 'FrequencyValue'.$index ?>" value="<?php echo $FrequencyNo ; ?>" />
<input type="hidden" name="<?php echo 'costCode'.$index ?>" id="<?php echo 'costCode'.$index ?>" value="<?php echo $record->CostCenterCode ; ?>" />
<input type="hidden" name="<?php echo 'OtherServiceDescription'.$index ?>" id="<?php echo 'OtherServiceDescription'.$index ?>" value="<?php echo $record->MaterialDescription ; ?>" /> <input type="hidden" name="<?php echo 'materialCode'.$index ?>" id="<?php echo 'materialCode'.$index ?>" value="<?php echo $record->MaterialCode ; ?>" />
<input type="hidden" name="<?php echo 'materialName'.$index ?>" id="<?php echo 'materialName'.$index ?>" value="<?php echo $record->MaterialName ; ?>" />
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
<input type="hidden" name="<?php echo 'per'.$index ?>" id="<?php echo 'per'.$index ?>" value="<?php echo $record->Per ; ?>" />
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'beforequantity'.$index ?>" id="<?php echo 'beforequantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'itemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
<input type="hidden" name="<?php echo 'beforeitemRate'.$index ?>" id="<?php echo 'beforeitemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
<input type="hidden" name="<?php echo 'Cgst'.$index ?>" id="<?php echo 'Cgst'.$index ?>" value="<?php echo $record->CGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeCgst'.$index ?>" id="<?php echo 'beforeCgst'.$index ?>" value="<?php echo $record->CGST ; ?>" />
<input type="hidden" name="<?php echo 'AfterCgst'.$index ?>" id="<?php echo 'AfterCgst'.$index ?>" value="<?php echo $record->After_CGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeCgstvalue'.$index ?>" id="<?php echo 'beforeCgstvalue'.$index ?>" value="<?php echo $record->After_CGST ; ?>" />
<input type="hidden" name="<?php echo 'Sgst'.$index ?>" id="<?php echo 'Sgst'.$index ?>" value="<?php echo $record->SGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeSgst'.$index ?>" id="<?php echo 'beforeSgst'.$index ?>" value="<?php echo $record->SGST ; ?>" />
<input type="hidden" name="<?php echo 'AfterSgst'.$index ?>" id="<?php echo 'AfterSgst'.$index ?>" value="<?php echo $record->After_SGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeSgstvalue'.$index ?>" id="<?php echo 'beforeSgstvalue'.$index ?>" value="<?php echo $record->After_SGST ; ?>" />
<input type="hidden" name="<?php echo 'Igst'.$index ?>" id="<?php echo 'Igst'.$index ?>" value="<?php echo $record->IGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeIgst'.$index ?>" id="<?php echo 'beforeIgst'.$index ?>" value="<?php echo $record->IGST ; ?>" />
<input type="hidden" name="<?php echo 'AfterIgst'.$index ?>" id="<?php echo 'AfterIgst'.$index ?>" value="<?php echo $record->After_IGST ; ?>" />
<input type="hidden" name="<?php echo 'beforeIgstvalue'.$index ?>" id="<?php echo 'beforeIgstvalue'.$index ?>" value="<?php echo $record->After_IGST ; ?>" />
<input type="hidden" name="<?php echo 'otherallowance'.$index ?>" id="<?php echo 'otherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
<input type="hidden" name="<?php echo 'beforeotherallowance'.$index ?>" id="<?php echo 'beforeotherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
<input type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
<input type="hidden" name="<?php echo 'servicematerialdescription'.$index ?>" id="<?php echo 'servicematerialdescription'.$index ?>" value="<?php echo $record->ServiceMaterialDescription ; ?>" />
<input type="hidden" name="<?php echo 'Frequency'.$index ?>" id="<?php echo 'Frequency'.$index ?>" value="<?php echo $Frequency; ?>" />
<input type="hidden" name="<?php echo 'FrequencyNo'.$index ?>" id="<?php echo 'FrequencyNo'.$index ?>" value="<?php echo $FrequencyNo ; ?>" />
<input type="hidden" name="<?php echo 'FrequencyValue'.$index ?>" id="<?php echo 'FrequencyValue'.$index ?>" value="<?php echo $FrequencyNo ; ?>" />
<input type="hidden" name="<?php echo 'OtherServiceDescription'.$index ?>" id="<?php echo 'OtherServiceDescription'.$index ?>" value="<?php echo $record->MaterialDescription ; ?>" />
<?php <?php
@ -1654,6 +1695,9 @@ var userid = '';
}; };
$('#BudgetType').attr("style", "pointer-events: none;");
$('#EditotherDescription').hide(); $('#EditotherDescription').hide();
$("#EDITSERVICE").on("shown.bs.modal", function(e) { $("#EDITSERVICE").on("shown.bs.modal", function(e) {
@ -1686,19 +1730,20 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
$('#EditAfterSgst').val($('#AfterSgst'+userid).val()); $('#EditAfterSgst').val($('#AfterSgst'+userid).val());
$('#EditAfterIgst').val($('#AfterIgst'+userid).val()); $('#EditAfterIgst').val($('#AfterIgst'+userid).val());
$('#otherallowance').val($('#otherallowance'+userid).val()); $('#otherallowance').val($('#otherallowance'+userid).val());
$('#EditOtheritemDescription').val($('#OtherServiceDescription'+userid).val()); $('#EditOtheritemDescription').val($('#OtherServiceDescription'+userid).val());
var res= $('#OtherServiceDescription'+userid).val(); var res= $('#OtherServiceDescription'+userid).val();
if(res=='') if(res=='')
{ {
$('#EditotherDescription').hide(); $('#EditotherDescription').hide();
} }
else else
{ {
$('#EditotherDescription').show(); $('#EditotherDescription').show();
} }
if($('#FrequencyValue'+userid).val()==1){ if($('#FrequencyValue'+userid).val()==1){
$('#EditFrequency').val($('#Frequency'+userid).val()); $('#EditFrequency').val($('#Frequency'+userid).val());
$("#EditFrequencyNo").val(1); $("#EditFrequencyNo").val(1);
@ -2033,11 +2078,11 @@ function DeleteRow(rowid)
if(data) if(data)
{ {
$('#content').loader('hide'); $('#content').loader('hide');
swal(data); alert(data);
} }
else else
{ {
swal("Error"); alert("Error");
} }
}}); }});
@ -2097,31 +2142,31 @@ function validateServiceTax()
if($('#ReqNo').val() == "0") if($('#ReqNo').val() == "0")
{ {
swal('Please select the Requisition Number'); alert('Please select the Requisition Number');
$('#ReqNo').focus(); $('#ReqNo').focus();
return false; return false;
} }
else if($('#CostCenter').val() == "0") else if($('#CostCenter').val() == "0")
{ {
swal('Please select the Cost center'); alert('Please select the Cost center');
$('#CostCenter').focus(); $('#CostCenter').focus();
return false; return false;
} }
else if($('#MaterialCode').val() == "0") else if($('#MaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#MaterialCode').focus(); $('#MaterialCode').focus();
return false; return false;
} }
else if($('#Quantity').val() == '') else if($('#Quantity').val() == '')
{ {
swal('Please Enter the Quantity value'); alert('Please Enter the Quantity value');
$('#Quantity').focus(); $('#Quantity').focus();
return false; return false;
} }
else if($('#Rate').val() == '') else if($('#Rate').val() == '')
{ {
swal('Please Enter the Rate of the Item'); alert('Please Enter the Rate of the Item');
$('#Rate').focus(); $('#Rate').focus();
return false; return false;
} }
@ -2145,25 +2190,25 @@ function validateServiceTax()
if($('#EditCostCenter').val() == "0") if($('#EditCostCenter').val() == "0")
{ {
swal('Please select the Cost center'); alert('Please select the Cost center');
$('#EditCostCenter').focus(); $('#EditCostCenter').focus();
return false; return false;
} }
else if($('#EditMaterialCode').val() == "0") else if($('#EditMaterialCode').val() == "0")
{ {
swal('Please select the Material Code'); alert('Please select the Material Code');
$('#EditMaterialCode').focus(); $('#EditMaterialCode').focus();
return false; return false;
} }
else if($('#EditQuantity').val() == '' || $('#EditQuantity').val() == 0.00) else if($('#EditQuantity').val() == '' || $('#EditQuantity').val() == 0.00)
{ {
swal('Please Enter the Quantity value'); alert('Please Enter the Quantity value');
$('#EditQuantity').focus(); $('#EditQuantity').focus();
return false; return false;
} }
else if($('#EditRate').val() == '' || $('#EditRate').val() == 0.00) else if($('#EditRate').val() == '' || $('#EditRate').val() == 0.00)
{ {
swal('Please Enter the Rate of the Item'); alert('Please Enter the Rate of the Item');
$('#EditRate').focus(); $('#EditRate').focus();
return false; return false;
} }
@ -2177,7 +2222,7 @@ function validateServiceTax()
return false; return false;
} }
else if($('#EdittxtSpcialInstruction').val()==''){ else if($('#EdittxtSpcialInstruction').val()==''){
swal('Please Enter the Service Description'); alert('Please Enter the Service Description');
$('#EdittxtSpcialInstruction').focus(); $('#EdittxtSpcialInstruction').focus();
return false; return false;
} }
@ -2215,18 +2260,18 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
if(validate()) if(validate())
{ {
if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { // if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
swal('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()=='' && $('#PaymentTerms').val()=='PT08'){ if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
swal('Please Enter Other Payment Details'); alert('Please Enter Other Payment Details');
$('#Otherpayment').focus(); $('#Otherpayment').focus();
return false; return false;
} }
else if($('#amenddescofpo').val().trim()==''){ else if($('#amenddescofpo').val().trim()==''){
swal('Please Enter Description Of Service'); alert('Please Enter Description Of Service');
$('#amenddescofpo').focus(); $('#amenddescofpo').focus();
return false; return false;
} }
@ -2241,7 +2286,7 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
{ {
$('#content').loader('hide'); $('#content').loader('hide');
swal(data); alert(data);
$('#txtRowCount').val(''); $('#txtRowCount').val('');
$('#txtDeletedRow').val(''); $('#txtDeletedRow').val('');
$('#txtStatus').val(''); $('#txtStatus').val('');
@ -2253,7 +2298,7 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
else else
{ {
$('#content').loader('hide'); $('#content').loader('hide');
swal("Error"); alert("Error");
} }
} }

File diff suppressed because it is too large Load Diff