<%@ page
language     = "java"
pageEncoding = "Windows-31J"
buffer       = "256kb"
autoFlush    = "false"
errorPage    = "/jsp/common/error.jsp"
%><%@ page
import = "jp.mosp.common.common.MospConst"
import = "jp.mosp.common.common.HtmlUtility"
import = "jp.mosp.payroll.bonus.BonusConst"
import = "jp.mosp.payroll.base.PayrollVo"
import = "jp.mosp.payroll.bonus.vo.BonusCardVo"
%><%
BonusCardVo vo = (BonusCardVo)request.getAttribute(MospConst.ATT_VO);
%>
<%= HtmlUtility.getHeader(vo) %>
<%= vo.getSubTitle(vo.SUB_TITLE, "P1910") %>
<div class="Body" id="bonusCard">
		<%=HtmlUtility.getMessages(vo)%>
	<div class="Change">
			<table id="tblChange">
				<tbody>
					<tr>
						<td class="LabelTd">
							<%= BonusConst.NAM_BONUS_DATE %><%= BonusConst.STR_TITLE_SEPARATOR %>
							<select id="<%= BonusCardVo.PRM_PLT_YEAR %>" name="<%= BonusCardVo.PRM_PLT_YEAR %>">
								<%= HtmlUtility.getSelectOption(vo.aryPltYear, vo.getPltYear()) %>
							</select><%= BonusConst.NAM_YEAR %>
							<select id="<%= BonusCardVo.PRM_PLT_MONTH %>" name="<%= BonusCardVo.PRM_PLT_MONTH %>">
								<%= HtmlUtility.getSelectOption(vo.aryPltMonth, vo.getPltMonth()) %>
							</select><%= BonusConst.NAM_MONTH %>
							<select id="<%= BonusCardVo.PRM_PLT_DAY %>" name="<%= BonusCardVo.PRM_PLT_DAY %>">
								<%= HtmlUtility.getSelectOption(vo.aryPltDay, vo.getPltDay()) %>
							</select><%= BonusConst.NAM_DAY %>
						</td>
						<td>
							<%= BonusConst.NAM_CHANGE_K_CODE %><%= BonusConst.STR_TITLE_SEPARATOR %>
						</td>
						<td>
							<input type="text" class="UserIdText" id="<%= BonusCardVo.PRM_TXT_CHANGE_K_CODE %>" name="<%= BonusCardVo.PRM_TXT_CHANGE_K_CODE %>" value="<%= vo.getEscTxtChangeKCode() %>"/>
						</td>
						<td>
							<button type="button" class="ExecuteButton" onclick="doSubmit(document.form, 'P2013')">
								<%= BonusConst.NAM_CHANGE %>
							</button>
						</td>
					</tr>
				</tbody>
			</table>
			<table id="tblToList">
				<tbody>
					<tr>
						<td>
							<button type="button" class="ExecuteButton" id="btnManyLength" onclick="doSubmit(document.form, 'P2012')">
								<%= BonusConst.NAM_REGIST %>
							</button>
						</td>
						<td>
							<button type="button"  class="ExecuteButton" id="btnManyLength" onclick="doSubmit(document.form, 'P2021')">
							<%= BonusConst.TTL_BONUS_LIST %>
							</button>
						</td>
						<td>
							<button type="button" class="ExecuteButton" id="btnManyLength" onclick="doSubmit(document.form, 'P2001')">
								<%= BonusConst.NAM_TO_BONUS_CALCULATE %>
							</button>
						</td>
					</tr>
				</tbody>
			</table>
			<table id="tblCalcList">
				<tbody>
					<tr>
						<td>
							<button type="button" class="ExecuteButton" id="btnManyLength"  onclick="submitMessageForm(document.form, 'P2014','QU0001','<%= BonusConst.NAM_TAX_CALCULATE_EACH %>')">
								<%= BonusConst.NAM_TAX_CALCULATE_EACH %>
							</button>
						</td>
						<td>
							<button type="button" class="ExecuteButton"  id="btnManyLength" onclick="submitMessageForm(document.form, 'P2015','QU0015','<%= BonusConst.NAM_FIX_ATTENDANCE_EACH %>')">
								<%= BonusConst.NAM_FIX_ATTENDANCE_EACH %>
							</button>
						</td>
					</tr>
				</tbody>
			</table>
			<%--
			<table id="tblButton2">
				<tbody>
					<tr>
						<td>
							
							<button type="button" class="ExecuteButton" id="btnManyLength" onclick="doSubmitFile(document.form, 'P2012')"><%= BonusConst.NAM_OUTPUT_BONUS %></button>
							
							
							<button type="button" class="ExecuteButton" id="btnManyLength" onclick="doSubmit(document.form, 'P2026')"><%= BonusConst.NAM_OUTPUT_BONUS %></button>
							
						</td>
					</tr>
				</tbody>
			</table>
			--%>
		</div>
		<div class="Select">
			<table id="tblKCode">
				<tbody>
					<tr>
						<td>
							<%= BonusConst.NAM_STATION %><%= BonusConst.STR_TITLE_SEPARATOR %>
						</td>
						<td class="LabelTd">
							<%= vo.getEscLblStationCode() %>&nbsp;<%= vo.getEscLblStationName() %>
						</td>
						<td>
							<%= BonusConst.NAM_K_CODE %><%= BonusConst.STR_TITLE_SEPARATOR %>
						</td>
						<td class="LabelTd">
							<%= vo.getEscLblKCode() %>
							<input type="hidden" id="<%= BonusCardVo.PRM_HID_K_CODE  %>" name="<%= BonusCardVo.PRM_HID_K_CODE  %>" value="<%= vo.getEscHidKCode() %>" />
						</td>
						<td>
							<%= BonusConst.NAM_K_NAME %><%= BonusConst.STR_TITLE_SEPARATOR %>
						</td>
						<td class="LabelTd">
							<%= vo.getEscLblKName() %>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	<div class="Card">
		<table>
			<tbody>
				<tr>
					<td class="BlankTd" colspan="10"></td>
				</tr>
				<tr>
					<td class="TitleTd" colspan="<%= vo.getAllowanceCount() < 10 ? vo.getAllowanceCount() : 10 %>"><%= vo.getName("P_ALLOWANCE") + vo.getName("C_ITEM") %>
					</td>
				</tr>
				<tr>
<%
for (int i = 0; i < vo.getAllowanceCount(); i++) {
%>
					<td class="CenretTd">
						<%= vo.getAllowanceName(i) %><br>
						<input type="text" class="NumberTextBox" id="<%= vo.getAllowanceCode(i) %>" name="<%= vo.getAllowanceCode(i) %>" value="<%= vo.getAllowanceAmount(i) %>">
					</td>
<%
	if (i == vo.getAllowanceCount() - 1) {
		if ((i + 1) % 10 != 0) {
%>
					<td class="BlankTd" colspan="<%= 10 - (i + 1) % 10 %>"></td>
<%
		}
	} else if (i != 0 && (i + 1) % 10 == 0) {
%>
				</tr>
				<tr>
<%
	}
}
%>
				</tr>
				<tr>
					<td class="BlankTd" colspan="10"></td>
				</tr>
				<tr>
					<td class="TitleTd" colspan="<%= vo.getDeductionCount() < 10 ? vo.getDeductionCount() : 10 %>">
						<%= vo.getName("P_DEDUCTION") + vo.getName("C_ITEM") %>
					</td>
				</tr>
				<tr>
<%
for (int i = 0; i < vo.getDeductionCount(); i++) {
%>
					<td class="CenretTd">
						<%= vo.getDeductionName(i) %><br>
						<input type="text" class="NumberTextBox" id="<%= vo.getDeductionCode(i) %>" name="<%= vo.getDeductionCode(i) %>" value="<%= vo.getDeductionAmount(i) %>">
					</td>
<%
	if (i == vo.getDeductionCount() - 1) {
		if ((i + 1) % 10 != 0) {
%>
					<td class="BlankTd" colspan="<%= 10 - (i + 1) % 10 %>"></td>
<%
		}
	} else if (i != 0 && (i + 1) % 10 == 0) {
%>
				</tr>
				<tr>
<%
	}
}
%>
				</tr>
				<tr>
					<td class="BlankTd" colspan="10"></td>
				</tr>
				<tr>
					<td class="TitleTd" colspan="<%= vo.getSumCount() < 10 ? vo.getSumCount() : 10 %>">
						<%= vo.getName("P_SUM") + vo.getName("C_ITEM") %>
					</td>
				</tr>
				<tr>
<%
for (int i = 0; i < vo.getSumCount(); i++) {
%>
					<td class="CenretTd">
						<%= vo.getSumName(i) %><br>
						<input type="text" class="NumberTextBox" id="<%= vo.getSumCode(i) %>" name="<%= vo.getSumCode(i) %>" value="<%= vo.getSumAmount(i) %>">
					</td>
<%
	if (i == vo.getSumCount() - 1) {
		if ((i + 1) % 10 != 0) {
%>
					<td class="BlankTd" colspan="<%= 10 - (i + 1) % 10 %>"></td>
<%
		}
	} else if (i != 0 && (i + 1) % 10 == 0) {
%>
				</tr>
				<tr>
<%
	}
}
%>
				</tr>
				<tr>
					<td class="BlankTd" colspan="10"></td>
				</tr>
			</tbody>
		</table>
	</div>
</div>

<%= HtmlUtility.getFooter(vo) %>
