chang purchase module-2 14/11/024 -vadivel j

This commit is contained in:
vadivel J 2024-11-14 17:59:02 +05:30
parent ffff9c53c0
commit 3bcf5fe6f5
3 changed files with 76 additions and 60 deletions

View File

@ -1583,22 +1583,48 @@ if (!empty($INRSYMBOL)) {
StateTaxCheck = $("input:radio[name='Range']:checked").val();
$('#txtPoRange').val(StateTaxCheck);
//alert('Radio clicke:'+StateTaxCheck);
if (StateTaxCheck == "0") {
if (StateTaxCheck == "0") { //local
// style="display:none;"
$('#Vat').removeAttr("style");
$('#TotVat').removeAttr("style");
alert("i am local");
$('#CGSTEditModel').attr("style", "");
$('#SGSTEditModel').attr("style", "");
$('#IGSTEditModel').attr("style", "display:none");
$('#cgstContainerView').attr("style", "");
$('#sgstContainerView').attr("style", "");
$('#igstContainerView').attr("style", "display:none");
$('#CGSTAddModel').attr("style","");
$('#SGSTAddModel').attr("style","");
$('#IGSTAddModel').attr("style","display:none");
$('#CST').attr("style", "display:none;");
$('#TotCST').attr("style", "display:none;");
} else {
} else { //interstate
$('#CST').removeAttr("style");
$('#TotCST').removeAttr("style");
$('#CGSTEditModel').attr("style", "display:none");
$('#SGSTEditModel').attr("style", "display:none");
$('#IGSTEditModel').attr("style", "");
$('#cgstContainerView').attr("style", "display:none");
$('#sgstContainerView').attr("style","display:none");
$('#igstContainerView').attr("style","");
$('#CGSTAddModel').attr("style","display:none");
$('#SGSTAddModel').attr("style","display:none");
$('#IGSTAddModel').attr("style","");
$('#Vat').attr("style", "display:none;");
$('#TotVat').attr("style", "display:none;");
}
}
$(document).ready(function(){
SetVatorCST()
})
function SetVatCalculation() {
VatCalculation = $("input:radio[name='optVat']:checked").val();
$('#VatCalModel').modal('hide');
@ -2440,8 +2466,8 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-3" style='display:none;' id='txtPoRange'>
<b><u>Select Tax Range<span class="badge mandatory">*</span></u></b><br />
<div class="centered">
<?php echo form_label('Local', 'Local') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", "id" => "Local", "value" => "0", 'checked' => set_radio('Range', '0', TRUE))); ?>
<?php echo form_label('Inter state', 'Inter state') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", "id" => "Inter_state", "value" => "1", 'checked' => set_radio('Range', '1', FALSE))); ?>
<?php echo form_label('Local', 'Local') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", 'onchange' => 'SetVatorCST();', "id" => "Local", "value" => "0", 'checked' => set_radio('Range', '0', ))); ?>
<?php echo form_label('Inter state', 'Inter state') . "&nbsp;&nbsp;" . form_radio(array("name" => "Range", 'onchange' => 'SetVatorCST();' , "id" => "Inter_state", "value" => "1", 'checked' => set_radio('Range', '1', ))); ?>
</div>
</div>
<div class="col-md-3" style='display:none;' id='workstatus'>
@ -2843,7 +2869,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-md-3">
<div class="col-md-3" id="cgstContainerView">
<label>CGST <?php echo "($INRSYM)" ?> </label>
<?php
$data = array('name' => 'txtTotalCGST', 'value' => set_value('txtTotalCGST'), 'id' => 'txtTotalCGST', 'class' => 'form-control num', 'readonly' => 'true');
@ -2851,14 +2877,15 @@ if (!empty($INRSYMBOL)) {
?>
</div>
<div class="col-md-3" id="displaySGST">
<div class="col-md-3" id="sgstContainerView">
<label>SGST <?php echo "($INRSYM)" ?> </label>
<?php
$data = array('name' => 'txtTotalSGST', 'value' => set_value('txtTotalSGST'), 'id' => 'txtTotalSGST', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="col-md-3" id="displayIGST" style="display:none;">
<div class="col-md-3" id="igstContainerView" >
<label> IGST <?php echo "($INRSYM)" ?> </label>
<?php
$data = array('name' => 'txtTotalIGST', 'value' => set_value('txtTotalIGST'), 'id' => 'txtTotalIGST', 'class' => 'form-control num', 'readonly' => 'true');
@ -3324,7 +3351,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="row">
<div class="row" id="CGSTAddModel">
<div class="col-md-6"></div>
<div class="col-md-3">
<label>CGST In %</label>
@ -3368,8 +3395,8 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="row" style="text-align:left;">
<div id="IGSTAddModel" style="display:none;">
<div class="row" id="IGSTAddModel" >
<div class="col-md-6"></div>
<div class="col-md-3">
<label>IGST In %</label>
@ -3388,8 +3415,8 @@ if (!empty($INRSYMBOL)) {
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="row">
@ -3567,7 +3594,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<div class="row">
<div class="row" >
<div class="col-md-3">
</div>
@ -5279,7 +5306,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<div class="row">
<div class="row" >
<div class="col-md-6" align="right">
CGST In %
@ -5712,10 +5739,10 @@ if (!empty($INRSYMBOL)) {
</div>
<!-- freight -->
<div class="row">
<div class="row" id="CGSTEditModel">
<div class="col-md-6">
</div>
<div class="col-md-3">
<div class="col-md-3" >
<label>CGST in %</label>
<div class="form-group">
<?php
@ -6236,29 +6263,7 @@ if (!empty($INRSYMBOL)) {
clearTotalItemValues();
});
$(document).ready(function () {
$('#Local').click(function () {
//for local tax range selection
$('#displayIGST').hide();
$('#displaySGST').show();
$('#IGSTAddModel').hide();
$('#SGSTAddModel').show();
$('#IGSTEditModel').hide();
$('#SGSTEditModel').show();
});
$('#Inter_state').click(function () {
//for inter state tax range selection
$('#SGSTAddModel').hide();
$('#displaySGST').hide();
$('#displayIGST').show();
$('#IGSTAddModel').show();
$('#IGSTEditModel').show();
$('#SGSTEditModel').hide();
});
});
$(document).ready(function () {
$('#Date').click(function () {
//for Date range selection

View File

@ -1644,13 +1644,16 @@ if (!empty($getlogpodtl)) {
$('#Vat').removeAttr("style");
$('#TotSCST').removeAttr("style");
$('#CST').attr("style", "display:none;");
$('#TotICST').attr("style", "display:none;");
$('#IGSTEditModel').attr("style", "display:none;");
$('#SGSTEditModel').removeAttr("style");
$('#IGSTViewModel').attr("style", "display:none;");
$('#SGSTViewModel').removeAttr("style");
$('#IGSTAddModel').attr("style", "display:none;");
$('#SGSTAddModel').removeAttr("style");
$('#TotICST').attr("style", "display:none;");
$('#cgstContainerEdit').attr("style", "");
$('#cgstContainerView').attr("style", "");
$('#cgstContainerAdd').attr("style","");
$('#IGSTEditModel').attr("style", "display:none;");
$('#SGSTEditModel').removeAttr("style");
$('#IGSTViewModel').attr("style", "display:none;");
$('#SGSTViewModel').removeAttr("style");
$('#IGSTAddModel').attr("style", "display:none;");
$('#SGSTAddModel').removeAttr("style");
$('#RevenueIgst').val(0);
$('#RevenueAfterIgst').val(0);
$('#txttaxcheck').val(0);
@ -1663,6 +1666,9 @@ if (!empty($getlogpodtl)) {
$('#TotICST').removeAttr("style");
$('#Vat').attr("style", "display:none;");
$('#TotSCST').attr("style", "display:none;");
$('#cgstContainerEdit').attr("style", "display:none");
$('#cgstContainerView').attr("style", "display:none");
$('#cgstContainerAdd').attr("style","display:none");
$('#IGSTEditModel').removeAttr("style");
$('#SGSTEditModel').attr("style", "display:none;");
$('#IGSTViewModel').removeAttr("style");
@ -2374,7 +2380,7 @@ if (!empty($getlogpodtl)) {
?>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-3" id="cgstContainerView">
<label>Total CGST Amount <?php echo "($INRSYM)" ?> </label>
<?php
@ -2976,13 +2982,13 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="form-row">
<div class="form-row" id="cgstContainerAdd">
<div class="form-group col-md-6"></div>
<div class="form-group col-md-3">
<label>CGST In %</label>
<label for="Cgst">CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'Cgst', 'value' => set_value('Cgst', 0), 'id' => 'Cgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();RevenueChangeSgst();');
$data = array('name' => 'Cgst','value' => set_value('Cgst', 0), 'id' => 'Cgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();RevenueChangeSgst();');
echo form_input($data);
?>
</div>
@ -3335,10 +3341,10 @@ if (!empty($getlogpodtl)) {
</div>
<div class="form-row">
<div class="form-row" id="cgstContainerEdit">
<div class="form-group col-md-6"></div>
<div class="form-group col-md-3">
<label>CGST In %</label>
<label for="EditCgst">CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCgst', 'value' => set_value('EditCgst', 0), 'id' => 'EditCgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange();RevenueChangeEditSgst();');
@ -3347,8 +3353,8 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="form-group col-md-3">
<label>CGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<label for="EditAfterCgst" > CGST Amt <?php echo "($INRSYM)" ?> </label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterCgst', 'value' => set_value('EditAfterCgst', 0), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
@ -3667,7 +3673,7 @@ if (!empty($getlogpodtl)) {
<div class="form-row">
<div class="form-group col-md-8"></div>
<div class="form-group col-md-2">
<label>CGST In %</label>
<label for="ViewCGST">CGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'ViewCGST', 'value' => set_value('tViewCGST'), 'id' => 'ViewCGST', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateCST(0);', 'readonly' => 'true',);

View File

@ -1564,6 +1564,9 @@ if (!empty($INRSYMBOL)) {
$('#TotSCST').removeAttr("style");
$('#CST').attr("style", "display:none;");
$('#TotICST').attr("style", "display:none;");
$('#cgstContainerEdit').attr("style", "");
$('#cgstContainerView').attr("style", "");
$('#cgstContainerAdd').attr("style","");
$('#IGSTEditModel').attr("style", "display:none;");
$('#SGSTEditModel').removeAttr("style");
@ -1574,6 +1577,9 @@ if (!empty($INRSYMBOL)) {
$('#TotICST').removeAttr("style");
$('#Vat').attr("style", "display:none;");
$('#TotSCST').attr("style", "display:none;");
$('#cgstContainerEdit').attr("style", "display:none");
$('#cgstContainerView').attr("style", "display:none");
$('#cgstContainerAdd').attr("style","display:none");
$('#IGSTEditModel').removeAttr("style");
$('#SGSTEditModel').attr("style", "display:none;");
$('#IGSTAddModel').removeAttr("style");
@ -2153,7 +2159,7 @@ if (!empty($INRSYMBOL)) {
?>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-3" id="cgstContainerView">
<label>Total CGST Amount <?php echo "($INRSYM)" ?> </label>
<?php
@ -2665,7 +2671,7 @@ if (!empty($INRSYMBOL)) {
<!-- cgst -->
<div class="form-row">
<div class="form-row" id="cgstContainerAdd">
<div class="form-group col-md-6"></div>
<div class="form-group col-md-3">
<label>CGST In %</label>
@ -3018,7 +3024,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="form-row">
<div class="form-row" id="cgstContainerEdit">
<div class="form-group col-md-6"></div>
<div class="form-group col-md-3">
<label>CGST In %</label>
@ -3065,8 +3071,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="form-row" style="text-align:left;">
<div id="IGSTEditModel" style="display:none;">
<div class="form-row" id="IGSTEditModel" style="display:none;">
<div class="col-md-6"></div>
<div class="form-group col-md-3">
<label>IGST In %</label>
@ -3086,7 +3091,7 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
</div>
</div>
<div class="form-row">