revenue Po fixed
This commit is contained in:
parent
12a221b98d
commit
a4a8c31ecb
0
application/logs/log-2017-06-20.php
Normal file → Executable file
0
application/logs/log-2017-06-20.php
Normal file → Executable file
@ -552,7 +552,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Customduty','value' => set_value('Customduty'),'id'=>'Customduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'Customduty','value' => set_value('Customduty'),'id'=>'Customduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -573,7 +573,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ExcisedutyTax','value' => set_value('ExcisedutyTax'),'id'=>'ExcisedutyTax', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'ExcisedutyTax','value' => set_value('ExcisedutyTax'),'id'=>'ExcisedutyTax', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -594,7 +594,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ExcisedutyEDcess','value' => set_value('ExcisedutyEDcess'),'id'=>'ExcisedutyEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'ExcisedutyEDcess','value' => set_value('ExcisedutyEDcess'),'id'=>'ExcisedutyEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -615,7 +615,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ExcisedutySHcess','value' => set_value('ExcisedutySHcess'),'id'=>'ExcisedutySHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'ExcisedutySHcess','value' => set_value('ExcisedutySHcess'),'id'=>'ExcisedutySHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -636,7 +636,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'CustomEDcess','value' => set_value('CustomEDcess'),'id'=>'CustomEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'CustomEDcess','value' => set_value('CustomEDcess'),'id'=>'CustomEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -657,7 +657,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'CustomSHcess','value' => set_value('CustomSHcess'),'id'=>'CustomSHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'CustomSHcess','value' => set_value('CustomSHcess'),'id'=>'CustomSHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -680,7 +680,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'AdditionalExciseduty ','value' => set_value('AdditionalExciseduty'),'id'=>'AdditionalExciseduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'AdditionalExciseduty ','value' => set_value('AdditionalExciseduty'),'id'=>'AdditionalExciseduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -701,7 +701,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Grossdutypayable ','value' => set_value('Grossdutypayable'),'id'=>'Grossdutypayable', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'Grossdutypayable ','value' => set_value('Grossdutypayable'),'id'=>'Grossdutypayable', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -729,7 +729,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Grossexpenses','value' => set_value('Grossexpenses'),'id'=>'Grossexpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'Grossexpenses','value' => set_value('Grossexpenses'),'id'=>'Grossexpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -747,7 +747,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'purchaserate','value' => set_value('purchaserate'),'id'=>'purchaserate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'purchaserate','value' => set_value('purchaserate'),'id'=>'purchaserate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -756,7 +756,7 @@ if(!empty($AvlBudAmt))
|
||||
<span>Quantity</span>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'PurQuantity','value' => set_value('PurQuantity'),'id'=>'PurQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'PurQuantity','value' => set_value('PurQuantity'),'id'=>'PurQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -771,7 +771,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'CustomDutyExpenses ','value' => set_value('CustomDutyExpenses'),'id'=>'CustomDutyExpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'CustomDutyExpenses ','value' => set_value('CustomDutyExpenses'),'id'=>'CustomDutyExpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -785,7 +785,7 @@ if(!empty($AvlBudAmt))
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'RMCIncludingCustomers','value' => set_value('RMCIncludingCustomers'),'id'=>'RMCIncludingCustomers', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
||||
$data = array('name' => 'RMCIncludingCustomers','value' => set_value('RMCIncludingCustomers'),'id'=>'RMCIncludingCustomers', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1347,6 +1347,35 @@ function Ratechange(){
|
||||
if($('#Highseas').val()!='' && $('#AfterLandingCharge').val()!=''){
|
||||
$('#AfterHighseas').val(calculateHighseasCharge($('#AfterLandingCharge').val(),$('#AfterBasicPriceTax').val(),$('#Highseas').val()));
|
||||
|
||||
if($('#Customduty').val()!='' && $('#AfterHighseas').val()!=''){
|
||||
$('#AfterCustomduty').val(calculateCustomdutyCharge($('#AfterLandingCharge').val(),$('#AfterBasicPriceTax').val(),$('#AfterHighseas').val(),$('#Customduty').val()));
|
||||
if($('#AfterCustomduty').val()!='' && $('#ExcisedutyTax').val()!=''){
|
||||
$('#AfterExcisedutyTax').val(calculateExciseCharge($('#AfterLandingCharge').val(),$('#AfterBasicPriceTax').val(),$('#AfterHighseas').val(),$('#AfterCustomduty').val(),$('#ExcisedutyTax').val()));
|
||||
|
||||
if($('#AfterExcisedutyTax').val()!='' && $('#ExcisedutyEDcess').val()!=''){
|
||||
$('#AfterExcisedutyEDcess').val(calculateExciseEDcessCharge($('#AfterExcisedutyTax').val(),$('#ExcisedutyEDcess').val()));
|
||||
|
||||
if($('#AfterExcisedutyTax').val()!='' && $('#ExcisedutySHcess').val()!=''){
|
||||
$('#AfterExcisedutySHcess').val(calculateExciseSHcessCharge($('#AfterExcisedutyTax').val(),$('#ExcisedutySHcess').val()));
|
||||
|
||||
}
|
||||
else{
|
||||
alert('Please Enter Excise duty S & H cess');
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('Please Enter Excise Duty ED_cess');
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('Please Enter Excise Duty');
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('Please Enter Custom Duty');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1361,12 +1390,12 @@ alert('Please Enter Landing Charge ')
|
||||
|
||||
calculateTotalOrdervalue();
|
||||
|
||||
var res = ExceedBudget($('#TotalOrderValue').val(), $('#CapitalbudAmt').val());
|
||||
if(!res)
|
||||
{
|
||||
$('#CPRate').focus();
|
||||
return false;
|
||||
}
|
||||
// var res = ExceedBudget($('#TotalOrderValue').val(), $('#CapitalbudAmt').val());
|
||||
//if(!res)
|
||||
// {
|
||||
// $('#CPRate').focus();
|
||||
// return false;
|
||||
// }
|
||||
}
|
||||
}
|
||||
else{
|
||||
@ -1466,7 +1495,7 @@ Calculate Landing charge
|
||||
*/
|
||||
|
||||
function calculateLandingCharge(landingCharge,basicValue){
|
||||
var landCharge = parseFloat(landingCharge);
|
||||
var landCharge = landingCharge;
|
||||
var basicPrice = parseFloat(basicValue);
|
||||
afterLandingCharge = <?php echo Capital_Landing_Charge; ?>;
|
||||
|
||||
@ -1475,19 +1504,63 @@ return parseFloat(afterLandingCharge).toFixed(2);
|
||||
|
||||
}
|
||||
/*Calculate Highseas Charge*/
|
||||
function calculateHighseasCharge(AfterLanding,basicPrice,Highseas){
|
||||
var afterLandingCharge = AfterLanding;
|
||||
var basicPrice = basicPrice;
|
||||
var highSeas = Highseas;
|
||||
alert(afterLandingCharge);
|
||||
alert(basicPrice);
|
||||
alert(highSeas);
|
||||
var karthi = (afterLandingCharge+basicPrice) * (highSeas/100);
|
||||
alert(karthi);
|
||||
function calculateHighseasCharge(AfterLanding,basicPrices,Highseass){
|
||||
var afterLandingCharge = parseFloat(AfterLanding);
|
||||
var basicPrice = parseFloat(basicPrices);
|
||||
var highSeas = Highseass;
|
||||
afterHighseasCharge = <?php echo Capital_Highseas_Charge; ?>;
|
||||
|
||||
return parseFloat(afterHighseasCharge).toFixed(2);
|
||||
|
||||
}
|
||||
/*Calculate calculate Customduty Charge */
|
||||
function calculateCustomdutyCharge(AfterLanding,basicPrices,afterHighseass,Customduty){
|
||||
var afterLandingCharge = parseFloat(AfterLanding);
|
||||
var basicPrice = parseFloat(basicPrices);
|
||||
var afterHighseas = parseFloat(afterHighseass);
|
||||
var Customduty = Customduty;
|
||||
|
||||
|
||||
afterCustomdutyCharge = <?php echo Capital_Customduty_Charge; ?>;
|
||||
|
||||
return parseFloat(afterCustomdutyCharge).toFixed(2);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
calculate Excise Charge
|
||||
*/
|
||||
function calculateExciseCharge(AfterLanding,basicPrices,afterHighseass,afterCustomduty,Excise){
|
||||
var afterLandingCharge = parseFloat(AfterLanding);
|
||||
var basicPrice = parseFloat(basicPrices);
|
||||
var afterHighseas = parseFloat(afterHighseass);
|
||||
var afterCustomduty = parseFloat(afterCustomduty);
|
||||
var Excise = Excise;
|
||||
|
||||
|
||||
afterExciseCharge = <?php echo Capital_Excise_Charge; ?>;
|
||||
|
||||
return parseFloat(afterExciseCharge).toFixed(2);
|
||||
|
||||
}
|
||||
/* calculateExciseEDcessCharge*/
|
||||
function calculateExciseEDcessCharge(ExciseDuty,ExciseEDcessCharge){
|
||||
|
||||
var ExciseDuty = parseFloat(ExciseDuty);
|
||||
var ExciseEDcessCharge = ExciseEDcessCharge;
|
||||
afterExciseEDcessCharge = <?php echo Capital_ExciseEDcess_Charge; ?>;
|
||||
|
||||
return parseFloat(afterExciseEDcessCharge).toFixed(2);
|
||||
}
|
||||
|
||||
/* calculate Excise duty S & H cess :(d) */
|
||||
function calculateExciseSHcessCharge(ExciseDuty,ExciseSHcessCharge){
|
||||
|
||||
var ExciseDuty = parseFloat(ExciseDuty);
|
||||
var ExciseSHcessCharge = ExciseSHcessCharge;
|
||||
afterExciseSHcessCharge = <?php echo Capital_ExciseSHcess_Charge; ?>;
|
||||
|
||||
return parseFloat(afterExciseSHcessCharge).toFixed(2);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1507,4 +1580,4 @@ function calculateTotalOrdervalue()
|
||||
$('#TotalOrderValue').val( parseFloat(TotAmt).toFixed(2));
|
||||
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@ -1589,6 +1589,9 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
|
||||
$('#Quantity').focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function ExceedEditQuantityCheck()
|
||||
@ -1602,6 +1605,9 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
|
||||
$('#EditQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// To Reset the Tax calculation
|
||||
function resetTaxField()
|
||||
@ -3091,7 +3097,7 @@ $("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||
});
|
||||
$('.AddRevenue').click(function(){
|
||||
|
||||
if(validateRevenueTax() && validateExceedLimit() && ExceedQuantityCheck)
|
||||
if(validateRevenueTax() && validateExceedLimit() && ExceedQuantityCheck())
|
||||
{
|
||||
var temp = index;
|
||||
var Reqnumber = $('#ReqNo').val();
|
||||
@ -3213,7 +3219,6 @@ $('.AddRevenue').click(function(){
|
||||
});
|
||||
$('.EditRevenue').click(function(){
|
||||
|
||||
|
||||
if(validateEditRevenueTax() && validateEditExceedLimit() && ExceedEditQuantityCheck())
|
||||
{
|
||||
//alert('inside Add');
|
||||
@ -3421,7 +3426,7 @@ function populateValueMainFormForEditRevenueTax()
|
||||
|
||||
} while (i < rows);
|
||||
|
||||
alert(totOrderSummaryAmt);
|
||||
// alert(totOrderSummaryAmt);
|
||||
$('#txtTotBasicAmount').val(parseFloat(totBasicAmt).toFixed(2) );
|
||||
$('#txtTotalDiscount').val(parseFloat(totDiscountAmt).toFixed(2) );
|
||||
$('#txtTotalPackaing').val(parseFloat(totPackagingAmt).toFixed(2) );
|
||||
|
||||
@ -28,7 +28,8 @@ function myFunction() {
|
||||
}
|
||||
function validate()
|
||||
{
|
||||
|
||||
var PoType = $('#POType').val();
|
||||
var currencyType = $('#currencytype').val();
|
||||
if($('#PODate').val() == '')
|
||||
{
|
||||
alert('Please Enter the Purchase Order date');
|
||||
@ -53,6 +54,23 @@ function validate()
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
else if(PoType=='CAPITAL'){
|
||||
if(currencyType=='0'){
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#ExchangeRt').val()==''){
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRt').focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user