some changes in view file
This commit is contained in:
parent
5c6219d307
commit
4c49fe4f2e
@ -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();
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
@ -821,6 +825,32 @@ if(!empty($RequistionDetails))
|
||||
|
||||
|
||||
</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)
|
||||
|
||||
@ -65,6 +65,7 @@ foreach ($PaymentTerms as $TER)
|
||||
$revenuesubtype='';
|
||||
$insurencestatus='';
|
||||
$insurenceno='';
|
||||
$BudgetType = '';
|
||||
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
@ -103,9 +104,12 @@ if(!empty($POMaster))
|
||||
$revenuesubtype = $Req->POSubType;
|
||||
$insurencestatus = $Req->InsuranceStatus;
|
||||
$insurenceno = $Req->InsuranceNumber;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//echo $BudgetType;
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
@ -388,7 +392,7 @@ function calculateDiscount()
|
||||
|
||||
if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -400,7 +404,7 @@ function calculateDiscount()
|
||||
|
||||
if(DiscountType == "0")
|
||||
{
|
||||
swal('Please Select the discount Type');
|
||||
alert('Please Select the discount Type');
|
||||
$('#txtEditDiscount').val('');
|
||||
$("#EditDiscountType").focus();
|
||||
}
|
||||
@ -483,7 +487,7 @@ function calculatePackaging()
|
||||
|
||||
if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -497,7 +501,7 @@ function calculatePackaging()
|
||||
|
||||
if(PackagingType == "0")
|
||||
{
|
||||
swal('Please select the Packaging Type');
|
||||
alert('Please select the Packaging Type');
|
||||
$('#txtEditPackaging').val('');
|
||||
$("#EditPackagingType").focus();
|
||||
}
|
||||
@ -511,7 +515,7 @@ function calculatePackaging()
|
||||
{
|
||||
if(PackagingCalculation != 0 &&$('#txtEditAfterDiscount').val() == '')
|
||||
{
|
||||
swal('Please Enter the Discount value');
|
||||
alert('Please Enter the Discount value');
|
||||
$('#EditDiscountType').focus();
|
||||
$('#txtEditPackaging').val('');
|
||||
return false;
|
||||
@ -628,7 +632,7 @@ function calculatePackaging()
|
||||
|
||||
if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -667,7 +671,7 @@ function calculatePackaging()
|
||||
|
||||
if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -716,7 +720,7 @@ function calculatePackaging()
|
||||
|
||||
if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -727,7 +731,7 @@ function calculatePackaging()
|
||||
|
||||
if(FreightType == "0")
|
||||
{
|
||||
swal('Please select Freight Type');
|
||||
alert('Please select Freight Type');
|
||||
$('#txtEditFreight').val('');
|
||||
$("#drpEditFreight").focus();
|
||||
}
|
||||
@ -743,7 +747,7 @@ function calculatePackaging()
|
||||
if(FreightCalculation != 0 &&$('#txtEditAfterDiscount').val() == '')
|
||||
{
|
||||
//alert(FreightType);
|
||||
swal('Please Enter the Discount value');
|
||||
alert('Please Enter the Discount value');
|
||||
$('#EditDiscountType').focus();
|
||||
$('#txtEditFreight').val('');
|
||||
return false;
|
||||
@ -789,7 +793,7 @@ function calculatePackaging()
|
||||
var nooftrips=$('#EditNOOfTrips').val();
|
||||
var freightrate=$('#txtEditFreight').val();
|
||||
if((nooftrips == '') || (txtEditFreight == '')){
|
||||
swal("Please Enter Number of Trips or Freight Rate!");
|
||||
alert("Please Enter Number of Trips or Freight Rate!");
|
||||
$('#EditNOOfTrips').val(0.0);
|
||||
$('#txtEditFreight').val(0.0);
|
||||
$('#txtEditAfterFreight').val(0.0);
|
||||
@ -881,16 +885,16 @@ function validateEditExceedLimit()
|
||||
var discount = parseFloat($('#txtEditAfterDiscount').val());
|
||||
basicAmountRate = basicAmountRate - discount;
|
||||
//alert(basicAmountRate+'-'+avalbudAmt+'-'+discount);
|
||||
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)
|
||||
// {
|
||||
// alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#EditRate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
function calculateEditTotalValue()
|
||||
@ -1311,6 +1315,34 @@ function calculateEditTaxValue()
|
||||
|
||||
|
||||
</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>
|
||||
|
||||
@ -1485,7 +1517,7 @@ function calculateEditTaxValue()
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1055px;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<center><h4>Edit Revenue Purchase Order Line Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
@ -2159,6 +2191,8 @@ function calculateEditTaxValue()
|
||||
var index = '1';
|
||||
var userid = '';
|
||||
|
||||
$('#BudgetType').attr("style", "pointer-events: none;");
|
||||
|
||||
|
||||
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||
var AvlBudAmt = '<?php echo $AvlAmount?>';
|
||||
@ -2513,25 +2547,25 @@ function validateEditRevenueTax()
|
||||
{
|
||||
if($('#EditCostCenter').val() == "")
|
||||
{
|
||||
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)
|
||||
{
|
||||
swal('Please Enter the Quantity value');
|
||||
alert('Please Enter the Quantity value');
|
||||
$('#EditQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditRate').val() == '' || $('#EditRate').val() == 0)
|
||||
else if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate of the Item');
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
@ -2563,21 +2597,21 @@ function validateBudgetExceedLimit()
|
||||
{
|
||||
//alert(data);
|
||||
avalbudAmt = parseFloat(data);
|
||||
if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
|
||||
{
|
||||
// if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
|
||||
// {
|
||||
|
||||
swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('.content').loader('hide');
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
// alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('.content').loader('hide');
|
||||
// $('#Rate').focus();
|
||||
// return false;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
//alert('Not exceeding in else part');
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@ -2615,15 +2649,15 @@ var txtTotalDiscount = $('#txtTotalDiscount').val();
|
||||
//alert(realrows);
|
||||
if(document.getElementById('revenueTax').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(parseInt(AvlBudAmt) < (parseInt(txtTotBasicAmount) - parseInt(txtTotalDiscount))) {
|
||||
swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// else if(parseInt(AvlBudAmt) < (parseInt(txtTotBasicAmount) - parseInt(txtTotalDiscount))) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
return false;
|
||||
}
|
||||
// return false;
|
||||
// }
|
||||
else
|
||||
{
|
||||
//alert('final else for store data');
|
||||
@ -2636,7 +2670,7 @@ var txtTotalDiscount = $('#txtTotalDiscount').val();
|
||||
if(data)
|
||||
{
|
||||
$('.content').loader('hide');
|
||||
swal(data);
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
$('#txtStatus').val('');
|
||||
@ -2648,7 +2682,7 @@ var txtTotalDiscount = $('#txtTotalDiscount').val();
|
||||
else
|
||||
{
|
||||
$('.content').loader('hide');
|
||||
swal("Error");
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
213
application/views/editServiceAmendPO.php
Executable file → Normal file
213
application/views/editServiceAmendPO.php
Executable file → Normal 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">
|
||||
@ -1152,16 +1186,24 @@ $(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>
|
||||
@ -1417,71 +1459,70 @@ $(document).ready(function () {
|
||||
|
||||
<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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 '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 ; ?>" />
|
||||
|
||||
<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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -63,6 +63,8 @@ if(!empty($AvlimportBudAmt))
|
||||
|
||||
}
|
||||
|
||||
//echo $AvlAmount;
|
||||
|
||||
// if(!empty($AvlBudAmt))
|
||||
// {
|
||||
|
||||
@ -165,19 +167,19 @@ function vaildateBeforeOpenModal()
|
||||
{
|
||||
if($('#PODate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Purchase Order date');
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#drpSupplier').val() == "0")
|
||||
{
|
||||
swal('Please Select the Supplier details');
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#DeliveryAddr').val() == '')
|
||||
{
|
||||
swal('Please Enter the Delivery Address');
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
}
|
||||
@ -185,51 +187,52 @@ function vaildateBeforeOpenModal()
|
||||
{
|
||||
if(document.getElementById("Schedule").checked)
|
||||
{
|
||||
swal('Please Enter Schedule By');
|
||||
alert('Please Enter Schedule By');
|
||||
return false;
|
||||
}
|
||||
|
||||
else if(document.getElementById("Date").checked)
|
||||
{
|
||||
swal('Please Enter Dispatch Instruction');
|
||||
alert('Please Enter Dispatch Instruction');
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
else if($('#currencytype').val() == '0')
|
||||
{
|
||||
swal('Please Select the Currency Type');
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#ExchangeRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Exchange Rate');
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if($('#ExchangeRate').val() == 0)
|
||||
{
|
||||
swal('Please Enter the Exchange Rate');
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if($('#PlaceOforigin').val()== '')
|
||||
{
|
||||
swal('Please Enter Place Of Origin');
|
||||
alert('Please Enter Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if($('#PaymentTerms').val()=='')
|
||||
{
|
||||
swal('Please Select Payment Terms');
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
else if($('#BudgetType').val()=="0")
|
||||
{
|
||||
alert('Please Select Budget Type');
|
||||
@ -243,7 +246,7 @@ function vaildateBeforeOpenModal()
|
||||
|
||||
else if($('#Importoption').val()== "0")
|
||||
{
|
||||
swal('Please Select POType');
|
||||
alert('Please Select POType');
|
||||
$('#Importoption').focus();
|
||||
return false;
|
||||
|
||||
@ -288,7 +291,9 @@ function vaildateBeforeOpenModal()
|
||||
|
||||
<center><b><h2>Resico Industries - Import Purchase Order</h2></b></center><br/>
|
||||
<div class="col-md-12 text-right" style="padding-bottom: 6px; padding-right: 23px;">
|
||||
|
||||
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-primary" id="back" value="Back">Back</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -587,6 +592,8 @@ function vaildateBeforeOpenModal()
|
||||
|
||||
$options3 = array("0"=>'Select');
|
||||
|
||||
|
||||
|
||||
if(!empty($PoTypeOptions))
|
||||
{
|
||||
foreach ($PoTypeOptions as $payment):
|
||||
@ -685,6 +692,7 @@ function vaildateBeforeOpenModal()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2" style="padding-right: 0px;">
|
||||
<label for="BudgetType">Budget Type</label>
|
||||
<?php
|
||||
@ -694,9 +702,15 @@ function vaildateBeforeOpenModal()
|
||||
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -720,7 +734,7 @@ function vaildateBeforeOpenModal()
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:1030px;font-size:12px;">
|
||||
<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>
|
||||
@ -1306,7 +1320,7 @@ echo form_textarea($data);
|
||||
<!-- 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;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Edit Import Purchase Order Item </h4></center>
|
||||
</div>
|
||||
@ -2043,7 +2057,9 @@ echo form_textarea($data);
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="Budget" id="Budget" />
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" />
|
||||
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
||||
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<input type="reset" class="btn btn-primary" value="Reset" onclick="window.location.reload()">
|
||||
@ -2115,6 +2131,8 @@ $(document).on('change',".changetodecimal", function(){
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#BudgetType").change(function(){
|
||||
|
||||
var aa = $("#BudgetType option:selected").text();
|
||||
@ -2123,6 +2141,8 @@ $("#BudgetType").change(function(){
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
var SelectedMaterialCode = [];
|
||||
var RequistQuantity = '';
|
||||
var AvilBudAmt = '';
|
||||
@ -2159,12 +2179,15 @@ else
|
||||
|
||||
$('#Importoption').change(function()
|
||||
{
|
||||
|
||||
|
||||
var potypeval=$('#Importoption').val();
|
||||
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
|
||||
var config=poopt[0].ConfigValue;
|
||||
var Payment = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||
var default1=Payment[4].PaymentTerms;
|
||||
|
||||
|
||||
if(potypeval==config)
|
||||
{
|
||||
$('#PaymentTerms').empty();
|
||||
@ -2179,13 +2202,17 @@ $('#Importoption').change(function()
|
||||
|
||||
});
|
||||
|
||||
$.each(Payment,function(idx,obj)
|
||||
|
||||
$.each(Payment,function(idx,obj)
|
||||
{
|
||||
if(obj.PaymentID=='PT05')
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
|
||||
@ -2198,53 +2225,44 @@ $('#Importoption').change(function()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#drpSupplier').change(function() {
|
||||
|
||||
var id = $('#drpSupplier').val();
|
||||
$("#SupAddress").val('');
|
||||
|
||||
|
||||
if(id != '0')
|
||||
{
|
||||
var y = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT) ?>;
|
||||
var Payment = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||
var PaymentID='';
|
||||
$('#PaymentTerms').empty();
|
||||
|
||||
|
||||
|
||||
if(id != '0')
|
||||
{
|
||||
var y = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT) ?>;
|
||||
var Payment = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||
var PaymentID='';
|
||||
$('#PaymentTerms').empty();
|
||||
|
||||
|
||||
$.each(y, function(idx, obj)
|
||||
{
|
||||
if(obj.SupplierID === id)
|
||||
{
|
||||
$("#SupAddress").val(obj.Address);
|
||||
|
||||
PaymentID = obj.PaymentID;
|
||||
$.each(y, function(idx, obj)
|
||||
{
|
||||
if(obj.SupplierID === id)
|
||||
{
|
||||
$("#SupAddress").val(obj.Address);
|
||||
PaymentID = obj.PaymentID;
|
||||
//PaymentID = obj.PaymentID;
|
||||
$('#PaymentTerms').val(obj.PaymentTerms);
|
||||
}
|
||||
|
||||
});
|
||||
$('#PaymentTerms').val(obj.PaymentTerms);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(PaymentID=='PT08')
|
||||
{
|
||||
$('#otheroptiondiv').show();
|
||||
$('#Otherpayment').val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#otheroptiondiv').hide();
|
||||
$('#Otherpayment').show();
|
||||
}
|
||||
if(PaymentID=='PT08')
|
||||
{
|
||||
$('#otheroptiondiv').show();
|
||||
$('#Otherpayment').val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#otheroptiondiv').hide();
|
||||
$('#Otherpayment').show();
|
||||
}
|
||||
|
||||
$('#PaymentTerms').empty();
|
||||
var paymentList = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||
$('#PaymentTerms').empty();
|
||||
var paymentList = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
|
||||
$.each(paymentList, function(pay, payobj)
|
||||
@ -2253,8 +2271,7 @@ $('#drpSupplier').change(function() {
|
||||
if(payobj.PaymentID == PaymentID)
|
||||
{
|
||||
|
||||
|
||||
$("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
|
||||
$("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
|
||||
|
||||
}
|
||||
// else
|
||||
@ -2283,7 +2300,7 @@ $('#drpSupplier').change(function() {
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the SupplierID');
|
||||
alert('Please select the SupplierID');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2317,7 +2334,8 @@ $("#txtBasicValue").val('');
|
||||
|
||||
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||
var AvlBudAmt ='<?php echo $AvlimportBudAmt ?>';
|
||||
if(AvlBudAmt == '')
|
||||
//alert(AvlBudAmt);
|
||||
if(AvlBudAmt == '')
|
||||
{
|
||||
$("#AvlBudAmt").val(parseFloat(0).toFixed(2));
|
||||
}
|
||||
@ -2392,7 +2410,7 @@ $("#txtBasicValue").val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the Requisition Number');
|
||||
alert('Please select the Requisition Number');
|
||||
return false;
|
||||
}
|
||||
id = '';
|
||||
@ -2435,7 +2453,7 @@ $("#txtBasicValue").val('');
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please select the MaterialCode');
|
||||
alert('Please select the MaterialCode');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2518,7 +2536,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);
|
||||
@ -2612,7 +2630,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());
|
||||
@ -2697,6 +2715,7 @@ if(isNaN(txtINR))
|
||||
|
||||
|
||||
var avalbudAmte= <?php echo json_encode($AvlAmount, JSON_PRETTY_PRINT) ?>;
|
||||
//alert(avalbudAmte)
|
||||
function validateEditExceedLimit()
|
||||
{
|
||||
//var avalbudAmt = parseFloat($('#EditAvlBudAmt').val());
|
||||
@ -2709,14 +2728,14 @@ function validateEditExceedLimit()
|
||||
|
||||
// if(exp > avalbudAmte || totalAmount > avalbudAmte)
|
||||
// {
|
||||
// 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;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -2741,14 +2760,14 @@ var avalbudAmt= <?php echo json_encode($AvlAmount, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
// if(exp > avalbudAmt || totalAmount > 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.');
|
||||
// $('#Rate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@ -2903,7 +2922,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;
|
||||
@ -2921,7 +2940,7 @@ return true;
|
||||
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);
|
||||
$('#EditQuantity').focus();
|
||||
return false;
|
||||
@ -3388,14 +3407,7 @@ $('#drpFreight').change(function() {
|
||||
{
|
||||
|
||||
$('#TripsValue').show();
|
||||
} }
|
||||
|
||||
|
||||
else if($('#Importoption').val()== "0")
|
||||
{
|
||||
alert('Please Select POType');
|
||||
$('#Importoption').focus();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
||||
$('#TripsValue').hide();
|
||||
@ -3423,7 +3435,7 @@ $('#drpFreight').change(function() {
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Select MaterialCode and Rate Field Value');
|
||||
alert('Please Select MaterialCode and Rate Field Value');
|
||||
$('#drpFreight').val("0");
|
||||
$('#Rate').focus();
|
||||
}
|
||||
@ -3447,14 +3459,14 @@ function calculateFreight(isEdit)
|
||||
{
|
||||
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();
|
||||
$('#txtFreight').val('') ;
|
||||
return false;
|
||||
@ -3497,7 +3509,7 @@ function calculateFreight(isEdit)
|
||||
{
|
||||
if($('#NOOfTrips').val()=='')
|
||||
{
|
||||
swal('Please Enter No of Trip');
|
||||
alert('Please Enter No of Trip');
|
||||
|
||||
$("#NOOfTrips").focus();
|
||||
$('#txtFreight').val(0)
|
||||
@ -3537,14 +3549,14 @@ function calculateFreight(isEdit)
|
||||
//alert();
|
||||
if($('#EditMaterialCode').val() == "0")
|
||||
{
|
||||
swal('Please Select the Material Code');
|
||||
alert('Please Select the Material Code');
|
||||
$('#EditMaterialCode').focus();
|
||||
$('#txtEditFreight').val('');
|
||||
return false;
|
||||
}
|
||||
else if($('#EditRate').val() == '')
|
||||
{
|
||||
swal('Please Enter the Rate value');
|
||||
alert('Please Enter the Rate value');
|
||||
$('#EditRate').focus();
|
||||
$('#txtEditFreight').val('');
|
||||
return false;
|
||||
@ -3555,7 +3567,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();
|
||||
}
|
||||
@ -3585,7 +3597,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)
|
||||
@ -3801,13 +3813,13 @@ 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;
|
||||
}
|
||||
@ -3819,19 +3831,19 @@ function validateImport()
|
||||
}
|
||||
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;
|
||||
}
|
||||
@ -4534,16 +4546,16 @@ function Budgetcheck()
|
||||
|
||||
var totordring=totalorderedamount*Exchange;
|
||||
var TotalSum=avalbudAmte;
|
||||
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;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@ -4577,10 +4589,13 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if($('#Importoption').val()== "0")
|
||||
@ -4588,6 +4603,7 @@ if(validate()&&Budgetcheck())
|
||||
alert('Please Select POType');
|
||||
$('#Importoption').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4603,7 +4619,7 @@ if(validate()&&Budgetcheck())
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
swal(data);
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
//$('#SpcialInstruction').val('');
|
||||
@ -4613,7 +4629,7 @@ if(validate()&&Budgetcheck())
|
||||
}
|
||||
else
|
||||
{
|
||||
swal("Error");
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
@ -4721,7 +4737,7 @@ if (FreightType == "PER TRIP")
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Please Select MaterialCode and Rate Field Value');
|
||||
alert('Please Select MaterialCode and Rate Field Value');
|
||||
$('#drpEditFreight').val("0");
|
||||
$('#EditRate').focus();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user