revenuepo
This commit is contained in:
parent
dfe7a54b2c
commit
01533b91f3
@ -185,14 +185,15 @@ define('GSTTAX', '((GSTValue/100) * basicValue)')
|
||||
define('OTHERTAX', '((OtherTaxValue/100) * basicValue)');
|
||||
//Freight Tax
|
||||
define('FREIGHT_PERCENTAGE', '((FreightValue/100) * basicValue)');
|
||||
define('FREIGHT_PERCENTAGE_AFTER', '((FreightValue/100) * (basicValue-AfterDiscount))');
|
||||
define('FREIGHT_LUMPSUM', 'FreightValue');
|
||||
define('FREIGHT_PERUOM', 'FreightValue * Quantity');
|
||||
define('FREIGHT_PERTRIP', 'FreightValue');
|
||||
|
||||
/* SERVICE PO VARIABLES */
|
||||
define('SERVICETAX_SERVICETAX_14PERCENT', '((14/100) * basicValue)');
|
||||
define('SERVICETAX_EDUCESS_2PERCENT', '((2/100) * ServiceTaxAmount)');
|
||||
define('SERVICETAX_HIGHEREDUCESS_1PERCENT', '((1/100) * ServiceTaxAmount)');
|
||||
define('SERVICETAX_SERVICETAX_14PERCENT', '((14/100) * basicValue)');
|
||||
define('SERVICETAX_EDUCESS_2PERCENT', '((2/100) * ServiceTaxAmount)');
|
||||
define('SERVICETAX_HIGHEREDUCESS_1PERCENT', '((1/100) * ServiceTaxAmount)');
|
||||
define('SERVICETAX_KRISHIKALYAN', '(((.5)/100) * basicValue)');
|
||||
define('SERVICETAX_SWACHHBHARAT', '(((.5)/100) * basicValue)');
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ if(!empty($RequistionDetails))
|
||||
?>
|
||||
<style>
|
||||
|
||||
#packagingcalmodel {
|
||||
#packagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
@ -668,7 +668,7 @@ $('#drpViewFreight').change(function() {
|
||||
$('#ViewTripsValue').hide();
|
||||
}
|
||||
|
||||
selValue = $("#drpEditFreight").val() ;
|
||||
selValue = $("#drpViewFreight").val() ;
|
||||
$('#txtViewFreight').val('');
|
||||
$('#txtViewAfterFreight').val('');
|
||||
if(selValue == PercentageType)
|
||||
@ -1028,7 +1028,7 @@ function calculatePackaging(isEdit)
|
||||
else
|
||||
{
|
||||
var AfterDiscount =parseFloat($('#txtAfterDiscount').val());
|
||||
var AfterPackaging = parseFloat($('#txtAfterPackaging').val());
|
||||
var AfterPackaging = parseFloat($('#txtAfterPackaging').val());
|
||||
AfterExciseDuty = <?php echo EXCISE_ONBASIC_DISCOUNT_PACKAGING; ?>;
|
||||
}
|
||||
}
|
||||
@ -1654,7 +1654,7 @@ function calculatePackaging(isEdit)
|
||||
{
|
||||
if($('#EditMaterialCode').val() == "0")
|
||||
{
|
||||
alert('Please Select the Material Code');
|
||||
// alert('Please Select the Material Code');
|
||||
$('#EditMaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
@ -1750,10 +1750,10 @@ function calculatePackaging(isEdit)
|
||||
}else if(isEdit == '2')// for view model freight calculation
|
||||
{
|
||||
|
||||
//alert("Working");
|
||||
//alert("view Frieght");
|
||||
if($('#ViewMaterialCode').val() == "0")
|
||||
{
|
||||
alert('Please Select the Material Code');
|
||||
// alert('Please Select the Material Code');
|
||||
$('#ViewMaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
@ -1786,7 +1786,7 @@ function calculatePackaging(isEdit)
|
||||
// }
|
||||
if(FreightType == PercentageType)
|
||||
{
|
||||
if($(FreightCalculation != 0 && '#txtEditAfterDiscount').val() == '')
|
||||
if($(FreightCalculation != 0 && '#txtViewAfterDiscount').val() == '')
|
||||
{
|
||||
alert('Please Enter the Discount value');
|
||||
$('#txtViewFreight').val('');
|
||||
@ -1837,13 +1837,24 @@ function calculatePackaging(isEdit)
|
||||
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
|
||||
|
||||
$('#txtViewAfterFreight').val(AfterFreightval);
|
||||
RevenueChangeSgst();
|
||||
//RevenueChangeviewSgst();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#txtViewAfterFreight').val("0.00");
|
||||
}
|
||||
|
||||
//$('#AfterCgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Cgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val(),$("#txtAfterPackaging").val()== '' ? "0.00" : $('#txtAfterPackaging').val(),$("#txtAfterFreight").val()== '' ? "0.00" : $('#txtAfterFreight').val()));
|
||||
basicvalue = $('#txtViewBasicValue').val();
|
||||
cgst= $('#ViewCGST').val();
|
||||
sgst= $('#ViewSGST').val();
|
||||
igst= $('#ViewIGST').val();
|
||||
//alert(sgst);
|
||||
afterdiscount= $('#txtViewAfterDiscount').val();
|
||||
packaging12= $('#txtViewAfterPackaging').val();
|
||||
freight12= $('#txtViewAfterFreight').val();//ViewAfterCGST
|
||||
calculateCgstTax(basicvalue,cgst,afterdiscount,packaging12,freight12);
|
||||
calculateSgstTax(basicvalue,sgst,afterdiscount,packaging12,freight12);
|
||||
calculateIgstTax(basicvalue,igst,afterdiscount,packaging12,freight12)
|
||||
}
|
||||
calculateViewTotalValue();
|
||||
}
|
||||
@ -2085,7 +2096,7 @@ function validateEditExceedLimit()
|
||||
|
||||
function calculateViewTotalValue()
|
||||
{
|
||||
var Packaging = $('#txtViewPackaging').val() == '' ? '0.00' : $('#txtViewPackaging').val();
|
||||
var Packaging = $('#txtViewAfterPackaging').val() == '' ? '0.00' : $('#txtViewAfterPackaging').val();
|
||||
var AfterCgst = $("#ViewAfterCGST").val();
|
||||
|
||||
var AfterSgst = $("#ViewAfterSGST").val();
|
||||
@ -2528,6 +2539,35 @@ function calculateEditTaxValue()
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="viewcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Packing Calculation On</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="optview" checked="checked" value='0' id="optview"> Basic Amount</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="optview" id="optview" value='1' > After Discount Amount</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<a class="btn btn-primary" ID="PackagingOption" onclick="SetPackagingOption();" style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
||||
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal for Excise Duty Calculation-->
|
||||
@ -3398,7 +3438,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
<div id="VIEWREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div id="VIEWREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
@ -3574,7 +3614,7 @@ function calculateEditTaxValue()
|
||||
<label>Packaging Type </label>
|
||||
<div>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$data = array('name' => 'ViewPackagingType','value' => set_value('ViewPackagingType'),'id'=>'ViewPackagingType', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
@ -3603,7 +3643,7 @@ function calculateEditTaxValue()
|
||||
<label>SGST In %</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewSGST','value' => set_value('ViewSGST'),'id'=>'ViewSGST', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>' calculateGST(0);','readonly' => 'true');
|
||||
$data = array('name' => 'ViewSGST','value' => set_value('ViewSGST'),'id'=>'ViewSGST', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateGST(0);','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -4241,6 +4281,9 @@ clearRevenueModalFields();
|
||||
var FreightVal = $("#txtViewFreight").val();
|
||||
var AfterFreightVal = $("#txtViewAfterFreight").val();
|
||||
var NoOfTrip = $("#ViewNOOfTrips").val();
|
||||
var Cgst = $("#ViewAfterCGST").val();
|
||||
var Sgst = $("#ViewAfterSGST").val();
|
||||
var Igst = $("#ViewAfterIGST").val();
|
||||
if(FreightType != 'PER TRIP'){
|
||||
NoOfTrip=0;
|
||||
}
|
||||
@ -4264,8 +4307,8 @@ clearRevenueModalFields();
|
||||
$('#FreightVal'+userid).val(FreightVal);
|
||||
$('#AfterFreightVal'+userid).val(AfterFreightVal);
|
||||
$('#NoOfTrip'+userid).val(NoOfTrip);
|
||||
|
||||
|
||||
$('#RevenueAfterCgst'+userid).val(Cgst);
|
||||
$('#RevenueAfterSgst'+userid).val(Sgst);
|
||||
$('#TotalOrderValue'+userid).val(TotalOrderValue);
|
||||
|
||||
|
||||
@ -4464,34 +4507,41 @@ function validateEditRevenueTax()
|
||||
}
|
||||
function calculateCgstTax(varBasicValue,Cgst,discount,pack,freight)
|
||||
{
|
||||
var discount = discount;
|
||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||
|
||||
//alert("Working");
|
||||
var discount1 = discount;
|
||||
//alert('dis'+discount1);
|
||||
var basicValue1 = parseFloat(varBasicValue-discount1);
|
||||
//alert('basicValue1'+basicValue1);
|
||||
var packaging = parseFloat(pack);
|
||||
|
||||
var freight = parseFloat(freight);
|
||||
|
||||
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
||||
|
||||
//alert('packaging'+packaging);
|
||||
var freight1 = parseFloat(freight);
|
||||
//alert('freight1'+freight1);
|
||||
var packfreight =parseFloat(packaging)+parseFloat(freight1);
|
||||
//alert('packfreight'+packfreight);
|
||||
var basicValue =parseFloat(basicValue1+packfreight)
|
||||
var Cgst = parseFloat(Cgst);
|
||||
var Cgst = parseFloat(Cgst);
|
||||
//alert(basicValue+'-'+Cgst);
|
||||
var ServiceTaxValue = 0.0;
|
||||
|
||||
ServiceTaxValue = <?php echo SERVICETAX_CGST; ?>;
|
||||
ServiceTaxValue = <?php echo SERVICETAX_CGST; ?>;//((Cgst/100) * basicValue)
|
||||
|
||||
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
|
||||
|
||||
return TAXval;// $('#AfterServiceTax').val(TAXval);
|
||||
|
||||
//alert('FInal' + TAXval);
|
||||
|
||||
$('#ViewAfterCGST').val(TAXval);
|
||||
$('#ViewAfterSGST').val(TAXval);
|
||||
return TAXval;
|
||||
}
|
||||
function calculateSgstTax(varBasicValue,Sgst,discount,pack,freight)
|
||||
{
|
||||
var discount = discount;
|
||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||
var discount1 = discount;
|
||||
var basicValue1 = parseFloat(varBasicValue-discount1);
|
||||
var packaging = parseFloat(pack);
|
||||
//alert('f'+packaging);
|
||||
var freight = parseFloat(freight);
|
||||
var freight1 = parseFloat(freight);
|
||||
|
||||
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
||||
var packfreight =parseFloat(packaging)+parseFloat(freight1);
|
||||
|
||||
var basicValue =parseFloat(basicValue1+packfreight)
|
||||
var Sgst = parseFloat(Sgst);
|
||||
@ -4849,6 +4899,15 @@ if(getEditTypeOfTax==0){
|
||||
$('#EditSgst').val($('#EditCgst').val());
|
||||
Editchange();
|
||||
}
|
||||
}
|
||||
function RevenueChangeviewSgst(){
|
||||
var getTypeOfTax= $("input:radio[name='Range']:checked").val();
|
||||
|
||||
if(getTypeOfTax==0){
|
||||
$('#ViewSGST').val($('#ViewCGST').val());
|
||||
change();
|
||||
}
|
||||
|
||||
}
|
||||
function change(){
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user