Commit 92865a31 authored by kdabholkar's avatar kdabholkar

Adding new JSP for custom mismatch sheet .

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@189031 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 31c8d5ba
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="ibase.utility.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.util.zip.GZIPOutputStream"%>
<%@ page import="java.net.URLEncoder"%>
<%@ page import="java.io.*,org.w3c.dom.Document"%>
<%@ page import="ibase.webitm.ejb.gst.GSTDataSubmitWizEJB,ibase.utility.E12GenericUtility"%>
<%@ page import="org.apache.poi.ss.usermodel.Workbook,org.apache.poi.xssf.usermodel.XSSFWorkbook"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
ibase.utility.UserInfoBean userInfo = (ibase.utility.UserInfoBean)session.getAttribute("USER_INFO");
String referer = request.getRequestURL().toString();
referer = referer.substring( referer.indexOf( "ibase" ) - 1 );
String queryString = (String)request.getQueryString();
queryString = (queryString == null) ? "" : queryString;
referer = referer +"?"+queryString;
if( userInfo == null )
{
%>
<jsp:forward page="/jsp/DirectAccess.jsp">
<jsp:param name="REFERER" value="<%=referer%>"/>
</jsp:forward>
<%
}
%>
<%
String siteCode = "";
if(userInfo != null)
{
siteCode = userInfo.getSiteCode();
}
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/ibase/webitm/css/Galaxy/galaxy-theme.css" media="screen"/>
<link href="/ibase/webitm/css/htmlWizard.css" rel="stylesheet"/>
<script type="text/javascript" src="/ibase/webitm/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/jquery-ui-1.10.4.custom.min.js"></script>
<script language="Javascript" src="/ibase/webitm/js/date.js"></script>
<style>
.headerDiv
{
font-size: 18px;
color: #5893bf;
padding-left: 20px;
padding-top: 0;
height: 32px;
line-height: 32px;
}
.mainContainer
{
border : 1px solid lightgray !important;
border-top: 2px solid #7bc6ff !important;
-moz-border : 1px solid lightgray !important;
-moz-border-top: 2px solid #7bc6ff !important;
padding-top: 10px;
padding-bottom: 10px;
overflow:auto;
background-color: white;
height: 200px;
}
.inputContainer
{
padding-left: 40px;
padding-top: 20px;
}
.inputDiv
{
display: inline;
}
.inputLable
{
color: #555;
font-size: 16px;
text-align: right;
width:132px;
}
.eachLineFields div
{
display: inline-block;
margin-bottom: 5px;
}
.eachField div
{
display: inline-block;
margin-left: 5px;
float: left;
}
.btnDiv
{
margin-top: 5px;
padding-left: 20px;
}
#buttonreplacement
{
width: 150px;
height: 80px;
background-color: #fff;
margin:0px auto;
text-align: center;
z-index:1005;
display:none;
position: fixed;
top: 40%;
left: 40%;
}
#buttonreplacement>img{
margin-top:15px;
margin-left:50px;
display: table-cell;
}
</style>
<script>
function returnPeriodDropdown()
{
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var monthCode = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
var selectedMonthCode = "";
var curDate = new Date();
var prevMonth = new Date().addMonths(-1);
selectedMonthCode = monthCode[prevMonth.getMonth()]+prevMonth.getFullYear();
var gstStartMonth = 7;
var gstStartYear = 2017;
var curMonth = curDate.getMonth();
var diffMonths = (curDate.getFullYear() - gstStartYear - 1) * 12 + gstStartMonth + curMonth;
var prevdate = curDate.addMonths(-diffMonths);
for(var i=0; i<diffMonths; i++)
{
var nextDate = prevdate.addMonths(1);
$('#yearMonthInput').append($('<option />').val(monthCode[nextDate.getMonth()] + nextDate.getFullYear()).html(months[nextDate.getMonth()] + " " + nextDate.getFullYear()));
if(monthCode[nextDate.getMonth()]+nextDate.getFullYear() == selectedMonthCode)
{
$('#yearMonthInput').val(monthCode[curDate.getMonth()]+""+curDate.getFullYear()).change();
}
prevdate = nextDate;
}
}
function generateFile()
{
var retPeriod = document.getElementById("yearMonthInput").value;
var random = Math.random();
document.getElementById("prdCode").value = retPeriod;
var url ="/ibase/GSTDataSubmitWizServlet?random="+random;
document.getElementById("dataForm").action = url;
document.getElementById("dataForm").submit();
//Commented on 23/10/2017 for Infinispan lock issue
/* var overlay = document.getElementById( "overlay" );
overlay.setAttribute( "style", "position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color:#000; opacity: .45; z-index:1003; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;");
document.getElementById("buttonreplacement").style.display = "block";
var siteCode = document.getElementById("siteCode").value;
var key = "GSTR_OFFLINE_FILE:"+siteCode+":"+retPeriod+":"+returnType+":"+random;
hideWaitImg(key); */
}
function hideWaitImg(key)
{
$.ajax({
url : "/ibase/GSTDataSubmitWizServlet",
type : "POST",
data : {
key : key,
action : "CHECK_HIDE_IMAGE"
},
dataType: "text/plain",
complete: function(xhr,status){
document.getElementById("buttonreplacement").style.display = "none";
var overlay = document.getElementById( "overlay" );
overlay.removeAttribute( "style");
}
});
}
</script>
</head>
<body onload="returnPeriodDropdown();">
<div id="overlay"></div>
<form method="post" action="" id="dataForm">
<div class="bodyContainer">
<div class="headerDiv">
<span>Download custom data file</span>
</div>
<div class="mainContainer">
<div class="inputContainer">
<div class="eachLineFields">
<div class="eachField">
<div class="inputLable">
Month :
</div>
<div class="inputBox">
<select id="yearMonthInput" class="input_editable">
</select>
</div>
</div>
</div>
</div>
<input type="hidden" id="siteCode" name="site_code" value="<%=siteCode %>"/>
<input type="hidden" id="prdCode" name="prd_code"/>
<input type="hidden" id="action" name="action" value="GET_OFFLINE_MISMATCH_FILE"/>
</div>
<div class="btnDiv">
<input type="button" class="button" value="Generate & download file" onclick="generateFile();"/>
</div>
<div id="buttonreplacement">
<img src="/ibase/images/preload.gif" alt="Please wait" ></img>
<span>Please wait......</span>
</div>
</div>
</form>
</body>
</html>
\ No newline at end of file
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