'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);
?>
@@ -785,7 +785,7 @@ if(!empty($AvlBudAmt))
'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);
?>
@@ -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 = ;
@@ -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 = ;
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 = ;
+
+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 = ;
+
+return parseFloat(afterExciseCharge).toFixed(2);
+
+}
+/* calculateExciseEDcessCharge*/
+function calculateExciseEDcessCharge(ExciseDuty,ExciseEDcessCharge){
+
+var ExciseDuty = parseFloat(ExciseDuty);
+var ExciseEDcessCharge = ExciseEDcessCharge;
+afterExciseEDcessCharge = ;
+
+return parseFloat(afterExciseEDcessCharge).toFixed(2);
+}
+
+/* calculate Excise duty S & H cess :(d) */
+function calculateExciseSHcessCharge(ExciseDuty,ExciseSHcessCharge){
+
+var ExciseDuty = parseFloat(ExciseDuty);
+var ExciseSHcessCharge = ExciseSHcessCharge;
+afterExciseSHcessCharge = ;
+
+return parseFloat(afterExciseSHcessCharge).toFixed(2);
}
/*
@@ -1507,4 +1580,4 @@ function calculateTotalOrdervalue()
$('#TotalOrderValue').val( parseFloat(TotAmt).toFixed(2));
}
-
+
\ No newline at end of file
diff --git a/application/views/purchaseorder.php b/application/views/purchaseorder.php
index ea75feb9..92b57e16 100755
--- a/application/views/purchaseorder.php
+++ b/application/views/purchaseorder.php
@@ -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) );
diff --git a/assets/js/CreatePOValidation.js b/assets/js/CreatePOValidation.js
index 44314b24..968529a8 100755
--- a/assets/js/CreatePOValidation.js
+++ b/assets/js/CreatePOValidation.js
@@ -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
{