<%@ taglib uri="/tags/struts-bean-el" prefix="bean-el" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/tags/esr-core" prefix="esrcore" %>
<%@ taglib uri="/tags/fw" prefix="fw" %>
<%@ taglib uri="/tags/valuelist" prefix="vlh" %>
<%@ taglib uri="/tags/struts-bean-el" prefix="bean-el" %>

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShell">
<html-el:form action="/irsReject" method="post">
  <%@ include file="/admin/csrfgentoken.jsp" %>
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTable">
        <tr>
          <td>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTableHead">
              <tr>
	            <td class="moduleBlueBox">&nbsp;</td>
                <td class="moduleHeadline" nowrap><bean-el:message key="label.irsReject.mainHeader"/></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td>

           <table width="100%" border="0" cellspacing="0" cellpadding="0" class="moduleShellTableBody">
		       <tr>
		          <td class="moduleLabel" style="padding:10 0 10 10; text-align: left"><bean-el:message key="label.ssnErrors"/></td>
		         </tr>
		       <c:choose>
		        <c:when test="${vlhlist.valueListInfo.totalNumberOfEntries == 0}">
		         <tr>
		          <td class="darkValue" style="padding:10 0 10 10; text-align: left"><bean-el:message key="label.noDataAvailable"/></td>
		         </tr>
		        </c:when>
		        <c:otherwise>
			      <tr valign="top" width="100%">
			        <td vAlign="top" align="center">
			          <div id="irsComm" style="border-width:0px;">
			            <table id="irsPersonCommResult" align="center" width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleTable" role="presentation">
			              <vlh:root id="irsPersonTableId" value="vlhlist" url="?" includeParameters="*" configName="valueListConfigBeanLookAndFeel">
			              <vlh:addParam name="checkboxName" value="Select" temp="false"/>
			              <tr>
			                <td colspan="5">
			                  <table class="pagelinks">
			                    <tr>
			                      <td width="45%"><img alt=""  src="../images/spacer.gif"></td>
			                        <td width="5%" nowrap="true">
			                          <span class="pagebanner"><c:out value="${vlhlist.valueListInfo.totalNumberOfEntries}"/> Total
			                          - Page (<c:out value="${vlhlist.valueListInfo.pagingPage}"/> of <c:out value="${vlhlist.valueListInfo.totalNumberOfPages}"/>).
			                          &nbsp;</span>
			                        </td>
			                        <td width="5%">
			                      <c:choose>
			                      <c:when test="${vlhlist.valueListInfo.totalNumberOfPages > 1}">
			                        <vlh:paging attributes="class=\"pagelinks\"" pages="10"><c:out value="${pagefutureEGTSettingsTableId}"/>&nbsp;</vlh:paging>
			                      </c:when>
			                      <c:otherwise>
			                        &nbsp;
			                      </c:otherwise>
			                      </c:choose>
			                    </td>
			                      <td width="45%"><img alt=""  src="../images/spacer.gif"></td>
			                    </tr>
			                  </table>
			                </td>
			              </tr>
			              <tr vAlign="top">
			                <td vAlign="top" align="center">
			                  <table summary="Table for Managing Failed IRS Person Submissions" rules="all" class="TableDisplay">
			                    <tr>
			                      <vlh:row bean="irsPerson">

			                      <c:choose>
									<c:when test="${irsPerson.batchTransmissionEntry.correctionInd == 'O'}">
										<c:set var="submitType" value="Original"/>
									</c:when>
									<c:when test="${irsPerson.batchTransmissionEntry.correctionInd == 'C'}">
										<c:set var="submitType" value="Correction"/>
									</c:when>
									<c:when test="${irsPerson.batchTransmissionEntry.correctionInd == 'R'}">
										<c:set var="submitType" value="Replacement"/>
									</c:when>
									<c:otherwise>
										<c:set var="submitType" value="Unknown"/>
									</c:otherwise>
								</c:choose>

									<vlh:column titleKey="label.irsReject.taxYear" property="batchTransmissionEntry.taxYear" attributes="align=\"left\" scope='col'" default="">
										<vlh:attribute name="scope">row</vlh:attribute>
			                          <esrcore:displayValue name="IrsTransmissionLogDetailEntry" property="batchTransmissionEntry.taxYear" nullText=""/>
			                        </vlh:column>

			                        <vlh:column titleKey="label.irsReject.vpid" property="ien" attributes="align=\"left\" scope='col'" default="">
			                          <a href="/esr/admin/search.do?methodName=SELECT+PERSON&amp;selectedPersonId=<c:out value="${irsPerson.personId}"/>"><c:out value="${irsPerson.ien}"/></a>
			                        </vlh:column>

			                         <vlh:column titleKey="label.irsReject.errReason" property="errorDescription" attributes="align=\"left\" scope='col'" default="">
			                          <esrcore:displayValue name="IrsTransmissionLogDetailEntry" property="errorDescription" nullText=""/>
			                        </vlh:column>

			                         <vlh:column titleKey="label.irsReject.correctionType" property="type" attributes="align=\"left\" scope='col'" default="">
			                         	<c:out value="${submitType}"/>
			                        </vlh:column>

			                         <vlh:column titleKey="label.irsReject.transDate" property="batchTransmissionEntry.transmissionDate" format="MM/dd/yyyy h:mm:ss a" attributes="align=\"left\" scope='col'" default="">
			                          <esrcore:displayDate name="IrsTransmissionLogDetailEntry" dateProperty="batchTransmissionEntry.transmissionDate" format="MM/dd/yyyy h:mm:ss a"/>
			                        </vlh:column>

			                      </vlh:row>
			                    </tr>
			                  </table>
			                </td>
			               </tr>
			              </vlh:root>
			            </table>
			          </div>
			        </td>
			      </tr>
	            </c:otherwise>
	           </c:choose>

				</table>
			 <!-- module shell table body-->


			        </td>
			      </tr>

					<tr>
                	<td>&nbsp;</td>
              		</tr>
            </table>
    </td>
  </tr>
	</html-el:form>
</table>
