Commit 6203ed48 authored by steurwadkar's avatar steurwadkar

F17ABAS001 JSP and JS commit for GSTR3B ITC and Inward nill rated supplies


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106594 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 53aab4ad
......@@ -26,18 +26,31 @@ function onLoad()
// alert($(gstType).text())
if(global_edit_mode == "E")
{
setOptionDisabled(gstType,"L")
setOptionDisabled(gstType,"V")
$(gstType).select2();
$(gstType).prev('.select2').find('.select2-selection').on('focus', function()
{
var fullLbl = this.getAttribute("aria-labelledby");
var name = fullLbl.substring("select2-".length);
name = name.substring(0,name.indexOf("-container"))
name = name.replace("Detail11","Detail1.1.");
console.log("name:------------"+name);
gotFocus(document.getElementById(name));
});
if(global_obj_name == "gstr")
{
setOptionDisabled(gstType,"L");
}
else if(global_obj_name == "gstr_purc")
{
setOptionDisabled(gstType,"L");
setOptionDisabled(gstType,"V");
}
else if(global_obj_name == "gstr3b")
{
setOptionDisabled(gstType,"O");
setOptionDisabled(gstType,"E");
setOptionDisabled(gstType,"N");
}
$(gstType).select2();
$(gstType).prev('.select2').find('.select2-selection').on('focus', function()
{
var fullLbl = this.getAttribute("aria-labelledby");
var name = fullLbl.substring("select2-".length);
name = name.substring(0,name.indexOf("-container"))
name = name.replace("Detail11","Detail1.1.");
console.log("name:------------"+name);
gotFocus(document.getElementById(name));
});
}
if(global_obj_name == "gstr")
......@@ -60,10 +73,18 @@ function onLoad()
}
else if(global_obj_name == "gstr3b")
{
if( gstType.value == "O" || (global_edit_mode == "V" && ($(gstType).text() == "Outward and Inward Supplay Details") ) )
{
openExtraContainer("O");
}
if( gstType.value == "O" || (global_edit_mode == "V" && ($(gstType).text() == "Outward and Inward Supply Details") ) )
{
openExtraContainer("O");
}
else if(gstType.value == "E" || (global_edit_mode == "V" && ($(gstType).text() == "Eligibility ITC") ))
{
openExtraContainer("E");
}
else if(gstType.value == "N" || (global_edit_mode == "V" && ($(gstType).text() == "Inward supplies nil-exmpted-nongst") ))
{
openExtraContainer("N");
}
}
......@@ -113,10 +134,18 @@ function openExtraContainer(gstType)
}
else if(global_obj_name == "gstr3b")
{
if( gstType == "O" )
{
iframe.src = "/ibase/webitm/jsp/GST3OutInlSupplies.jsp";
}
if( gstType == "O" )
{
iframe.src = "/ibase/webitm/jsp/GST3OutInlSupplies.jsp";
}
else if(gstType == "E")
{
iframe.src = "/ibase/webitm/jsp/GSTR3BItcDetails.jsp";
}
else if(gstType == "N")
{
iframe.src = "/ibase/webitm/jsp/GSTR3BNilInterSupplies.jsp";
}
}
global_gst_type = gstType;
extraCont.appendChild(iframe);
......@@ -266,7 +295,7 @@ function getRecordsCallBackFn(retVal)
var parser = new DOMParser();
xmldoc = parser.parseFromString(retVal,"text/xml");
}
var errorsNode = xmldoc.getElementsByTagName("Errors");
if(errorsNode.length == 0)
......@@ -298,6 +327,17 @@ function getRecordsCallBackFn(retVal)
domNum = +tranTypeAttr - 25;
}
}
else if(global_obj_name == "gstr3b")
{
if( global_gst_type == "E" )
{
domNum = +tranTypeAttr - 8;
}
else if(global_gst_type == "N")
{
domNum = +tranTypeAttr - 27;
}
}
else
{
domNum = +tranTypeAttr;
......@@ -310,45 +350,45 @@ function getRecordsCallBackFn(retVal)
if(detailNode.firstChild != null && detailNode.firstChild != undefined && detailNode.nodeName == "detail1")
{
var colNodeList = detailNode.childNodes;
var colCount = colNodeList.length;
var tranId = "";
var tranType = "";
var amount = "";
//alert(detailNode.nodeName);
for(ctr = 0 ; ctr < colCount; ctr++)
{
var colNode = colNodeList.item(ctr);
if(colNode.firstChild != null || colNode.firstChild != undefined)
{
// alert(detailNode.nodeName);
if( colNode.nodeName == "tran_id")
{
tranId = colNode.firstChild.nodeValue;
}
else if(colNode.nodeName == "tran_type")
{
tranType = colNode.firstChild.nodeValue;
}
else if(colNode.nodeName == "amount")
{
amount = colNode.firstChild.nodeValue;
}
}
else
{
var colCount = colNodeList.length;
var tranId = "";
var tranType = "";
var amount = "";
//alert(detailNode.nodeName);
for(ctr = 0 ; ctr < colCount; ctr++)
{
var colNode = colNodeList.item(ctr);
}
}
innerDoc.getElementById('Detail1.'+domNum+'.tran_id'+domNum+'').value = tranId;
innerDoc.getElementById('Detail1.'+domNum+'.amount'+domNum+'').value = amount;
if(global_edit_mode == "V")
{
innerDoc.getElementById('Detail1.'+domNum+'.amount'+domNum+'').setAttribute("readonly","true");
innerDoc.getElementById('Detail1.'+domNum+'.amount'+domNum+'').style.color = "blue";
}
}
if(colNode.firstChild != null || colNode.firstChild != undefined)
{
// alert(detailNode.nodeName);
if( colNode.nodeName == "tran_id")
{
tranId = colNode.firstChild.nodeValue;
}
else if(colNode.nodeName == "tran_type")
{
tranType = colNode.firstChild.nodeValue;
}
else if(colNode.nodeName == "amount")
{
amount = colNode.firstChild.nodeValue;
}
}
else
{
}
}
innerDoc.getElementById('Detail1.'+domNum+'.tran_id'+domNum+'').value = tranId;
innerDoc.getElementById('Detail1.'+domNum+'.amount'+domNum+'').value = amount;
if(global_edit_mode == "V")
{
innerDoc.getElementById('Detail1.'+domNum+'.amount'+domNum+'').setAttribute("readonly","true");
innerDoc.getElementById('Detail1.'+domNum+'.amount'+domNum+'').style.color = "blue";
}
}
else if(detailNode.firstChild != null && detailNode.firstChild != undefined && detailNode.nodeName == "detail2")
{
var colNodeList = detailNode.childNodes;
......@@ -488,7 +528,7 @@ function save2DBCustom(pkValues)
}
function saveCallBackFn(retVal)
{
// alert(retVal)
//alert(retVal)
var xmldoc = null;
if (window.ActiveXObject)
{
......@@ -516,9 +556,9 @@ function saveCallBackFn(retVal)
}
else
{
tranIds = tranIds +"," +tranIdNode.firstChild.nodeValue;
tranIds = tranIds +", " +tranIdNode.firstChild.nodeValue;
}
// alert(tranIds);
//alert(tranIds);
}
var msgOnSave = "transaction completed";
window.parent.transSavedToSuccess( msgOnSave , tranIds , global_obj_name );
......@@ -572,9 +612,18 @@ function getqueryStringCustom(formname)
noOfRec = 5;
onlyHeader = false;
}
else if(global_gst_type == "E")
{
noOfRec = 19;
onlyHeader = false;
}
else if(global_gst_type == "N")
{
noOfRec = 4;
onlyHeader = true;
}
}
for ( var i = 1; i <= noOfRec; i++)
{
var tempQstr = "";
......@@ -656,46 +705,56 @@ function custValidateFld(obj)
if(global_obj_name == "gstr")
{
if(obj.value == "L" )
{
validateFld(obj);
openExtraContainer(obj.value);
}
else
{
hideExtraContainer();
validateFld(obj);
}
if(obj.value == "L" )
{
validateFld(obj);
openExtraContainer(obj.value);
}
else
{
hideExtraContainer();
validateFld(obj);
}
}
else if(global_obj_name == "gstr_purc")
{
if( obj.value == "L" )
{
validateFld(obj);
openExtraContainer(obj.value);
}
else if(obj.value == "V")
{
validateFld(obj);
openExtraContainer(obj.value);
}
else
{
hideExtraContainer();
validateFld(obj);
}
if( obj.value == "L" )
{
validateFld(obj);
openExtraContainer(obj.value);
}
else if(obj.value == "V")
{
validateFld(obj);
openExtraContainer(obj.value);
}
else
{
hideExtraContainer();
validateFld(obj);
}
}
else if(global_obj_name == "gstr3b")
{
if( obj.value == "O" )
{
validateFld(obj);
openExtraContainer(obj.value);
}
else
{
hideExtraContainer();
validateFld(obj);
}
if( obj.value == "O" )
{
validateFld(obj);
openExtraContainer(obj.value);
}
else if(obj.value == "E")
{
validateFld(obj);
openExtraContainer(obj.value);
}
else if(obj.value == "N")
{
validateFld(obj);
openExtraContainer(obj.value);
}
else
{
hideExtraContainer();
validateFld(obj);
}
}
}
\ No newline at end of file
This diff is collapsed.
<html>
<head>
<link type="text/css" rel="stylesheet" href="/ibase/webitm/css/GstCustomTransaction.css"/>
<script>
</script>
<title></title>
<meta content="">
<style></style>
</head>
<body>
<table class="gstTableClass">
<thead class="table-head">
<tr>
<th align="left" valign="top" >Nature of supplies</th>
<th align="right" valign="top" >Inter-state Amount</th>
<th align="right" valign="bottom" >Intra-state Amount</th>
</tr>
</thead>
<tbody class="table-body">
<tr>
<td align="left" valign="bottom">From a supplier under composition scheme, Exempt and Nil rated supplies</td>
<td> <input type="number" style="position:relative;TYPE:number;text-align:RIGHT" class="tableInputField" required="" id="Detail1.1.amount1" name="Detail1.1.amount" value="0.00" > </td>
<td> <input type="number" style="position:relative;TYPE:number;text-align:RIGHT" class="tableInputField" required="" id="Detail1.2.amount2" name="Detail1.2.amount" value="0.00" > </td>
<input type="hidden" id="Detail1.1.tran_type1" name="Detail1.1.tran_type" type="text" value="28"/>
<input type="hidden" id="Detail1.2.tran_type2" name="Detail1.2.tran_type" type="text" value="29"/>
<input type="hidden" id="Detail1.1.tran_id1" name="Detail1.1.tran_id" type="text"/>
<input type="hidden" id="Detail1.2.tran_id2" name="Detail1.2.tran_id" type="text"/>
<input type="hidden" id="Detail1.1.doc_type1" name="Detail1.1.doc_type" type="text"/>
<input type="hidden" id="Detail1.2.doc_type2" name="Detail1.2.doc_type" type="text"/>
</tr>
<tr>
<td align="left" valign="bottom">Non GST supply</td>
<td> <input type="number" style="position:relative;TYPE:number;text-align:RIGHT" class="tableInputField" required="" id="Detail1.3.amount3" name="Detail1.3.amount" value="0.00" > </td>
<td> <input type="number" style="position:relative;TYPE:number;text-align:RIGHT" class="tableInputField" required="" id="Detail1.4.amount4" name="Detail1.4.amount" value="0.00" > </td>
<input type="hidden" id="Detail1.3.tran_type3" name="Detail1.3.tran_type" type="text" value="30"/>
<input type="hidden" id="Detail1.4.tran_type4" name="Detail1.4.tran_type" type="text" value="31"/>
<input type="hidden" id="Detail1.3.tran_id3" name="Detail1.3.tran_id" type="text"/>
<input type="hidden" id="Detail1.4.tran_id4" name="Detail1.4.tran_id" type="text"/>
<input type="hidden" id="Detail1.1.doc_type3" name="Detail1.1.doc_type" type="text"/>
<input type="hidden" id="Detail1.2.doc_type4" name="Detail1.2.doc_type" type="text"/>
</tr>
</tbody>
</table>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment