import total frieght value change and revenue frieght value and capital label changes

This commit is contained in:
venbatechnologies@gmail.com 2017-10-17 15:47:24 +05:30
parent 7584ef0f2f
commit dfe7a54b2c
11 changed files with 820 additions and 263 deletions

1
application/views/EditPurchaseOrder.php Executable file → Normal file
View File

@ -34,6 +34,7 @@ if(!empty($PODetail))
{
foreach ($PODetail as $PO)
{
//print_r($PODetail);
$PONO = $PO->PONO;
$POType = $PO->POType;
$PODate = $PO->PODate;

198
application/views/alterpurchaseorder.php Executable file → Normal file
View File

@ -37,6 +37,10 @@ if(!empty($INRSYMBOL))
#packagingcalmodel {
margin-top:200px;
z-index: 1080 !important;
}
#freightmodel {
margin-top:200px;
z-index: 1080 !important;
}
#ExciseDutyCalModel {
margin-top:200px;
@ -146,6 +150,7 @@ if(!empty($INRSYMBOL))
var PercentageType = '<?php echo PERCENTAGE;?>';
var POMaxDate = '<?php echo $MaxPoDate;?>';
var PackagingCalculation = '';
var freightCalculation = '';
var ExciseCalculation = '';
var StateTaxCheck = '';
var VatCalculation = '';
@ -313,6 +318,7 @@ var SelectedMaterialList = {
$('#txtDiscount').attr('readonly', 'true');
$('#txtDiscount').val('0.00');
$('#txtAfterDiscount').val('0.00');
change();
}
else
@ -336,13 +342,15 @@ var SelectedMaterialList = {
$('#txtEditDiscount').attr('readonly', 'true');
$('#txtEditDiscount').val('0.00');
$('#txtEditAfterDiscount').val('0.00');
change();
}
else
{
$('#txtEditDiscount').removeAttr( 'readonly','true' );
$('#txtEditDiscount').val('');
$('#txtEditAfterDiscount').val('');
change();
}
}
else
@ -372,13 +380,14 @@ var SelectedMaterialList = {
$('#txtPackaging').attr('readonly', 'true');
$('#txtPackaging').val('0.00');
$('#txtAfterPackaging').val('0.00');
change();
}
else
{
$('#txtPackaging').removeAttr( 'readonly','true' );
}
}
calculatePackaging(0);
change();
});
$('#EditPackagingType').change(function() {
$('#txtEditPackaging').val('');
@ -397,13 +406,14 @@ var SelectedMaterialList = {
$('#txtEditPackaging').attr('readonly', 'true');
$('#txtEditPackaging').val('0.00');
change();
}
else
{
$('#txtEditPackaging').removeAttr( 'readonly','true' );
}
}
calculatePackaging(1);
change();
});
$('#txtExciseDuty').change(function() {
@ -432,9 +442,17 @@ var SelectedMaterialList = {
});
$('#drpEditFreight').change(function() {
$('#txtEditFreight').val('');
$('#txtEditAfterFreight').val('');
var FreightType =$("#drpEditFreight").val();
if (FreightType == "PER TRIP")
// selValue = $("#drpFreight").val() ;
if(FreightType == PercentageType)
{
var freightCalculation = '';
$('#freightmodel').modal('show');
// $('#txtEditAfterFreight').removeAttr( 'readonly','true' );
}
else if (FreightType == "PER TRIP")
{
$('#EditTripsValue').show();
@ -445,6 +463,7 @@ var SelectedMaterialList = {
}
calculateFreight(1);
});
//add //
$('#drpFreight').change(function() {
var FreightType =$("#drpFreight").val();
@ -459,14 +478,19 @@ var SelectedMaterialList = {
}
selValue = $("#drpFreight").val() ;
if (selValue == NilType)
if(selValue == PercentageType)
{
var freightCalculation = '';
$('#freightmodel').modal('show');
$('#txtFreight').removeAttr( 'readonly','true' );
}
else if (selValue == NilType)
{
$('#txtFreight').attr('readonly', 'true');
$('#txtFreight').val('0.00');
$('#txtAfterFreight').val('0.00');
change();
}
else
{
@ -475,7 +499,7 @@ var SelectedMaterialList = {
}
calculateFreight(0);
change();
});
});
@ -525,7 +549,8 @@ function calculateDiscount(isEdit)
}
else if(DiscountType == NilType )
{
AfterDiscount = "0.00";
AfterDiscount = "0.00";
}
else
{
@ -659,7 +684,8 @@ function calculatePackaging(isEdit)
}
else if(PackagingType == NilType )
{
AfterPackaging = "0.00";
AfterPackaging = 0.00;
//Change();
}
else
@ -672,6 +698,7 @@ function calculatePackaging(isEdit)
var Packaging = parseFloat(AfterPackaging).toFixed(2);
$('#txtAfterPackaging').val(Packaging);
//RevenueChangeSgst();
}
else
{
@ -736,6 +763,8 @@ function calculatePackaging(isEdit)
else if(PackagingType == NilType )
{
AfterPackaging = "0.00";
// $('#txtEditAfterPackaging').val(AfterPackaging);
//RevenueChangeSgst();
}
else
{
@ -746,6 +775,7 @@ function calculatePackaging(isEdit)
var Packaging = parseFloat(AfterPackaging).toFixed(2);
$('#txtEditAfterPackaging').val(Packaging);
//RevenueChangeEditSgst();
}
else
{
@ -1471,7 +1501,7 @@ function calculatePackaging(isEdit)
{
alert('Please Enter the Rate value');
$('#Rate').focus();
$('#txtFreight').val('') ;
$('#txtFreight').val('');
return false;
}
else
@ -1492,13 +1522,30 @@ function calculatePackaging(isEdit)
var Quantity = parseFloat($('#Quantity').val());
//alert(FreightType);
var AfterFreight = 0.0;
// if(FreightType == PercentageType)
// {
// AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
// }
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
{
if($(freightCalculation != 0 && '#txtAfterDiscount').val() == '')
{
alert('Please Enter the Discount value');
$('#txtFreight').val('');
$('#DiscountType').focus();
return false;
}
else
{
var AfterDiscount =parseFloat($('#txtAfterDiscount').val());
AfterFreight = freightCalculation == 0 ? <?php echo FREIGHT_PERCENTAGE;?> : <?php echo FREIGHT_PERCENTAGE_AFTER;?> ;
}
}
else if(FreightType == NilType)
{
AfterFreight = 0.0;
AfterFreight = 0.0;
}
else if(FreightType == '<?php echo LUMPSUM;?>')
{
@ -1533,6 +1580,7 @@ function calculatePackaging(isEdit)
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtAfterFreight').val(AfterFreightval);
}
else
{
@ -1540,6 +1588,8 @@ function calculatePackaging(isEdit)
}
}
calculateTotalValue();
}
else
@ -1575,10 +1625,26 @@ function calculatePackaging(isEdit)
var Quantity = parseFloat($('#EditRevenueQuantity').val());
//alert(FreightType);
var AfterFreight = 0.0;
// if(FreightType == PercentageType)
// {
// AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
// }
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
{
if($(freightCalculation != 0 && '#txtEditAfterDiscount').val() == '')
{
alert('Please Enter the Discount value');
$('#txtEditFreight').val('');
$('#DiscountType').focus();
return false;
}
else
{
var AfterDiscount =parseFloat($('#txtEditAfterDiscount').val());
AfterFreight = freightCalculation == 0 ? <?php echo FREIGHT_PERCENTAGE;?> : <?php echo FREIGHT_PERCENTAGE_AFTER;?> ;
}
}
else if(FreightType == NilType)
{
AfterFreight = 0.0;
@ -1614,6 +1680,7 @@ function calculatePackaging(isEdit)
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtEditAfterFreight').val(AfterFreightval);
//Editchange();
}
else
{
@ -1631,6 +1698,11 @@ function calculatePackaging(isEdit)
{
PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
$('#packagingcalmodel').modal('hide');
}
function setfreightOption()
{
freightCalculation = $("input:radio[name='optfreight']:checked").val();
$('#freightmodel').modal('hide');
}
/* Set the Packaging calculation option for calculating Packaging */
function SetExciseCalculation()
@ -1699,11 +1771,18 @@ function SetExciseCalculationCancel()
if($("#EditDiscountType").val()!=0){
calculateDiscount(isEdit);
}
var discount = $('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val();
var basic = $('#txtEditRevenueBasicValue').val();
var basicValue = parseFloat(basic-discount);
var discount = $('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val();
var basic = $('#txtEditRevenueBasicValue').val() == '' ? '0.00' : $('#txtEditRevenueBasicValue').val();
var basicValue1 = parseFloat(basic-discount);
var packaging = $('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val();
//alert(packaging);
var freight =$('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val();
//alert(freight);
var packfreight = parseFloat(packaging)+parseFloat(freight);
var basicValue = parseFloat(basicValue1+packfreight);
//alert(basicValue);
if($("#RevenueEditCgst").val()!=''){
$('#RevenueEditAfterCgst').val(calculateCgstTax(basicValue,$('#RevenueEditCgst').val()));
}
else{
@ -1737,9 +1816,13 @@ function SetExciseCalculationCancel()
}
}
function RevenueChangeSgst(){
function RevenueChangeSgst()
{
var getTypeOfTax= $("input:radio[name='Range']:checked").val();
if(getTypeOfTax==0){
$('#RevenueSgst').val($('#RevenueCgst').val());
change();
}
@ -1770,9 +1853,14 @@ Editchange();
calculatePackaging(isEdit);
}
var discount = $('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val();
var basic = $('#txtBasicValue').val();
var basicValue = parseFloat(basic-discount);
var discount = $('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val();
var basic = $('#txtBasicValue').val() == '' ? '0.00' : $('#txtBasicValue').val();
var basicValue1 = parseFloat(basic-discount);
var packaging = $('#txtAfterPackaging').val()== '' ? '0.00' : $('#txtAfterPackaging').val();
var freight =$('#txtAfterFreight').val()== '' ? '0.00' : $('#txtAfterFreight').val();
var packfreight = parseFloat(packaging)+parseFloat(freight);
var basicValue = parseFloat(basicValue1+packfreight);
//alert(basicValue);
if($("#RevenueCgst").val()!=''){
$('#RevenueAfterCgst').val(calculateCgstTax(basicValue,$('#RevenueCgst').val()));
@ -1798,6 +1886,7 @@ Editchange();
if($("#drpFreight").val()!=0){
calculateFreight(isEdit);
}
@ -1898,6 +1987,7 @@ Editchange();
$('#txtTotalOrderValue').val('');
ExciseCalculation = '';
PackagingCalculation = '';
freightCalculation='';
VatCalculation = '';
CSTCalculation = '';
}
@ -2630,6 +2720,35 @@ function populateValueMainFormForDeleteItem(rowid)
</div>
</div>
</div>
</div>
<div id="freightmodel" 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">
<h4 class="modal-title">Freight Calculation On</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="optfreight" checked="checked" value='0' id="optfreight"> Basic Amount</label>
</div>
<div class="radio">
<label><input type="radio" name="optfreight" id="optfreight" value='1' > After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="freightOption" onclick="setfreightOption();" style="margin-top: -24px;">&nbsp;&nbsp;<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>
@ -2729,7 +2848,7 @@ function populateValueMainFormForDeleteItem(rowid)
</div>
</div>
<!-- Edit Service Modal content-->
<div class="modal fade" id="EDITSERVICE" role="dialog">
<div class="modal fade" id="EDITSERVICE" role="dialog" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
<form>
@ -3052,8 +3171,8 @@ function populateValueMainFormForDeleteItem(rowid)
</div>
</div>
<!-- Edit Revenue Modal -->
<div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div id="EDITREVENUE" 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>
<div class="modal-content" style="width:1150px;">
@ -3259,7 +3378,7 @@ function populateValueMainFormForDeleteItem(rowid)
<label>Packaging Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditPackaging','value' => set_value('txtEditPackaging'),'id'=>'txtEditPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculatePackaging(1);','style'=>'text-align:right;');
$data = array('name' => 'txtEditPackaging','value' => set_value('txtEditPackaging'),'id'=>'txtEditPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculatePackaging(1);Editchange();','style'=>'text-align:right;');
echo form_input($data);
?>
</div>
@ -3350,7 +3469,7 @@ function populateValueMainFormForDeleteItem(rowid)
<label>Freight Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditFreight','value' => set_value('txtEditFreight'),'id'=>'txtEditFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreight(1);','style'=>'text-align:right;');
$data = array('name' => 'txtEditFreight','value' => set_value('txtEditFreight'),'id'=>'txtEditFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreight(1);Editchange();','style'=>'text-align:right;');
echo form_input($data);
?>
</div>
@ -3594,7 +3713,7 @@ function populateValueMainFormForDeleteItem(rowid)
<label>Packaging Rate <span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<div class="form-group">
<?php
$data = array('name' => 'txtPackaging','value' => set_value('txtPackaging'),'id'=>'txtPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculatePackaging(0);');
$data = array('name' => 'txtPackaging','value' => set_value('txtPackaging'),'id'=>'txtPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculatePackaging(0);change();');
echo form_input($data);
?>
</div>
@ -3686,7 +3805,7 @@ function populateValueMainFormForDeleteItem(rowid)
<label>Freight Rate <span class="badge" style="color:red;text-align:right;background-color: #fff ;"></label>
<div class="form-group">
<?php
$data = array('name' => 'txtFreight','value' => set_value('txtFreight'),'id'=>'txtFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreight(0);');
$data = array('name' => 'txtFreight','value' => set_value('txtFreight'),'id'=>'txtFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreight(0);change();');
echo form_input($data);
?>
</div>
@ -5325,6 +5444,7 @@ function populateValueMainFormForDeleteItem(rowid)
var AfterDisVal = $("#txtAfterDiscount").val();
var PackOption = PackagingCalculation ;
var Frioption = freightCalculation;
var PackType = $("#PackagingType").val();
var PackVal = $("#txtPackaging").val();
var AfterPackVal = $("#txtAfterPackaging").val();
@ -6081,16 +6201,21 @@ function populateValueMainFormForDeleteItem(rowid)
{
var basicValue = parseFloat(varBasicValue);
var Cgst = parseFloat(Cgst);
alert(basicValue);
var Cgst = parseFloat(Cgst);
//alert(Cgst);
var ServiceTaxValue = 0.0;
ServiceTaxValue = <?php echo SERVICETAX_CGST; ?>;
// alert("Tax"+ ServiceTaxValue );
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
function calculateSgstTax(varBasicValue,Sgst)
{
@ -6226,9 +6351,9 @@ function populateValueMainFormForDeleteItem(rowid)
addHidden(theForm,"quantity"+temp,quantity);
addHidden(theForm,"itemRate"+temp,itemRate);
addHidden(theForm,"Cgst"+temp,Cgst);
addHidden(theForm,"AfterCgst"+temp,AfterCgst);
addHidden(theForm,"Sgst"+temp,Sgst);
addHidden(theForm,"AfterSgst"+temp,AfterSgst);
addHidden(theForm,"AfterCgst"+temp,AfterCgst);
addHidden(theForm,"Sgst"+temp,Sgst);
addHidden(theForm,"AfterSgst"+temp,AfterSgst);
addHidden(theForm,"Igst"+temp,Igst);
addHidden(theForm,"AfterIgst"+temp,AfterIgst);
addHidden(theForm,"Frequency"+temp,Frequency);
@ -7228,6 +7353,7 @@ $('.EditRevenue').click(function(){
var AfterDisVal = $("#txtEditAfterDiscount").val();
var PackOption = PackagingCalculation ;
var Frioption = freightCalculation;
var PackType = $("#EditPackagingType").val();
var PackVal = $("#txtEditPackaging").val();
var AfterPackVal = $("#txtEditAfterPackaging").val();

View File

@ -840,7 +840,7 @@ function vaildateBeforeOpenModal()
<div align="right">
<div class="modal fade" id="CAPITAL" role="dialog">
<div class="modal fade" id="CAPITAL" role="dialog" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
<form>
@ -1211,7 +1211,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4" >
Basic Price In <?php echo "($INR)"?>:
Basic Price <?php echo "($INR)"?>
</div>
<div class="col-md-4" style="display:none;">
<div class="form-group">
@ -1274,7 +1274,7 @@ function vaildateBeforeOpenModal()
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom duty : (B)<?php echo "($INR)"?>
Custom duty (B)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1298,7 +1298,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
Custom ED_cess : (C)
Custom ED_cess (C)
</div>
<div class="col-md-4">
<div class="form-group">
@ -1319,7 +1319,7 @@ function vaildateBeforeOpenModal()
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom S & H cess : (D)
Custom S & H cess (D)
</div>
<div class="col-md-4">
<div class="form-group">
@ -1342,7 +1342,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4">
Subtotal (E) :<?php echo "($INR) (A+B+C+D)"?>
Subtotal (E) <?php echo "($INR) (A+B+C+D)"?>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -1371,9 +1371,9 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
<!-- Additional Excise duty : (g) -->
<!-- <label><?php echo "IGST on (E): (F) ($INR)";?></label> -->
<!-- <label><?php echo "IGST on (F) ($INR)";?></label> -->
IGST on (E):<?php echo "($INR)";?>
IGST on (E) (F)<?php echo "($INR)";?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1403,7 +1403,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-8">
Total Duty <?php echo "($INR) (B+C+D+E)"?>
Total Duty (G) <?php echo "($INR) (B+C+D+F)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1584,7 +1584,7 @@ function vaildateBeforeOpenModal()
<div class="modal fade" id="EDITCAPITAL" role="dialog">
<div class="modal fade" id="EDITCAPITAL" role="dialog" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
<form>
@ -1943,9 +1943,9 @@ function vaildateBeforeOpenModal()
<div class="col-md-12" style="padding:1%;" ></div>
<div class="col-md-12" style="border:1px solid #000;padding:0px;" id="EditModalImportTaxHide">
<br/>
<div class="col-md-6" style="padding:0px;">
<div class="col-md-6" style="padding:0px;text-align:left;">
<div class="col-md-12">
<div class="col-md-4" >
<div class="col-md-4">
Basic Price <?php echo "($INR)"?>
</div>
<div class="col-md-4" style="display:none;">
@ -2009,7 +2009,7 @@ function vaildateBeforeOpenModal()
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom duty: (B)<?php echo "($INR)"?>
Custom duty (B)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2033,7 +2033,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
Custom ED_cess : (C)
Custom ED_cess (C)
</div>
<div class="col-md-4">
<div class="form-group">
@ -2054,7 +2054,7 @@ function vaildateBeforeOpenModal()
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom S & H cess : (D)
Custom S & H cess (D)
</div>
<div class="col-md-4">
<div class="form-group">
@ -2075,9 +2075,9 @@ function vaildateBeforeOpenModal()
</div>
</div>
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4">
Subtotal (E) : (g)<?php echo "($INR) (A+B+C+D)"?>
Subtotal (E) <?php echo "($INR) (A+B+C+D)"?>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -2100,7 +2100,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-12" style="text-align:left;">
<div class="col-md-4">
<!-- Additional Excise duty : (g) -->
<!-- <label><?php echo "IGST on (E): (F) ($INR)";?></label> -->
@ -2133,9 +2133,9 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-12" style="text-align:left;">
<div class="col-md-8">
Total Duty<?php echo "($INR) (B+C+D+E)"?>
Total Duty (G)<?php echo "($INR) (B+C+D+F)"?>
</div>
<div class="col-md-4">
<div class="form-group">

View File

@ -27,7 +27,7 @@
$TotalDiscountedAmt=0.0;
$TotalFreightvalue=0.0;
$TotalFrieght = 0;
$totigst=0;
$totSubtotal=0;
@ -450,7 +450,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
?>
</div>
<div class="col-md-12" id="currencyTypeDiv" style="display:none;padding: 0px;"">
<div class="col-md-12" id="currencyTypeDiv" style="display:none;padding: 0px;">
<label>Currency Type</label>
<div class="form-group">
@ -1175,7 +1175,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
<!-- <td> <a data-target='#VIEWCAPITAL' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#VIEWCAPITAL"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo ; ?> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
</tr> <?php
$TotalFrieght = 0;
//$TotalFrieght = 0;
$TotalSummary = 0;
if($CapitalRange=='1'){
@ -1274,7 +1274,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
<table class="table table-bordered" style="border:1px solid #333">
<div align="right" style="padding-right:10px">
<div class="modal fade" id="EDITCAPITAL" role="dialog">
<div class="modal fade" id="EDITCAPITAL" role="dialog" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
<form>

View File

@ -1317,7 +1317,7 @@ $("#PaymentMethod").select2();
<table class="table table-bordered" style="border:1px solid #333">
<div align="right" style="padding-right:10px">
<div align="right">
<div class="modal fade" id="CAPITAL" role="dialog">
<div class="modal fade" id="CAPITAL" role="dialog" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
<form>
@ -1690,7 +1690,7 @@ $("#PaymentMethod").select2();
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4" >
Basic Price In<?php echo "($INR)"?>
Basic Price <?php echo "($INR)"?>
</div>
<div class="col-md-4" style="display:none;">
<div class="form-group">
@ -1711,7 +1711,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Landing charge<?php echo "($INR)"?>
Landing charge <?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1732,7 +1732,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Assessable Value (A) :<?php echo "($INR)"?>
Assessable Value (A) <?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -1753,7 +1753,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom duty : (B)<?php echo "($INR)"?>
Custom duty (B)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1777,7 +1777,7 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-4">
Custom ED_cess : (C)<?php echo "($INR)"?>
Custom ED_cess (C)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1798,7 +1798,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom S & H cess : (D)<?php echo "($INR)"?>
Custom S & H cess (D)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1821,7 +1821,8 @@ $("#PaymentMethod").select2();
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4">
Subtotal: (E)<?php echo "($INR)"?>
<!-- Subtotal (E)<?php echo "($INR)"?> -->
Subtotal (E) <?php echo "($INR) (A+B+C+D)"?>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none">
@ -1880,7 +1881,8 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-8">
Total Duty (G)<?php echo "($INR)"?>
<!-- Total Duty (G)<?php echo "($INR)"?> -->
Total Duty (G) <?php echo "($INR) (B+C+D+F)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1980,7 +1982,7 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-4">
Custom Duty <?php echo "$INR"?>
Custom Duty Expenses <?php echo "($INR)/UOM "?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2058,7 +2060,7 @@ $("#PaymentMethod").select2();
</div>
</div>
<div class="modal fade" id="EDITCAPITAL" role="dialog">
<div class="modal fade" id="EDITCAPITAL" role="dialog" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
<form>
@ -2434,7 +2436,7 @@ $("#PaymentMethod").select2();
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4" >
Basic Price In<?php echo "($INR)"?>
Basic Price <?php echo "($INR)"?>
</div>
<div class="col-md-4" style="display:none;">
<div class="form-group">
@ -2455,7 +2457,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Landing charge<?php echo "$INR"?>
Landing charge <?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2476,7 +2478,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Assessable Value (A) <?php echo "$INR"?>
Assessable Value (A) <?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -2497,7 +2499,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom duty : (B)<?php echo "$INR"?>
Custom duty (B)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2521,7 +2523,7 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-4">
Custom ED_cess : (C)<?php echo "($INR)"?>
Custom ED_cess (C)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2542,7 +2544,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom S & H cess : (D)<?php echo "($INR)"?>
Custom S & H cess (D)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2565,7 +2567,7 @@ $("#PaymentMethod").select2();
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4">
Subtotal (E) : <?php echo "($INR)"?>
Subtotal (E) <?php echo "($INR) (A+B+C+D)"?>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -2621,7 +2623,7 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-8">
Total Duty (G) :<?php echo "($INR)"?>
Total Duty (G) <?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2800,7 +2802,7 @@ $("#PaymentMethod").select2();
<!-- this is view the added requistion details -->
<div class="modal fade" id="VIEWCAPITAL" role="dialog">
<div class="modal fade" id="VIEWCAPITAL" role="dialog" style="overflow-y:scroll !important">
<div class="modal-dialog">
<!-- Modal content-->
<form>
@ -3144,7 +3146,7 @@ $("#PaymentMethod").select2();
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4" >
Basic Price In <?php echo "($INR)"?>
Basic Price <?php echo "($INR)"?>
</div>
<div class="col-md-4" style="display:none;">
<div class="form-group">
@ -3207,7 +3209,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom duty : (B)<?php echo "($INR)"?>
Custom duty (B)<?php echo "($INR)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -3231,7 +3233,7 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-4">
Custom ED_cess : (C)
Custom ED_cess (C)
</div>
<div class="col-md-4">
<div class="form-group">
@ -3252,7 +3254,7 @@ $("#PaymentMethod").select2();
</div>
<div class="col-md-12">
<div class="col-md-4">
Custom S & H cess : (D)
Custom S & H cess (D)
</div>
<div class="col-md-4">
<div class="form-group">
@ -3275,7 +3277,7 @@ $("#PaymentMethod").select2();
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4">
Subtotal: (E)<?php echo "($INR)"?>
Subtotal (E)<?php echo "($INR) (A+B+C+D)"?>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -3335,7 +3337,7 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-8">
Total Duty (B+C+D+E)
Total Duty (G) <?php echo "($INR) (B+C+D+F)"?>
</div>
<div class="col-md-4">
<div class="form-group">
@ -3434,7 +3436,9 @@ $("#PaymentMethod").select2();
<div class="col-md-12">
<div class="col-md-4">
Custom Duty <?php echo "($INR)/UOM"?>
Custom Duty Expenses<?php echo "($INR)/UOM"?>
</div>
<div class="col-md-4">
<div class="form-group">

View File

@ -1031,7 +1031,7 @@ if(!empty($RequistionDetails))
<div class="col-md-12">
<div class="col-md-4" >
<!-- Basic Price: -->
<label><?php echo "Basic Price In ($INR)";?></label>
<label><?php echo "Basic Price ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display:none;">
@ -1053,7 +1053,7 @@ if(!empty($RequistionDetails))
<div class="col-md-12">
<div class="col-md-4">
<!-- Landing charge -->
<label><?php echo "Landing charge In ($INR)";?></label>
<label><?php echo "Landing charge ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1100,7 +1100,7 @@ if(!empty($RequistionDetails))
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom duty : (a) -->
<label><?php echo "Custom duty : (B)($INR)";?></label>
<label><?php echo "Custom duty (B)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1125,7 +1125,7 @@ if(!empty($RequistionDetails))
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom ED_cess : (e) -->
<label><?php echo "Custom ED_cess (C) :($INR)";?></label>
<label><?php echo "Custom ED_cess (C) ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1147,7 +1147,7 @@ if(!empty($RequistionDetails))
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom S & H cess : (f) -->
<label><?php echo "Custom S & H cess : (D)($INR)";?></label>
<label><?php echo "Custom S & H cess (D)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1171,7 +1171,7 @@ if(!empty($RequistionDetails))
<div class="col-md-12">
<div class="col-md-4">
<!-- Additional Excise duty : (g) -->
<label><?php echo "Subtotal: (E)($INR) (A+B+C+D)";?></label>
<label><?php echo "Subtotal (E)($INR) (A+B+C+D)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none">
@ -1228,7 +1228,7 @@ if(!empty($RequistionDetails))
<div class="col-md-12">
<div class="col-md-8">
<!-- Gross duty payable -->
<label><?php echo "Total Duty ($INR) (B+C+D+E)";?></label>
<label><?php echo "Total Duty (G)($INR) (B+C+D+E)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">

129
application/views/editRevenueAmendPO.php Executable file → Normal file
View File

@ -139,6 +139,11 @@ if(!empty($INRSYMBOL))
margin-top:200px;
z-index: 1080 !important;
}
#freightmodel {
margin-top:200px;
z-index: 1080 !important;
}
#ExciseDutyCalModel {
margin-top:200px;
z-index: 1080 !important;
@ -307,7 +312,7 @@ $('#EditPackagingType').change(function() {
if(selValue == PercentageType)
{
var PackagingCalculation = '';
//$('#packagingcalmodel').modal('show');
$('#packagingcalmodel').modal('show');
$('#txtEditPackaging').removeAttr( 'readonly','true' );
}
else
@ -347,8 +352,13 @@ $('#drpEditFreight').change(function() {
selValue = $("#drpEditFreight").val() ;
$('#txtEditFreight').val('');
$('#txtEditAfterFreight').val('');
if (selValue == NilType)
if(selValue == PercentageType)
{
var PackagingCalculation = '';
$('#freightmodel').modal('show');
$('#txtEditFreight').removeAttr( 'readonly','true' );
}
else if (selValue == NilType)
{
$('#txtEditFreight').attr('readonly', 'true');
@ -407,7 +417,8 @@ function calculateDiscount()
AfterDiscount = <?php echo DIS_LUMPSUM;?>;
}
var discount = parseFloat(AfterDiscount).toFixed(2);
$('#txtEditAfterDiscount').val(discount);
$('#txtEditAfterDiscount').val(discount);
calculateVat();
}
else
{
@ -518,6 +529,7 @@ function calculatePackaging()
var Packaging = parseFloat(AfterPackaging).toFixed(2);
$('#txtEditAfterPackaging').val(Packaging);
calculateVat();
}
else
{
@ -532,7 +544,7 @@ function calculatePackaging()
function calculateVat()//SGST
{
//alert();
if($('#EditRate').val() == '')
{
alert('Please Enter the Rate value');
@ -546,6 +558,7 @@ function calculatePackaging()
var discount=parseFloat($('#txtEditAfterDiscount').val());
basicValue=basicValue-discount;
//alert(basicValue);
// alert("Final"+basicValue);
//var ExciseDuty = parseFloat($('#txtEditAfterExciseDuty').val());
var AfterVat = 0.0;
@ -571,8 +584,17 @@ function calculatePackaging()
// }
if($('#txtEditVat').val() != '')
{
var vatValue = parseFloat($('#txtEditVat').val());
var vatValue = parseFloat($('#txtEditVat').val());
var basicValue2 = parseFloat($('#txtEditBasicValue').val());
var discount=parseFloat($('#txtEditAfterDiscount').val());
basicValue1=basicValue2-discount;
//alert(basicValue1);
var packaging=parseFloat($('#txtEditAfterPackaging').val());
var freight=parseFloat($('#txtEditAfterFreight').val());
var packfreight =parseFloat(packaging)+parseFloat(freight);
//alert(packfreight);
basicValue=parseFloat(basicValue1+packfreight);
//alert(vatValue);
$('#txtEditGST').val(vatValue);
$('#txtEditOtherTax').val(0.00);
@ -605,20 +627,23 @@ function calculatePackaging()
}
else
{
var basicValue = parseFloat($('#txtEditBasicValue').val());
var basicValue1 = parseFloat($('#txtEditBasicValue').val());
var discount=parseFloat($('#txtEditAfterDiscount').val());
basicValue=basicValue-discount;
basicValue2=basicValue1-discount;
if($('#txtEditGST').val() != "0" && $('#txtEditGST').val() != '')
{
var GSTValue = parseFloat($('#txtEditGST').val());
var AfterGST = 0.0;
var packaging=parseFloat($('#txtEditAfterPackaging').val());
var freight=parseFloat($('#txtEditAfterFreight').val());
var packfreight =parseFloat(packaging)+parseFloat(freight);
basicValue=parseFloat(basicValue2+packfreight);
var AfterGST = 0.0;
AfterGST = <?php echo GSTTAX; ?>;
var GSTval = parseFloat(AfterGST).toFixed(2);
$('#txtEditAfterGST').val(GSTval);
}
else
{
@ -703,9 +728,37 @@ function calculatePackaging()
//alert(FreightType);
var AfterFreight = 0.0;
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
{
if(FreightCalculation != 0 &&$('#txtEditAfterDiscount').val() == '')
{
alert('Please Enter the Discount value');
$('#EditDiscountType').focus();
$('#txtEditFreight').val('');
return false;
}
else
{
var AfterDiscount =parseFloat($('#txtEditAfterDiscount').val());
//alert((FreightValue/100) * (basicValue-AfterDiscount));
//alert(((FreightValue/100) * basicValue));
//alert(FreightCalculation);
if(FreightCalculation == 0)
{
AfterFreight =<?php echo FREIGHT_PERCENTAGE ;?>;
}
else
{
AfterFreight =<?php echo FREIGHT_PERCENTAGE_AFTER;?>;
}
//AfterFreight = FreightCalculation == 0 ? <?php echo FREIGHT_PERCENTAGE ;?> : <?php echo FREIGHT_PERCENTAGE_AFTER;?> ;
}
}
// if(FreightType == PercentageType)
// {
// AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
// }
else if(FreightType == NilType)
{
AfterFreight = 0.0;
@ -746,6 +799,7 @@ function calculatePackaging()
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtEditAfterFreight').val(AfterFreightval);
calculateVat();
}
else
{
@ -762,9 +816,17 @@ function calculatePackaging()
function SetPackagingOption()
{
PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
// alert(PackagingCalculation);
$('#packagingcalmodel').modal('hide');
calculatePackaging();
}
function SetFreightOption()
{
FreightCalculation = $("input:radio[name='optfreight']:checked").val();
//alert(FreightCalculation);
$('#freightmodel').modal('hide');
calculateFreight();
}
function SetVatCalculation()
{
@ -1143,14 +1205,14 @@ function calculateEditTaxValue()
if(!empty($PoTypeOptions))
{
foreach ($PoTypeOptions as $POpt):
if($revenuesubtype==$POpt->ConfigValue){
$optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue;
}
endforeach;
}
echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control');
echo form_dropdown('PoTypeOptions', $optionsPO,$revenuesubtype,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control');
?>
@ -1277,6 +1339,35 @@ function calculateEditTaxValue()
</div>
</div>
<div id="freightmodel" 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">&times;</button>
<h4 class="modal-title">Freight Calculation On</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="optfreight" checked="checked" value='0' id="optFreight"> Basic Amount</label>
</div>
<div class="radio">
<label><input type="radio" name="optfreight" id="optFreight" value='1' > After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="PackagingOption" onclick="SetFreightOption();" style="margin-top: -24px;">&nbsp;&nbsp;<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>
<!-- Modal for Excise Duty Calculation-->
<div class="modal fade" id="ExciseDutyCalModel" role="dialog">
@ -1376,7 +1467,7 @@ function calculateEditTaxValue()
<div class="container-fluid">
<div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div id="EDITREVENUE" 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>
@ -2600,4 +2691,4 @@ $('#insurancestatus').change(function(){
$("#insurancenodiv").show();}
});
</script>
</script>

195
application/views/editRevenuepurchaseorder.php Executable file → Normal file
View File

@ -142,6 +142,10 @@ if(!empty($RequistionDetails))
#packagingcalmodel {
margin-top:200px;
z-index: 1080 !important;
}
#freightcalmodel {
margin-top:200px;
z-index: 1080 !important;
}
#ExciseDutyCalModel {
margin-top:200px;
@ -577,8 +581,13 @@ $('#drpFreight').change(function() {
selValue = $("#drpFreight").val() ;
$('#txtFreight').val('');
$('#txtAfterFreight').val('');
if (selValue == NilType)
if(selValue == PercentageType)
{
var FreightCalculation = '';
$('#freightcalmodel').modal('show');
$('#txtFreight').removeAttr( 'readonly','true' );
}
else if (selValue == NilType)
{
$('#txtFreight').attr('readonly', 'true');
@ -624,8 +633,13 @@ $('#drpEditFreight').change(function() {
selValue = $("#drpEditFreight").val() ;
$('#txtEditFreight').val('');
$('#txtEditAfterFreight').val('');
if (selValue == NilType)
if(selValue == PercentageType)
{
var FreightCalculation = '';
$('#freightcalmodel').modal('show');
$('#txtEditFreight').removeAttr( 'readonly','true' );
}
else if (selValue == NilType)
{
$('#txtEditFreight').attr('readonly', 'true');
@ -657,8 +671,14 @@ $('#drpViewFreight').change(function() {
selValue = $("#drpEditFreight").val() ;
$('#txtViewFreight').val('');
$('#txtViewAfterFreight').val('');
if (selValue == NilType)
if(selValue == PercentageType)
{
var FreightCalculation = '';
$('#freightcalmodel').modal('show');
$('#txtViewFreight').removeAttr( 'readonly','true' );
}
else if (selValue == NilType)
{
$('#txtViewFreight').attr('readonly', 'true');
@ -857,6 +877,7 @@ function calculatePackaging(isEdit)
var Packaging = parseFloat(AfterPackaging).toFixed(2);
$('#txtAfterPackaging').val(Packaging);
RevenueChangeSgst();
}
else
{
@ -928,6 +949,7 @@ function calculatePackaging(isEdit)
var Packaging = parseFloat(AfterPackaging).toFixed(2);
$('#txtEditAfterPackaging').val(Packaging);
RevenueChangeEditSgst();
}
else
{
@ -1356,7 +1378,9 @@ function calculatePackaging(isEdit)
AfterCST = <?php echo CST_ONBASICVALUE; ?>;
var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtEditAfterCST').val(Vatval);
$('#txtEditAfterCST').val(Vatval);
RevenueChangeEditSgst();
}
else
@ -1561,10 +1585,24 @@ function calculatePackaging(isEdit)
var Quantity = parseFloat($('#Quantity').val());
//alert(FreightType);
var AfterFreight = 0.0;
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
{
if($(FreightCalculation != 0 && '#txtAfterDiscount').val() == '')
{
alert('Please Enter the Discount value');
$('#txtFreight').val('');
$('#DiscountType').focus();
return false;
}
else
{
var AfterDiscount =parseFloat($('#txtAfterDiscount').val());
AfterFreight = FreightCalculation == 0 ? <?php echo FREIGHT_PERCENTAGE;?> : <?php echo FREIGHT_PERCENTAGE_AFTER;?> ;
}
}
else if(FreightType == NilType)
{
AfterFreight = 0.0;
@ -1601,7 +1639,8 @@ function calculatePackaging(isEdit)
}
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtAfterFreight').val(AfterFreightval);
$('#txtAfterFreight').val(AfterFreightval);
RevenueChangeSgst();
}
else
{
@ -1642,10 +1681,27 @@ function calculatePackaging(isEdit)
var Quantity = parseFloat($('#EditQuantity').val());
//alert(FreightType);
var AfterFreight = 0.0;
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
// if(FreightType == PercentageType)
// {
// AfterFreight =
// }
if(FreightType == PercentageType)
{
if($(FreightCalculation != 0 && '#txtEditAfterDiscount').val() == '')
{
alert('Please Enter the Discount value');
$('#txtEditFreight').val('');
$('#DiscountType').focus();
return false;
}
else
{
var AfterDiscount =parseFloat($('#txtEditAfterDiscount').val());
AfterFreight = FreightCalculation == 0 ? <?php echo FREIGHT_PERCENTAGE;?> : <?php echo FREIGHT_PERCENTAGE_AFTER;?> ;
}
}
else if(FreightType == NilType)
{
AfterFreight = 0.0;
@ -1681,6 +1737,7 @@ function calculatePackaging(isEdit)
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtEditAfterFreight').val(AfterFreightval);
RevenueChangeEditSgst();
}
else
{
@ -1723,10 +1780,27 @@ function calculatePackaging(isEdit)
var Quantity = parseFloat($('#ViewQuantity').val());
//alert(FreightType);
var AfterFreight = 0.0;
// if(FreightType == PercentageType)
// {
// AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
// }
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
{
if($(FreightCalculation != 0 && '#txtEditAfterDiscount').val() == '')
{
alert('Please Enter the Discount value');
$('#txtViewFreight').val('');
$('#DiscountType').focus();
return false;
}
else
{
var AfterDiscount =parseFloat($('#txtViewAfterDiscount').val());
AfterFreight = FreightCalculation == 0 ? <?php echo FREIGHT_PERCENTAGE;?> : <?php echo FREIGHT_PERCENTAGE_AFTER;?> ;
}
}
else if(FreightType == NilType)
{
AfterFreight = 0.0;
@ -1763,6 +1837,7 @@ function calculatePackaging(isEdit)
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtViewAfterFreight').val(AfterFreightval);
RevenueChangeSgst();
}
else
{
@ -1781,6 +1856,14 @@ function calculatePackaging(isEdit)
PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
$('#packagingcalmodel').modal('hide');
calculatePackaging($('#isEdit').val());
}
/* Set the Freight calculation option for calculating Packaging */
function SetfreightOption()
{
FreightCalculation = $("input:radio[name='optfreight']:checked").val();
$('#freightcalmodel').modal('hide');
calculateFreight($('#isEdit').val());
}
/* Set the Packaging calculation option for calculating Packaging */
function SetExciseCalculation()
@ -1935,16 +2018,17 @@ SetVatorCST();
}
if($("#EditCgst").val()!=''){
$('#EditAfterCgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
$('#EditAfterCgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val()));
}
if($("#EditSgst").val()!=''){
$('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditSgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
$('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditSgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterFreight').val()));
}
if($("#EditIgst").val()!=''){
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterFreight').val()));
}
if ($("#EditPackagingType").val()!=0) {
@ -2415,6 +2499,36 @@ function calculateEditTaxValue()
</div>
</div>
<div id="freightcalmodel" 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">&times;</button>
<h4 class="modal-title">Freight Calculation On</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="optfreight" checked="checked" value='0' id="optfreight"> Basic Amount</label>
</div>
<div class="radio">
<label><input type="radio" name="optfreight" id="optfreight" value='1' > After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="freightOption" onclick="SetfreightOption();" style="margin-top: -24px;">&nbsp;&nbsp;<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-->
<div class="modal fade" id="ExciseDutyCalModel" role="dialog">
@ -3120,7 +3234,7 @@ function calculateEditTaxValue()
<label>Packaging Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditPackaging','value' => set_value('txtEditPackaging'),'id'=>'txtEditPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculatePackaging(1);','style'=>'text-align:right;');
$data = array('name' => 'txtEditPackaging','value' => set_value('txtEditPackaging'),'id'=>'txtEditPackaging', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculatePackaging(1);RevenueChangeEditSgst();','style'=>'text-align:right;');
echo form_input($data);
?>
</div>
@ -4348,13 +4462,20 @@ function validateEditRevenueTax()
return true;
}
}
function calculateCgstTax(varBasicValue,Cgst,discount)
function calculateCgstTax(varBasicValue,Cgst,discount,pack,freight)
{
var discount = discount;
var basicValue = parseFloat(varBasicValue-discount);
var Cgst = parseFloat(Cgst);
var ServiceTaxValue = 0.0;
var basicValue1 = parseFloat(varBasicValue-discount);
var packaging = parseFloat(pack);
var freight = parseFloat(freight);
var packfreight =parseFloat(packaging)+parseFloat(freight);
var basicValue =parseFloat(basicValue1+packfreight)
var Cgst = parseFloat(Cgst);
var ServiceTaxValue = 0.0;
ServiceTaxValue = <?php echo SERVICETAX_CGST; ?>;
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
@ -4362,10 +4483,17 @@ function calculateCgstTax(varBasicValue,Cgst,discount)
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
function calculateSgstTax(varBasicValue,Sgst,discount)
function calculateSgstTax(varBasicValue,Sgst,discount,pack,freight)
{
var discount = discount;
var basicValue = parseFloat(varBasicValue-discount);
var basicValue1 = parseFloat(varBasicValue-discount);
var packaging = parseFloat(pack);
//alert('f'+packaging);
var freight = parseFloat(freight);
var packfreight =parseFloat(packaging)+parseFloat(freight);
var basicValue =parseFloat(basicValue1+packfreight)
var Sgst = parseFloat(Sgst);
var ServiceTaxValue = 0.0;
@ -4376,10 +4504,15 @@ function calculateCgstTax(varBasicValue,Cgst,discount)
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
function calculateIgstTax(varBasicValue,Igst,discount)
function calculateIgstTax(varBasicValue,Igst,discount,pack1,freight1)
{
var discount = discount;
var basicValue = parseFloat(varBasicValue-discount);
var packaging=parseFloat(pack1);
var freight=parseFloat(freight1);
var packfreight=parseFloat(packaging)+parseFloat(freight);
var basicValue1 = parseFloat(varBasicValue-discount);
var basicValue =parseFloat(basicValue1+packfreight)
var Igst = parseFloat(Igst);
var ServiceTaxValue = 0.0;
@ -4730,16 +4863,16 @@ function change(){
calculateDiscount(0);
}
if($("#Cgst").val()!=''){
$('#AfterCgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Cgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
$('#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()));
}
if($("#Sgst").val()!=''){
$('#AfterSgst').val(calculateSgstTax($('#txtBasicValue').val(),$('#Sgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
$('#AfterSgst').val(calculateSgstTax($('#txtBasicValue').val(),$('#Sgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val(),$("#txtAfterPackaging").val()== '' ? "0.00" : $('#txtAfterPackaging').val(),$("#txtAfterFreight").val()== '' ? "0.00" : $('#txtAfterFreight').val()));
}
if($("#Igst").val()!=''){
$('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
$('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val(),$("#txtAfterPackaging").val()== '' ? "0.00" : $('#txtAfterPackaging').val(),$("#txtAfterFreight").val()== '' ? "0.00" : $('#txtAfterFreight').val()));
}

View File

@ -1076,7 +1076,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-12">
<div class="col-md-4" >
<!-- Basic Price: -->
<label><?php echo "Basic Price ($INR)";?></label>
<label><?php echo "Basic Price ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display:none;">
@ -1123,7 +1123,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-12">
<div class="col-md-4">
<!-- High seas sales charge -->
<label><?php echo "Assessable Value (A) :($INR)";?></label>
<label><?php echo "Assessable Value (A)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -1145,7 +1145,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom duty : (a) -->
<label><?php echo "Custom duty (B) :($INR)";?></label>
<label><?php echo "Custom duty (B)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1170,7 +1170,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom ED_cess : (e) -->
<label><?php echo "Custom ED_cess (C): ($INR)";?></label>
<label><?php echo "Custom ED_cess (C)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1192,7 +1192,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom S & H cess : (f) -->
<label><?php echo "Custom S & H cess (D):($INR)";?></label>
<label><?php echo "Custom S & H cess (D)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1216,7 +1216,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-12">
<div class="col-md-4">
<!-- Additional Excise duty : (g) -->
<label><?php echo "Subtotal (E) :($INR) (A+B+C+D)";?></label>
<label><?php echo "Subtotal (E)($INR) (A+B+C+D)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none">
@ -1272,7 +1272,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-12">
<div class="col-md-8">
<!-- Gross duty payable -->
<label><?php echo "Total Duty ($INR) (B+C+D+E)";?></label>
<label><?php echo "Total Duty (G)($INR) (B+C+D+F)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1372,7 +1372,7 @@ if($PONOStatus == PO_RELEASED)
<div class="col-md-4">
<!-- Custom Duty Expenses -->
<label><?php echo "Custom Duty ($INR)/UOM";?></label>
<label><?php echo "Custom Duty Expenses($INR)/UOM";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1742,7 +1742,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom duty : (a) -->
<label><?php echo "Custom duty (B) :($INR)";?></label>
<label><?php echo "Custom duty (B)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1767,7 +1767,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom ED_cess : (e) -->
<label><?php echo "Custom ED_cess : (C) ($INR)";?></label>
<label><?php echo "Custom ED_cess (C)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1789,7 +1789,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom S & H cess : (f) -->
<label><?php echo "Custom S & H cess (D): ($INR)";?></label>
<label><?php echo "Custom S & H cess (D)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1815,7 +1815,7 @@ echo form_textarea($data);
<!-- Additional Excise duty : (g) -->
<label><?php echo "Subtotal (E):($INR) (A+B+C+D)";?></label>
<label><?php echo "Subtotal (E)($INR) (A+B+C+D)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -1871,7 +1871,7 @@ echo form_textarea($data);
<div class="col-md-8">
<!-- Gross duty payable -->
<label><?php echo "Total Duty ($INR) (B+C+D+E)";?></label>
<label><?php echo "Total Duty (G)($INR) (B+C+D+F)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1928,7 +1928,7 @@ echo form_textarea($data);
</div>
<div class="col-md-3" style="padding-left: 0px;">
<span>Freight Amt In <?php echo $INR;?></span>
<span>Freight Amt <?php echo $INR;?></span>
<div class="form-group">
<?php
$data = array('name' => 'edittxtAfterFreight','value' => set_value('edittxtAfterFreight'),'id'=>'edittxtAfterFreight', 'class' => 'form-control num' ,'readonly' => 'true');
@ -1971,7 +1971,7 @@ echo form_textarea($data);
<div class="col-md-4">
<!-- Custom Duty Expenses -->
<label><?php echo "Custom Duty($INR) /UOM";?></label>
<label><?php echo "Custom Duty Expenses($INR) /UOM";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2264,7 +2264,7 @@ echo form_textarea($data);
<div class="col-md-6" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4" >
Basic Price:(<?php echo $INR?>)
Basic Price (<?php echo $INR?>)
</div>
<div class="col-md-4" >
<div class="form-group">
@ -2311,7 +2311,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- High seas sales charge -->
<label><?php echo "Assessable Value (A) :($INR)";?></label>
<label><?php echo "Assessable Value (A) ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none">
@ -2333,7 +2333,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom duty : (a) -->
<label><?php echo "Custom duty (B) :($INR)";?></label>
<label><?php echo "Custom duty (B) ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2358,7 +2358,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom ED_cess : (e) -->
<label><?php echo "Custom ED_cess (C): ($INR)";?></label>
<label><?php echo "Custom ED_cess (C) ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2380,7 +2380,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom S & H cess : (f) -->
<label><?php echo "Custom S & H cess (D) :($INR)";?></label>
<label><?php echo "Custom S & H cess (D) ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -2404,7 +2404,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Additional Excise duty : (g) -->
<label><?php echo "Subtotal (E): ($INR) (A+B+C+D)";?></label>
<label><?php echo "Subtotal (E) ($INR) (A+B+C+D)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -2459,7 +2459,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-8">
<!-- Gross duty payable -->
<label><?php echo "Total Duty ($INR) (B+C+D+E)";?></label>
<label><?php echo "Total Duty ($INR) (B+C+D+F)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">

View File

@ -891,7 +891,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4" >
<!-- Basic Price: -->
<label>Basic Price In (<?php echo $INR?>)</label>
<label>Basic Price (<?php echo $INR?>)</label>
</div>
<div class="col-md-4" >
<div class="form-group" style="display:none;">
@ -938,7 +938,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
<!-- High seas sales charge -->
<label><?php echo "Assessable Value (A) :($INR)";?></label>
<label><?php echo "Assessable Value (A)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none">
@ -960,7 +960,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom duty : (a) -->
<label><?php echo "Custom duty (B):($INR)";?></label>
<label><?php echo "Custom duty (B)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -984,7 +984,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom ED_cess : (e) -->
<label><?php echo "Custom ED_cess (C): ($INR)";?></label>
<label><?php echo "Custom ED_cess (C) ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1006,7 +1006,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom S & H cess : (f) -->
<label><?php echo "Custom S & H cess (D):($INR)";?></label>
<label><?php echo "Custom S & H cess (D)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1030,7 +1030,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-4">
<!-- Additional Excise duty : (g) -->
<label><?php echo "Subtotal (E):($INR) (A+B+C+D)";?></label>
<label><?php echo "Subtotal (E)($INR) (A+B+C+D)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -1082,7 +1082,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-8">
<!-- Gross duty payable -->
<label><?php echo "Total Duty ($INR) (B+C+D+E)";?></label>
<label><?php echo "Total Duty (G)($INR) (B+C+D+F)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1484,7 +1484,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4" >
<!-- Basic Price: -->
<label><?php echo "Basic Price:($INR)";?></label>
<label><?php echo "Basic Price($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display:none;">
@ -1531,7 +1531,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- High seas sales charge -->
<label><?php echo "Assessable Value (A) :($INR)";?></label>
<label><?php echo "Assessable Value (A) ($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none">
@ -1553,7 +1553,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom duty : (a) -->
<label><?php echo "Custom duty (B): ($INR)"?></label>
<label><?php echo "Custom duty (B) ($INR)"?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1578,7 +1578,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom ED_cess : (e) -->
<label><?php echo "Custom ED_cess (C): ($INR)";?></label>
<label><?php echo "Custom ED_cess (C)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1600,7 +1600,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Custom S & H cess : (f) -->
<label><?php echo "Custom S & H cess (D): ($INR)";?></label>
<label><?php echo "Custom S & H cess (D)($INR)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">
@ -1624,7 +1624,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-4">
<!-- Additional Excise duty : (g) -->
<label><?php echo "Subtotal (E): ($INR) (A+B+C+D)";?></label>
<label><?php echo "Subtotal (E)($INR) (A+B+C+D)";?></label>
</div>
<div class="col-md-4">
<div class="form-group" style="display: none;">
@ -1677,7 +1677,7 @@ echo form_textarea($data);
<div class="col-md-12">
<div class="col-md-8">
<!-- Gross duty payable -->
<label><?php echo "Total Duty ($INR) (B+C+D+E)";?></label>
<label><?php echo "Total Duty (G)($INR) (B+C+D+E)";?></label>
</div>
<div class="col-md-4">
<div class="form-group">

368
application/views/purchaseorder.php Executable file → Normal file
View File

@ -50,7 +50,11 @@ if(!empty($INRSYMBOL))
<style>
#packagingcalmodel {
#packagingcalmodel {
margin-top:200px;
z-index: 1080 !important;
}
#freightcalmodel {
margin-top:200px;
z-index: 1080 !important;
}
@ -72,6 +76,7 @@ if(!empty($INRSYMBOL))
}
</style>
<!-- Rich text -->
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
@ -103,9 +108,6 @@ if(!empty($INRSYMBOL))
<script>
$(document).ready(function(){
$('#insurance').val('0');
$("#insuranceno").val('');
$("#insurancenodiv").hide();
$("#PaymentTerms").select2();
clearTotalItemValues();
});
@ -487,6 +489,7 @@ $('#EditDiscountType').change(function() {
$('#PackagingType').change(function() {
if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
{
$('#txtPackaging').val('');
$('#txtAfterPackaging').val('');
selValue = $("#PackagingType").val() ;
@ -548,6 +551,77 @@ $('#EditPackagingType').change(function() {
});
//for freight type//
// $('#drpFreight').change(function() {
// if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
// {
// alert();
// $('#txtFreight').val('');
// $('#txtAfterFreight').val('');
// selValue = $("#drpFreight").val() ;
// if(selValue == PercentageType)
// {
// var PackagingCalculation = '';
// $('#freightcalmodel').modal('show');
// //$('#freightcalmodel').modal('blur');
// $('#txtFreight').removeAttr( 'readonly','true' );
// }
// else
// {
// if (selValue == NilType)
// {
// $('#txtFreight').attr('readonly', 'true');
// $('#txtFreight').val('0.00');
// }
// else
// {
// $('#txtFreight').removeAttr( 'readonly','true' );
// }
// }
// }
// else
// {
// alert('Please Select MaterialCode and Rate Field Value');
// $('#drpFreight').val("0");
// $('#Rate').focus();
// }
// calculateFreight(0);
//});
//for edit freight type//
// $('#drpEditFreight').change(function() {
// $('#txtEditFreight').val('');
// $('#txtEditAfterFreight').val('');
// selValue = $("#drpEditFreight").val() ;
// if(selValue == PercentageType)
// {
// var PackagingCalculation = '';
// // $('#freight').modal('show');
// $('#freightcalmodel').modal('show');
// $('#txtEditFreight').removeAttr( 'readonly','true' );
// }
// else
// {
// if (selValue == NilType)
// {
// $('#txtEditFreight').attr('readonly', 'true');
// $('#txtEditFreight').val('0.00');
// }
// else
// {
// $('#txtEditFreight').removeAttr( 'readonly','true' );
// }
// }
// //calculatePackaging(1);
// });
$('#txtExciseDuty').change(function() {
if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
@ -594,7 +668,7 @@ $('#txtEditCST').change(function() {
}
});
$('#drpFreight').change(function() {
var FreightType =$("#drpFreight").val();
if (FreightType == "PER TRIP")
@ -611,8 +685,14 @@ $('#drpFreight').change(function() {
selValue = $("#drpFreight").val() ;
$('#txtFreight').val('');
$('#txtAfterFreight').val('');
if (selValue == NilType)
if(selValue == PercentageType)
{
var freightCalculation = '';
$('#freightcalmodel').modal('show');
//$('#freightcalmodel').modal('blur');
$('#txtFreight').removeAttr( 'readonly','true' );
}
else if (selValue == NilType)
{
$('#txtFreight').attr('readonly', 'true');
@ -653,8 +733,14 @@ $('#drpEditFreight').change(function() {
selValue = $("#drpEditFreight").val() ;
$('#txtEditFreight').val('');
$('#txtEditAfterFreight').val('');
if (selValue == NilType)
if(selValue == PercentageType)
{
var PackagingCalculation = '';
// $('#freight').modal('show');
$('#freightcalmodel').modal('show');
$('#txtEditFreight').removeAttr( 'readonly','true' );
}
else if (selValue == NilType)
{
$('#txtEditFreight').attr('readonly', 'true');
@ -801,6 +887,7 @@ function calculateDiscount(isEdit)
* To calcuate the Packaging */
function calculatePackaging(isEdit)
{
// alert(PackagingCalculation);
if(isEdit == '0')
{
if($('#MaterialCode').val() == "0")
@ -868,6 +955,8 @@ function calculatePackaging(isEdit)
var Packaging = parseFloat(AfterPackaging).toFixed(2);
$('#txtAfterPackaging').val(Packaging);
RevenueChangeSgst();
}
else
{
@ -940,8 +1029,8 @@ function calculatePackaging(isEdit)
}
var Packaging = parseFloat(AfterPackaging).toFixed(2);
$('#txtEditAfterPackaging').val(Packaging);
RevenueChangeEditSgst();
}
else
{
@ -1607,8 +1696,31 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var AfterFreight = 0.0;
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
}
//AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
if($(freightCalculation != 0 && '#txtAfterDiscount').val() == '')
{
//alert(freightCalculation);
alert('Please Enter the Discount value');
$('#txtFreight').val('');
$('#DiscountType').focus();
return false;
}
else{
var AfterDiscount =parseFloat($('#txtAfterDiscount').val());
//alert(AfterDiscount);
//AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
if(freightCalculation == 0)
{
//alert('before value');
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
}
else{
AfterFreight = <?php echo FREIGHT_PERCENTAGE_AFTER;?>;}
}
}
// // AfterPackaging = PackagingCalculation == 0 ? <?php echo PACKAGING_PERCENTAGE_BYBASICVALUE ;?> : <?php echo PACKAGING_PERCENTAGE_BYDISCOUNTVALUE;?> ;
else if(FreightType == NilType)
{
AfterFreight = 0.0;
@ -1646,6 +1758,7 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtAfterFreight').val(AfterFreightval);
RevenueChangeSgst();
}
else
{
@ -1657,6 +1770,7 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
}
else
{
//alert('1');
if($('#EditMaterialCode').val() == "0")
{
alert('Please Select the Material Code');
@ -1688,10 +1802,35 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var Quantity = parseFloat($('#EditQuantity').val());
//alert(FreightType);
var AfterFreight = 0.0;
// if(FreightType == PercentageType)
// {
// AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
// }
if(FreightType == PercentageType)
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
}
//AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
if($(freightCalculation != 0 && '#txtEditAfterDiscount').val() == '')
{
//alert(freightCalculation);
alert('Please Enter the Discount value');
$('#txtEditFreight').val('');
$('#EditDiscountType').focus();
return false;
}
else{
var AfterDiscount =parseFloat($('#txtEditAfterDiscount').val());
//alert(AfterDiscount);
//AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
if(freightCalculation == 0)
{
//alert('before value');
AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
}
else{
AfterFreight = <?php echo FREIGHT_PERCENTAGE_AFTER;?>;}
}
}
else if(FreightType == NilType)
{
AfterFreight = 0.0;
@ -1725,9 +1864,11 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
AfterFreight = $("#txtEditFreight").val();
}
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtEditAfterFreight').val(AfterFreightval);
$('#txtEditAfterFreight').val(AfterFreightval);
RevenueChangeEditSgst();
}
else
{
$('#txtEditAfterFreight').val("0.00");
@ -1743,8 +1884,15 @@ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
function SetPackagingOption()
{
PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
$('#packagingcalmodel').modal('hide');
$('#packagingcalmodel').modal('hide');
calculatePackaging($('#isEdit').val());
}
function SetfreightOption()
{
freightCalculation = $("input:radio[name='optFreight']:checked").val();
$('#freightcalmodel').modal('hide');
//var freig=$("#drpFreight").val();
calculateFreight($('#isEdit').val());
}
/* Set the Packaging calculation option for calculating Packaging */
function SetExciseCalculation()
@ -1863,7 +2011,7 @@ return true;
VatCalculation = '';
CSTCalculation = '';
}
//edit function:
function Editchange(){
ExceedEditQuantityCheck();
if($('#EditQuantity').val() != '' && $('#EditRate').val() != '')
@ -1872,27 +2020,29 @@ return true;
var txtUnitPrice = parseFloat($('#EditRate').val());
var Tot = txtQuantity * txtUnitPrice
$('#txtEditBasicValue').val(parseFloat(Tot).toFixed(2));
if ($("#EditDiscountType").val()!=0) {
if ($("#EditDiscountType").val()!=0)
{
calculateDiscount(1);
}
if($("#EditCgst").val()!=''){
if($("#EditCgst").val()!='')
{
$('#EditAfterCgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
}
$('#EditAfterCgst').val(calculateCgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val()));
}
if($("#EditSgst").val()!=''){
$('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditSgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
}
$('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditSgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val()));
}
if($("#EditIgst").val()!=''){
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
}
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val()));
}
if ($("#EditPackagingType").val()!=0) {
calculatePackaging(1);
}
if($("#drpEditFreight").val()!=0){
if($("#drpEditFreight").val()!=0){
calculateFreight(1);
}
@ -2150,7 +2300,7 @@ function calculateEditTaxValue()
<div class="col-md-9" style="padding:0px;">
<div class="col-md-4" style="padding:0px;" >
<div class="col-md-12">
<label>Contact Reference</label>
<label>Supplier Reference</label>
<div class="form-group">
<?php
@ -2249,7 +2399,7 @@ function calculateEditTaxValue()
</div>
<div class="col-md-9" style="padding:0px;">
<div class="col-md-4" id="insurancenodiv" style="display:block;">
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
<label>Insurance No<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'insuranceno','insuranceno' => set_value('insuranceno'),'id'=>'insuranceno', 'class' => 'form-control' ,'required' => 'true');
@ -2318,6 +2468,7 @@ function calculateEditTaxValue()
<label><input type="radio" name="optPackaging" id="optPackaging" value='1' > After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
@ -2328,6 +2479,39 @@ function calculateEditTaxValue()
</div>
</div>
<!-- freightcalmodel-->
<div id="freightcalmodel" 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">&times;</button>
<h4 class="modal-title">Freight Calculation On</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="optFreight" checked="checked" value='0' id="optFreight"> Basic Amount</label>
</div>
<div class="radio">
<label><input type="radio" name="optFreight" id="optFreight" value='1' > After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="FreightOption" onclick="SetfreightOption();" style="margin-top: -24px;">&nbsp;&nbsp;<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>
<!-- Modal for Excise Duty Calculation-->
<div class="modal fade" id="ExciseDutyCalModel" role="dialog">
@ -3376,9 +3560,7 @@ $("#insurance").change(function(){
$("#insuranceno").val("");
}
else {
$("#insurancenodiv").show();
$('#insuranceno').val('Yes');
}
$("#insurancenodiv").show();}
});
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
@ -3510,7 +3692,8 @@ $('.AddRevenue').click(function(){
var quantity = $("#Quantity").val();
var itemRate = parseFloat($("#Rate").val()).toFixed(2);
var per=$("#AddPer").val();
if(per == ''){
if(per == '')
{
per=$("#UOM").val();
}
var DisType = $("#DiscountType").val();
@ -3524,7 +3707,7 @@ $('.AddRevenue').click(function(){
var FreightType = $("#drpFreight").val();
var FreightType = $("#drpFreight").val();
var FreightVal = $("#txtFreight").val();
var AfterFreightVal = $("#txtAfterFreight").val();
var NoOfTrip = $("#NOOfTrips").val();
@ -3535,7 +3718,7 @@ $('.AddRevenue').click(function(){
var Service_Description = $('#Service_Description').val();
var Cgst = $("#Cgst").val();
var AfterCgst = $("#AfterCgst").val();
var AfterCgst = $("#AfterCgst").val();
var Sgst = $("#Sgst").val();
var AfterSgst = $("#AfterSgst").val();
var Igst = $("#Igst").val();
@ -3574,21 +3757,21 @@ $('.AddRevenue').click(function(){
addHidden(theForm,"departmentName"+temp,departmentName );
addHidden(theForm,"AvilBudget"+temp,AvilBudget );
addHidden(theForm,"costCode"+temp,costCode );
addHidden(theForm,"materialCode"+temp,materialCode );
addHidden(theForm,"materialCode"+temp,materialCode );
addHidden(theForm,"materialName"+temp,materialName );
addHidden(theForm,"uom"+temp,uom);
addHidden(theForm,"quantity"+temp,quantity);
addHidden(theForm,"itemRate"+temp,itemRate);
addHidden(theForm,"per"+temp,per);
addHidden(theForm,"itemRate"+temp,itemRate);
addHidden(theForm,"per"+temp,per);
addHidden(theForm,"DisType"+temp,DisType);
addHidden(theForm,"DisVal"+temp,DisVal);
addHidden(theForm,"AfterDisVal"+temp,AfterDisVal);
addHidden(theForm,"PackOption"+temp,PackOption);
addHidden(theForm,"PackOption"+temp,PackOption);
addHidden(theForm,"PackType"+temp,PackType);
addHidden(theForm,"PackVal"+temp,PackVal);
addHidden(theForm,"AfterPackVal"+temp,AfterPackVal);
addHidden(theForm,"RevenueCgst"+temp,Cgst);
addHidden(theForm,"RevenueAfterCgst"+temp,AfterCgst);
addHidden(theForm,"RevenueCgst"+temp,Cgst);
addHidden(theForm,"RevenueAfterCgst"+temp,AfterCgst);
addHidden(theForm,"RevenueSgst"+temp,Sgst);
addHidden(theForm,"RevenueAfterSgst"+temp,AfterSgst);
addHidden(theForm,"RevenueIgst"+temp,Igst);
@ -3775,9 +3958,9 @@ function populateValueMainFormForEditRevenueTax()
var rowid = cells[0].innerHTML;
// alert(rowid);
var Packaging = $('#AfterPackVal'+rowid).val() == '' ? '0.00' : $('#AfterPackVal'+rowid).val();
var Cgst = $('#RevenueAfterCgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterCgst'+rowid).val();
var Sgst = $('#RevenueAfterSgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterSgst'+rowid).val();
var Igst = $('#RevenueAfterIgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterIgst'+rowid).val();
var Cgst = $('#RevenueAfterCgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterCgst'+rowid).val();
var Sgst = $('#RevenueAfterSgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterSgst'+rowid).val();
var Igst = $('#RevenueAfterIgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterIgst'+rowid).val();
var Freight = $('#AfterFreightVal'+rowid).val() == '' ? '0.00' : $('#AfterFreightVal'+rowid).val();
var Insurance = $('#Insval'+rowid).val() == '' ? '0.00' : $('#Insval'+rowid).val();
var Discount =$('#AfterDisVal'+rowid).val() == '' ? '0.00' : $('#AfterDisVal'+rowid).val();
@ -3789,15 +3972,15 @@ function populateValueMainFormForEditRevenueTax()
totBasicAmt = parseFloat(totBasicAmt ) + parseFloat(BasicVal);
totDiscountAmt = parseFloat(totDiscountAmt ) + parseFloat(Discount);
totPackagingAmt = parseFloat(totPackagingAmt) + parseFloat(Packaging);
totCgst = parseFloat(totCgst ) + parseFloat(Cgst);
totSgst = parseFloat(totSgst ) + parseFloat(Sgst);
totIgst = parseFloat(totIgst ) + parseFloat(Igst);
totCgst = parseFloat(totCgst ) + parseFloat(Cgst);
totSgst = parseFloat(totSgst ) + parseFloat(Sgst);
totIgst = parseFloat(totIgst ) + parseFloat(Igst);
totFreightAmt = parseFloat(totFreightAmt ) + parseFloat(Freight);
totInsuranceAmt = parseFloat(totInsuranceAmt ) + parseFloat(Insurance);
totOrderSummaryAmt = parseFloat(totOrderSummaryAmt ) + parseFloat(TotalVal);
}
} while (i < rows);
} while (i < rows);
// alert(totOrderSummaryAmt);
$('#txtTotBasicAmount').val(parseFloat(totBasicAmt).toFixed(2) );
@ -4109,28 +4292,29 @@ Editchange();
function change(){
ExceedQuantityCheck();
if($('#Quantity').val() != '' && $('#Rate').val() != '')
if($('#Quantity').val() != '' && $('#Rate').val() != '')
{
var txtQuantity = parseFloat( $('#Quantity').val());
var txtUnitPrice = parseFloat($('#Rate').val());
var Tot = txtQuantity * txtUnitPrice
$('#txtBasicValue').val(parseFloat(Tot).toFixed(2));
if ($("#DiscountType").val()!=0) {
if ($("#DiscountType").val()!=0) {
calculateDiscount(0);
}
if($("#Cgst").val()!=''){
$('#AfterCgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Cgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
$('#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()));
}
//alert($('#Cgst').val());
if($("#Sgst").val()!=''){
$('#AfterSgst').val(calculateSgstTax($('#txtBasicValue').val(),$('#Sgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
$('#AfterSgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Sgst').val(),$('#txtAfterDiscount').val ()== '' ? '0.00' : $('#txtAfterDiscount').val(),$('#txtAfterPackaging').val() == '' ? '0.00' :$('#txtAfterPackaging').val(),$('#txtAfterFreight').val() == '' ? '0.00' :$('#txtAfterFreight').val()));
}
if($("#Igst").val()!=''){
$('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
$('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val(),$('#txtAfterPackaging').val() == '' ? '0.00' :$('#txtAfterPackaging').val(),$('#txtAfterFreight').val() == '' ? '0.00' :$('#txtAfterFreight').val()));
}
@ -4152,8 +4336,8 @@ function change(){
function calculateTotalValue()
{
var Packaging = $('#txtAfterPackaging').val() == '' ? '0.00' : $('#txtAfterPackaging').val();
var Cgst = $('#AfterCgst').val() == '' ? '0.00' : $('#AfterCgst').val();
var Sgst = $('#AfterSgst').val() == '' ? '0.00' : $('#AfterSgst').val();
var Cgst = $('#AfterCgst').val() == '' ? '0.00' : $('#AfterCgst').val();
var Sgst = $('#AfterSgst').val() == '' ? '0.00' : $('#AfterSgst').val();
var Igst = $('#AfterIgst').val() == '' ? '0.00' : $('#AfterIgst').val();
var Freight = $('#txtAfterFreight').val() == '' ? '0.00' : $('#txtAfterFreight').val();
var Insurance = $('#txtInsurance').val() == '' ? '0.00' : $('#txtInsurance').val();
@ -4170,46 +4354,64 @@ function calculateTotalValue()
//ExceedQuantityCheck();
}
function calculateCgstTax(varBasicValue,Cgst,discount)
{
var discount = discount;
var basicValue = parseFloat(varBasicValue-discount);
var Cgst = parseFloat(Cgst);
var ServiceTaxValue = 0.0;
ServiceTaxValue = <?php echo SERVICETAX_CGST; ?>;
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
function calculateSgstTax(varBasicValue,Sgst,discount)
{
var discount = discount;
var basicValue = parseFloat(varBasicValue-discount);
var Sgst = parseFloat(Sgst);
function calculateCgstTax(varBasicValue,Cgst,discount,pack,freight)
{
var discount = discount;
var packaging = pack;
var freight = freight;
var packfreight =parseFloat(packaging)+parseFloat(freight);
// alert( packfreight);
var basicValue1 = parseFloat(varBasicValue-discount);
// alert("basicValue1:"+basicValue1);
var basicValue =parseFloat(basicValue1+packfreight);
var Cgst = parseFloat(Cgst);
// alert("Cgst:"+Cgst);
// alert ("basicValue:"+basicValue);
var ServiceTaxValue = 0.0;
ServiceTaxValue = <?php echo SERVICETAX_CGST; ?>;
ServiceTaxValue = <?php echo SERVICETAX_SGST; ?>;
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
function calculateIgstTax(varBasicValue,Igst,discount)
function calculateSgstTax(varBasicValue,Sgst,discount,pack,freight)
{
var discount = discount;
var packaging = pack;
var freight = freight;
var packfreight =parseFloat(packaging)+parseFloat(freight);
// alert( packfreight);
var basicValue1 = parseFloat(varBasicValue-discount);
var basicValue =parseFloat(basicValue1+packfreight)
var Sgst = parseFloat(Sgst);
var ServiceTaxValue = 0.0;
ServiceTaxValue = <?php echo SERVICETAX_SGST; ?>;
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
function calculateIgstTax(varBasicValue,Igst,discount,pack1,freight1)
{
var discount = discount;
var basicValue = parseFloat(varBasicValue-discount);
var Igst = parseFloat(Igst);
var packaging=parseFloat(pack1);
var freight=parseFloat(freight1);
var packfreight=parseFloat(packaging)+parseFloat(freight);
var basicValue1 = parseFloat(varBasicValue-discount);
var basicValue =parseFloat(basicValue1+packfreight)
var Igst = parseFloat(Igst);
var ServiceTaxValue = 0.0;
ServiceTaxValue = <?php echo SERVICETAX_IGST; ?>;
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
var TAXval = parseFloat(ServiceTaxValue).toFixed(2);
return TAXval;// $('#AfterServiceTax').val(TAXval);
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
function calculateTaxValue()