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='';
$FinalTotalBasic = 0;
$BudgetType = '';
$INR='';
$INRSYM='';
if(!empty($INRSYMBOL))
@ -170,6 +173,7 @@ if(!empty($POMaster))
$InsuranceOptions=$Req->InsuranceStatus;
$InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType;
$BudgetType = $Req->BudgetType;
}
}
@ -875,6 +879,35 @@ document.getElementById('dispatchinternational').style.display = 'block';
</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>
@ -1287,7 +1320,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
<!-- Modal content-->
<form>
<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>
</div>
@ -2315,6 +2348,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
var SelectedMaterialList = {
Mat: []
};
$('#BudgetType').attr("style", "pointer-events: none;");
var index=<?php echo $index; ?> +1;
var myArray = <?php echo json_encode($res_arr_values); ?>;
@ -2417,7 +2452,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
}
else
{
swal('Please select the SupplierID');
alert('Please select the SupplierID');
return false;
}
@ -2503,7 +2538,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
}
else
{
swal('Please select the Requisition Number');
alert('Please select the Requisition Number');
return false;
}
id = '';
@ -2546,7 +2581,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
}
else
{
swal('Please select the MaterialCode');
alert('Please select the MaterialCode');
return false;
}
@ -2588,7 +2623,7 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
}
else
{
swal('Please select the MaterialCode');
alert('Please select the MaterialCode');
return false;
}
@ -2977,16 +3012,16 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
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;
}
// }
}
@ -3001,47 +3036,47 @@ var myArray = <?php echo json_encode($res_arr_values); ?>;
var basicAmountRate = parseFloat($('#CPTotalAmount').val());
var totalAmount = parseFloat($('#txtTotalOrderValue').val());
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($('#CPRate').val() == '')
{
swal('Please Enter the Rate of the Item');
alert('Please Enter the Rate of the Item');
$('#CPRate').focus();
return false;
}
@ -3320,7 +3355,7 @@ $('#PurQuantity').val('');
}
else
{
swal('Please select the MaterialCode');
alert('Please select the MaterialCode');
return false;
}
@ -3413,21 +3448,21 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
//alert(AvlBudAmt);
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(basicamt)) {
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// else if(parseInt(AvlBudAmt) < parseInt(basicamt)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false;
}
// return false;
// }
else
{
@ -3445,7 +3480,7 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
success:function(data) {
if(data)
{
swal(data);
alert(data);
$('#content').loader('hide');
$('#txtRowCount').val('');
@ -3458,7 +3493,7 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
else
{
$('#content').loader('hide');
swal("Error");
alert("Error");
}
}
@ -3486,19 +3521,19 @@ EditRatechange();
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;
}
@ -3918,43 +3953,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;
}
@ -4005,16 +4040,16 @@ function validateEditCapitalTax()
var basicAmountRate = parseFloat($('#EditCPTotalAmount').val());
var totalAmount = parseFloat($('#EdittxtTotalOrderValue').val());
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;
}
//}
}
@ -4307,7 +4342,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();
}
@ -4325,7 +4360,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;
@ -4338,7 +4373,7 @@ function calculateDiscount(isEdit)
if(DiscountType == "0")
{
swal('Please Select the discount Type');
alert('Please Select the discount Type');
$('#txtDiscount').val('');
$("#DiscountType").focus();
}
@ -4384,7 +4419,7 @@ function calculateDiscount(isEdit)
if(DiscountType == "0")
{
swal('Please Select the discount Type');
alert('Please Select the discount Type');
$('#txtEditDiscount').val('');
$("#EditDiscountType").focus();
}
@ -4453,7 +4488,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;
@ -4465,7 +4500,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();
}
@ -4498,7 +4533,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)
@ -4533,7 +4568,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;
@ -4545,7 +4580,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();
}
@ -4575,7 +4610,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)
@ -4644,7 +4679,7 @@ function calculateFreight(isEdit)
else if(FreightType == '<?php echo PERTRIP;?>')
{
if($('#AmendNOOfTrips').val()==''){
swal('Please Enter No of Trip');
alert('Please Enter No of Trip');
$("#AmendNOOfTrips").focus();
$('#AmendtxtFreight').val(0)
@ -4709,7 +4744,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)
@ -4742,7 +4777,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;
@ -4754,7 +4789,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();
}
@ -4784,7 +4819,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)
@ -4872,7 +4907,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();
}

View File

@ -114,6 +114,9 @@ $StatusName='';
$Reqon = '';
$Requestedby='';
$RequesterName='';
$BudgetType = '';
if(!empty($POMaster))
{
foreach ($POMaster as $Req)
@ -161,6 +164,7 @@ if(!empty($POMaster))
$InsuranceNo=$Req->InsuranceNumber;
$Importoption=$Req->POSubType;
$InsuranceStatus=$Req->InsuranceStatus;
$BudgetType = $Req->BudgetType;
}
}
@ -820,7 +824,33 @@ if(!empty($RequistionDetails))
</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>
@ -845,7 +875,7 @@ if(!empty($RequistionDetails))
<!-- Modal content-->
<form>
<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>
</div>
@ -1953,6 +1983,10 @@ var NilType = '<?php echo NILTYPE;?>';
};
$('#BudgetType').attr("style", "pointer-events: none;");
$('#Insurance').change(function() {
//var insure=$('#Insurance').val();
@ -2150,7 +2184,7 @@ $('#drpSupplier').change(function() {
}
else
{
swal('Please select the SupplierID');
alert('Please select the SupplierID');
return false;
}
@ -2237,7 +2271,7 @@ $("#txtBasicValue").val('');
}
else
{
swal('Please select the Requisition Number');
alert('Please select the Requisition Number');
return false;
}
id = '';
@ -2276,7 +2310,7 @@ $("#txtBasicValue").val('');
}
else
{
swal('Please select the MaterialCode');
alert('Please select the MaterialCode');
return false;
}
@ -2313,7 +2347,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());
@ -2361,19 +2395,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;
}
@ -2465,7 +2499,7 @@ function ExceedEditQuantityCheck()
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.');
$('#EditQuantity').focus();
return false;
}
@ -2747,37 +2781,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;
}
@ -3199,7 +3233,7 @@ function validateEditExceedLimit()
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();
return false;
}
@ -3329,16 +3363,16 @@ function Budgetcheck()
var totordring=totalorderedamount*Exchange;
var TotalSum=totavlbud;
//console.log(TotalSum);
if(totordring>TotalSum)
{
swal('You are Exceeding The Budget Amount');
return false;
}
// if(totordring>TotalSum)
// {
// alert('You are Exceeding The Budget Amount');
// return false;
// }
else
{
// else
// {
return true;
}
//}
}
@ -3363,7 +3397,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;
}
@ -3381,7 +3415,7 @@ if(validate()&&Budgetcheck())
if(data)
{
$('#content').loader('hide');
swal(data);
alert(data);
$('#txtRowCount').val('');
$('#txtDeletedRow').val('');
//$('#SpcialInstruction').val('');
@ -3391,7 +3425,7 @@ if(validate()&&Budgetcheck())
}
else
{
swal("Error");
alert("Error");
}
}
@ -3484,7 +3518,7 @@ $('#drpamendFreight').change(function(){
}
else
{
swal('Please Select MaterialCode and Rate Field Value');
alert('Please Select MaterialCode and Rate Field Value');
$('#drpamendFreight').val("0");
$('#EditRate').focus();
}
@ -3502,14 +3536,14 @@ function calculateFreight()
//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();
$('#AmendtxtFreight').val('');
return false;
@ -3520,7 +3554,7 @@ function calculateFreight()
var FreightType =$("#drpamendFreight").val();
if(FreightType == "0")
{
swal('Please select Freight Type');
alert('Please select Freight Type');
$('#AmendtxtFreight').val('');
$("#drpamendFreight").focus();
}
@ -3550,7 +3584,7 @@ function calculateFreight()
else if(FreightType == '<?php echo PERTRIP;?>')
{
if($('#AmendNOOfTrips').val()==''){
swal('Please Enter No of Trip');
alert('Please Enter No of Trip');
$("#AmendNOOfTrips").focus();
$('#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='';
$ServiceTypeOptions='';
$DescriptionOfPo = '';
$BudgetType = '';
if(!empty($INRSYMBOL))
{
@ -92,10 +94,14 @@
$InsuranceNo=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType;
$DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
}
}
if(!empty($RequistionDetails))
{
@ -279,7 +285,7 @@ $('#drpSupplier').change(function() {
}
else
{
swal('Please select the SupplierID');
alert('Please select the SupplierID');
return false;
}
@ -404,7 +410,7 @@ for(i=2;i<=rows;i++){
}
else
{
swal('Please select the Requisition Number');
alert('Please select the Requisition Number');
return false;
}
id = '';
@ -438,7 +444,7 @@ $('#MaterialCode').change(function() {
}
else
{
swal('Please select the MaterialCode');
alert('Please select the MaterialCode');
return false;
}
@ -475,7 +481,7 @@ $("#EditQuantity").val('');
}
else
{
swal('Please select the MaterialCode');
alert('Please select the MaterialCode');
return false;
}
@ -487,19 +493,19 @@ function Ratechange(){
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;
}
@ -536,7 +542,7 @@ function EditRatechange(){
if($('#EditCostCenter').val() == "0")
{
swal('Please select the CostCenterCode');
alert('Please select the CostCenterCode');
$('#EditCostCenter').focus();
return false;
}
@ -600,15 +606,15 @@ function IGSTchange()
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 )
// {
// alert('Your exceeding the Avaiable Budget :'+ AvilBudAmt +'.Please adjust the Product to proceed further.');
// return false;
// }
// else
// {
return true;
}
// }
}
@ -1065,6 +1071,34 @@ $(document).ready(function () {
</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-->
@ -1082,7 +1116,7 @@ $(document).ready(function () {
<!-- 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>Edit Service Purchase Order Item </h4></center>
</div>
<div align="left">
@ -1151,17 +1185,25 @@ $(document).ready(function () {
?>
</div>
</div>
<div class="col-md-3" id=EditotherDescription>
<label>Item Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditOtheritemDescription','value' => set_value('EditOtheritemDescription'),'id'=>'EditOtheritemDescription', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<div class="col-md-3" id=EditotherDescription>
<label>Item Description</label>
<div class="form-group">
<?php
$data = array('name' => 'EditOtheritemDescription','value' => set_value('EditOtheritemDescription'),'id'=>'EditOtheritemDescription', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>UOM</label>
<div class="form-group">
<?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><?php echo $record->ReqNo ?></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->ReceivedQuantity ?></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 '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 '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 '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 '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 '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
@ -1654,6 +1695,9 @@ var userid = '';
};
$('#BudgetType').attr("style", "pointer-events: none;");
$('#EditotherDescription').hide();
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
@ -1686,19 +1730,20 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
$('#EditAfterSgst').val($('#AfterSgst'+userid).val());
$('#EditAfterIgst').val($('#AfterIgst'+userid).val());
$('#otherallowance').val($('#otherallowance'+userid).val());
$('#EditOtheritemDescription').val($('#OtherServiceDescription'+userid).val());
var res= $('#OtherServiceDescription'+userid).val();
if(res=='')
{
$('#EditotherDescription').hide();
}
else
{
$('#EditotherDescription').show();
}
if($('#FrequencyValue'+userid).val()==1){
$('#EditFrequency').val($('#Frequency'+userid).val());
$("#EditFrequencyNo").val(1);
@ -2033,11 +2078,11 @@ function DeleteRow(rowid)
if(data)
{
$('#content').loader('hide');
swal(data);
alert(data);
}
else
{
swal("Error");
alert("Error");
}
}});
@ -2097,31 +2142,31 @@ function validateServiceTax()
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;
}
@ -2145,25 +2190,25 @@ function validateServiceTax()
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($('#EditQuantity').val() == '' || $('#EditQuantity').val() == 0.00)
{
swal('Please Enter the Quantity value');
alert('Please Enter the Quantity value');
$('#EditQuantity').focus();
return false;
}
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();
return false;
}
@ -2177,7 +2222,7 @@ function validateServiceTax()
return false;
}
else if($('#EdittxtSpcialInstruction').val()==''){
swal('Please Enter the Service Description');
alert('Please Enter the Service Description');
$('#EdittxtSpcialInstruction').focus();
return false;
}
@ -2215,18 +2260,18 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
if(validate())
{
if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
return false;
}
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
swal('Please Enter Other Payment Details');
// return false;
// }
if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
alert('Please Enter Other Payment Details');
$('#Otherpayment').focus();
return false;
}
else if($('#amenddescofpo').val().trim()==''){
swal('Please Enter Description Of Service');
alert('Please Enter Description Of Service');
$('#amenddescofpo').focus();
return false;
}
@ -2241,7 +2286,7 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
{
$('#content').loader('hide');
swal(data);
alert(data);
$('#txtRowCount').val('');
$('#txtDeletedRow').val('');
$('#txtStatus').val('');
@ -2253,7 +2298,7 @@ var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
else
{
$('#content').loader('hide');
swal("Error");
alert("Error");
}
}

File diff suppressed because it is too large Load Diff