TAX ISSUE IN AMEND REVENUE AND SERVICE
This commit is contained in:
parent
c470b1907c
commit
8df7a5f7ea
@ -376,9 +376,10 @@ function calculateDiscount()
|
||||
$('#SGSTEditModel').removeAttr("style");
|
||||
$('#IGSTViewModel').attr("style","display:none;");
|
||||
$('#SGSTViewModel').removeAttr("style");
|
||||
|
||||
$('#CGSTArea').attr("style","display:block;");
|
||||
$('#IGSTAddModel').attr("style","display:none;");
|
||||
$('#SGSTAddModel').removeAttr("style");
|
||||
$('#CGSTshow').attr("style","display:block;");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -387,14 +388,14 @@ function calculateDiscount()
|
||||
$('#TotICST').removeAttr("style");
|
||||
$('#SGSTShow').attr("style","display:none;");
|
||||
$('#IGSTShow').attr("style","display:block;");
|
||||
|
||||
$('#CGSTshow').attr("style","display:none;");
|
||||
$('#TotSCST').attr("style","display:none;");
|
||||
$('#IGSTEditModel').removeAttr("style");
|
||||
$('#SGSTModel').attr("style","display:none;");
|
||||
$('#IGSTViewModel').removeAttr("style");
|
||||
$('#IGSTModel').attr("style","display:block;");
|
||||
$('#IGSTAddModel').removeAttr("style");
|
||||
$('#SGSTAddModel').attr("style","display:none;");
|
||||
$('#CGSTArea').attr("style","display:none;");
|
||||
}
|
||||
}
|
||||
/*
|
||||
@ -510,9 +511,13 @@ function calculatePackaging()
|
||||
// }
|
||||
if($('#txtEditVat').val() != '')
|
||||
{
|
||||
vatValue = parseFloat($('#txtEditVat').val());
|
||||
|
||||
var vatValue = parseFloat($('#txtEditVat').val());
|
||||
//alert(vatValue);
|
||||
$('#txtEditGST').val(vatValue);
|
||||
$('#txtEditOtherTax').val(0.00);
|
||||
AfterVat = <?php echo VAT_ONBASICVALUE; ?>;
|
||||
var Vatval = parseFloat(AfterVat).toFixed(2);
|
||||
Vatval = parseFloat(AfterVat).toFixed(2);
|
||||
|
||||
$('#txtEditAfterVat').val(Vatval);
|
||||
}
|
||||
@ -521,7 +526,8 @@ function calculatePackaging()
|
||||
{
|
||||
$('#txtEditAfterVat').val("0.00");
|
||||
}
|
||||
|
||||
calculateGST();
|
||||
calculateOtherTaxes();
|
||||
calculateEditTotalValue();
|
||||
}
|
||||
|
||||
@ -581,6 +587,11 @@ function calculatePackaging()
|
||||
basicValue=basicValue-discount;
|
||||
if($('#txtEditOtherTax').val() != "0" && $('#txtEditOtherTax').val() != '')
|
||||
{
|
||||
$('#txtEditGST').val(0.00);
|
||||
$('#txtEditVat').val(0.00);
|
||||
$('#txtEditAfterVat').val(0.00);
|
||||
|
||||
$('#txtEditAfterGST').val(0.00);
|
||||
|
||||
var OtherTaxValue = parseFloat($('#txtEditOtherTax').val());
|
||||
|
||||
@ -596,6 +607,8 @@ function calculatePackaging()
|
||||
{
|
||||
$('#txtEditAfterOtherTax').val("0.00");
|
||||
}
|
||||
//calculateVat();
|
||||
//calculateGST();
|
||||
calculateEditTotalValue();
|
||||
|
||||
}
|
||||
@ -706,7 +719,7 @@ function calculatePackaging()
|
||||
|
||||
function Editchange(){
|
||||
//ExceedEditQuantityCheck();
|
||||
if($('#EditQuantity').val() != '' && $('#EditRate').val() != '')
|
||||
if(($('#EditQuantity').val() != '' || $('#EditQuantity').val() != 0 ) && ($('#EditRate').val() != '' || $('#EditRate').val() != 0))
|
||||
{
|
||||
var txtQuantity = parseFloat( $('#EditQuantity').val());
|
||||
var txtUnitPrice = parseFloat($('#EditRate').val());
|
||||
@ -1412,6 +1425,7 @@ function calculateEditTaxValue()
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="CGSTArea">
|
||||
<div class="col-md-2">
|
||||
<label>CGST in %</label>
|
||||
<div class="form-group">
|
||||
@ -1430,6 +1444,7 @@ function calculateEditTaxValue()
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -1700,7 +1715,7 @@ function calculateEditTaxValue()
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3" id="CGSTshow">
|
||||
<label >Total CGST Amount In INR </label>
|
||||
|
||||
<?php
|
||||
@ -2176,13 +2191,13 @@ function validateEditRevenueTax()
|
||||
$('#EditMaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditQuantity').val() == '')
|
||||
else if($('#EditQuantity').val() == '' || $('#EditQuantity').val() == 0)
|
||||
{
|
||||
alert('Please Enter the Quantity value');
|
||||
$('#EditQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditRate').val() == '')
|
||||
else if($('#EditRate').val() == '' || $('#EditRate').val() == 0)
|
||||
{
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#EditRate').focus();
|
||||
|
||||
@ -20,7 +20,7 @@ $DeliverOption='';
|
||||
$PaymentOtherDescription='';
|
||||
|
||||
$ServiceMaterialDescription='';
|
||||
|
||||
$Reqon='';
|
||||
$Deliverydt='';
|
||||
$DeliverSchedule='';
|
||||
$MaxPoDate = '';
|
||||
@ -74,6 +74,7 @@ if(!empty($POMaster))
|
||||
$PaymentOtherDescription=$Req->PaymentOtherDescription;
|
||||
$WrkStatus=$Req->ServiceWorkStatus;
|
||||
$StatusName=$Req->StatusName;
|
||||
$RequesterName='';
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,10 +84,12 @@ if(!empty($RequistionDetails))
|
||||
|
||||
foreach ($RequistionDetails as $ReqDet)
|
||||
{
|
||||
// $Reqon=$ReqDet->ReqDate;
|
||||
//print_r($RequistionDetails);
|
||||
// $Reqon=$ReqDet->ReqDate;
|
||||
$Reqonn=new DateTime($ReqDet->ReqDate);
|
||||
$Reqon=$Reqonn->format('Y-m-d');
|
||||
$Requestedby=$ReqDet->Requestedby;
|
||||
//echo $ReqDet->FirstName . "3";die();
|
||||
$RequesterName=$ReqDet->FirstName;
|
||||
//$Status=$ReqDet->Status;
|
||||
}
|
||||
@ -476,7 +479,7 @@ function EditRatechange(){
|
||||
}
|
||||
//EditExceedQuantityCheck();
|
||||
|
||||
if($('#EditQuantity').val() != '' && $('#EditRate').val() != '')
|
||||
if(($('#EditQuantity').val() != '' || $('#EditQuantity').val() != 0.00) && ($('#EditRate').val() != '' || $('#EditRate').val() != 0.00))
|
||||
{
|
||||
var txtQuantity = parseFloat( $('#EditQuantity').val());
|
||||
var txtUnitPrice = parseFloat($('#EditRate').val());
|
||||
@ -484,17 +487,35 @@ function EditRatechange(){
|
||||
|
||||
var Tot = txtQuantity * frequencyValue * txtUnitPrice
|
||||
$('#txtEditBasicValue').val(parseFloat(Tot).toFixed(2));
|
||||
ExceedBudget(Tot, $('#EditAvlBudAmt').val());
|
||||
ExceedBudget(Tot, $('#EditAvlBudAmt').val());
|
||||
|
||||
var ecgst=$('#EditCgst').val() == '' ? '0.00' :$('#EditCgst').val();
|
||||
$('#EditSgst').val(ecgst);
|
||||
var esgst=$('#EditSgst').val()==''?'0.00': $('#EditSgst').val();
|
||||
var eigst=$('#EditIgst').val()==''?'0.00': $('#EditIgst').val();
|
||||
|
||||
|
||||
$('#EditAfterCgst').val(calculateCgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val()));
|
||||
$('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditSgst').val()));
|
||||
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val()));
|
||||
$('#EditAfterCgst').val(calculateCgstTax($('#txtEditBasicValue').val(),ecgst));
|
||||
$('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),esgst));
|
||||
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),eigst));
|
||||
calculateTotalEditOrdervalue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function SGSTchange()
|
||||
{
|
||||
var esgst=$('#EditSgst').val()==''?'0.00': $('#EditSgst').val();
|
||||
$('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),esgst));
|
||||
calculateTotalEditOrdervalue();
|
||||
}
|
||||
function IGSTchange()
|
||||
{
|
||||
var isgst=$('#EditIgst').val()==''?'0.00': $('#EditIgst').val();
|
||||
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),isgst));
|
||||
calculateTotalEditOrdervalue();
|
||||
}
|
||||
|
||||
|
||||
// function EditExceedQuantityCheck()
|
||||
// {
|
||||
@ -535,7 +556,7 @@ function EditRatechange(){
|
||||
var Cgst = parseFloat($('#EditAfterCgst').val());
|
||||
var Sgst = parseFloat($('#EditAfterSgst').val());
|
||||
var Igst = parseFloat($('#EditAfterIgst').val());
|
||||
var otherallowance= parseFloat($('#otherallowance').val());
|
||||
var otherallowance= parseFloat($('#otherallowance').val()==''?'0.00':$('#otherallowance').val());
|
||||
|
||||
var TotAmt = basicValue + Cgst+ Sgst + Igst +otherallowance;
|
||||
|
||||
@ -971,7 +992,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'EditCgst','value' => set_value('EditCgst'),'id'=>'EditCgst', 'class' => 'form-control num' ,'placeholder' => 'CGST TAX PERCENTAGE','onchange'=>'EditRatechange()');
|
||||
$data = array('name' => 'EditCgst','value' => set_value('EditCgst'),'id'=>'EditCgst','onkeypress'=>'return isNumberKey(event);', 'class' => 'form-control num' ,'placeholder' => 'CGST TAX PERCENTAGE','onchange'=>'EditRatechange()');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -981,7 +1002,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'EditAfterCgst','value' => set_value('EditAfterCgst'),'id'=>'EditAfterCgst', 'class' => 'form-control num' ,'placeholder' => 'After CGST','readonly' => 'true');
|
||||
$data = array('name' => 'EditAfterCgst','value' => set_value('EditAfterCgst'),'id'=>'EditAfterCgst', 'onkeypress'=>'return isNumberKey(event);', 'class' => 'form-control num' ,'placeholder' => 'After CGST','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -999,7 +1020,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'EditSgst','value' => set_value('EditSgst'),'id'=>'EditSgst', 'class' => 'form-control num' ,'placeholder' => 'SGST TAX PERCENTAGE','onchange'=>'EditRatechange()');
|
||||
$data = array('name' => 'EditSgst','value' => set_value('EditSgst'),'id'=>'EditSgst','onkeypress'=>'return isNumberKey(event);' , 'class' => 'form-control num' ,'placeholder' => 'SGST TAX PERCENTAGE','onchange'=>'SGSTchange()');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1028,7 +1049,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'EditIgst','value' => set_value('EditIgst'),'id'=>'EditIgst', 'class' => 'form-control num' ,'placeholder' => 'IGST TAX PERCENTAGE','onchange'=>'EditRatechange()');
|
||||
$data = array('name' => 'EditIgst','value' => set_value('EditIgst'),'id'=>'EditIgst', 'onkeypress'=>'return isNumberKey(event);', 'class' => 'form-control num' ,'placeholder' => 'IGST TAX PERCENTAGE','onchange'=>'IGSTchange()');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1053,7 +1074,7 @@ $(document).ready(function () {
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'otherallowance','value' => set_value('otherallowance'),'id'=>'otherallowance', 'class' => 'form-control num','onchange'=>'EditRatechange()');
|
||||
$data = array('name' => 'otherallowance','value' => set_value('otherallowance'),'id'=>'otherallowance', 'onkeypress'=>'return isNumberKey(event);', 'class' => 'form-control num','onchange'=>'EditRatechange()');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1831,13 +1852,13 @@ function validateServiceTax()
|
||||
$('#EditMaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditQuantity').val() == '')
|
||||
else if($('#EditQuantity').val() == '' || $('#EditQuantity').val() == 0.00)
|
||||
{
|
||||
alert('Please Enter the Quantity value');
|
||||
$('#EditQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EditRate').val() == '')
|
||||
else if($('#EditRate').val() == '' || $('#EditRate').val() == 0.00)
|
||||
{
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#EditRate').focus();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user