<%--
MosP - Mind Open Source Project    http://www.mosp.jp/
Copyright (C) MIND Co., Ltd.       http://www.e-mind.co.jp/

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--%>
<%@ 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.payment.vo.PaymentCardVo"
%><%
PaymentCardVo vo  = (PaymentCardVo)request.getAttribute(MospConst.ATT_VO);
%>
<%= HtmlUtility.getHeader(vo) %>
<%= HtmlUtility.getSubTitle(vo) %>
<div class="Body">
	<%= HtmlUtility.getMessages(vo) %>
	<div class="Info">
		<table>
			<tbody>
				<tr>
					<td>
						<%= vo.getName("P_EMPLOYEE") + vo.getName("C_CODE") + vo.getName("C_SEPARATOR") + vo.getEscKCode() %>
					</td>
					<td>
						<%= vo.getName("P_EMPLOYEE") + vo.getName("C_NAME") + vo.getName("C_SEPARATOR") + vo.getEscLblKName() %>
					</td>
					<td>
						<%= vo.getName("P_SECTION") + vo.getName("C_SEPARATOR") + vo.getEscLblSection() %>
					</td>
					<td>
						<%= vo.getName("P_TARGET_MONTH") + vo.getName("C_SEPARATOR") + vo.getEscLblCalcMonth() %>
					</td>
					<td id="tdButton">
						<button type="button" class="ExecuteButton" onclick="doSubmit(document.form, 'P1242')">
							<%= vo.getName("C_LIST") + vo.getName("C_TO") %>
						</button>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="ButtonDiv" id="divButton">
		<button type="button" class="ExecuteButton" onclick="doSubmitMessage(document.form, 'P1256', 'QP1256', '')">
			<%= vo.getName("P_ONE_BY_ONE") + vo.getName("C_RE") + vo.getName("P_PAYMENT") + vo.getName("P_CALCULATE") %>
		</button>
		<button type="button" class="ExecuteButton" onclick="submitForm(document.form, 'P1253')">
			<%= vo.getName("P_HUMAN_INSURANCE") + vo.getName("P_CALCULATE") %>
		</button>
		<button type="button" class="ExecuteButton" onclick="submitForm(document.form, 'P1254')">
			<%= vo.getName("P_INCOME_TAX") + vo.getName("P_CALCULATE") %>
		</button>
		<button type="button" class="ExecuteButton" onclick="submitForm(document.form, 'P1255')">
			<%= vo.getName("C_REGIST") %>
		</button>
	</div>
	<div class="Card">
		<table>
			<tbody>
				<tr>
					<td class="TitleTd" colspan="<%= vo.getTimeCount() < 10 ? vo.getTimeCount() : 10 %>">
						<%= vo.getName("P_TIME") + vo.getName("C_ITEM") %>
					</td>
				</tr>
				<tr>
<%
for (int i = 0; i < vo.getTimeCount(); i++) {
%>
					<td class="CenretTd">
						<%= vo.getTimeName(i) %><br>
						<input type="text" class="NumberTextBox" id="<%= vo.getTimeCode(i) %>" name="<%= vo.getTimeCode(i) %>" value="<%= vo.getTimeAmount(i) %>">
					</td>
<%
	if (i == vo.getTimeCount() - 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.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>
<%
if (vo.getBreakdownCount() != 0) {
%>
				<tr>
					<td class="BlankTd" colspan="10"></td>
				</tr>
				<tr>
					<td class="TitleTd" colspan="<%= vo.getBreakdownCount() < 10 ? vo.getBreakdownCount() : 10 %>">
						<%= vo.getName("P_BREAKDOWN") + vo.getName("C_ITEM") %>
					</td>
				</tr>
				<tr>
<%
}
for (int i = 0; i < vo.getBreakdownCount(); i++) {
%>
					<td class="CenretTd">
						<%= vo.getBreakdownName(i) %><br>
						<input type="text" class="NumberTextBox" id="<%= vo.getBreakdownCode(i) %>" name="<%= vo.getBreakdownCode(i) %>" value="<%= vo.getBreakdownAmount(i) %>">
					</td>
<%
	if (i == vo.getBreakdownCount() - 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) %>
