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