<%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.*"%>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="com.udapsoft.waf.common.web.*" %>
<%@ page import="kr.co.hsnc.common.sql.*"%>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.util.*"%>
<%@ page import="com.udapsoft.waf.system.HandlerStorage"%>
<%@ page import="kr.co.hsnc.common.util.ValueObject"%>
<%@ page import="kr.co.hsnc.common.message.WAFMessage"%>
<%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
<%@ page import="com.udapsoft.waf.common.util.StringUtils" %>
<%@ page import="kr.co.udapsoft.common.util.PCMSUtil" %>
<%@ page import="kr.co.hsnc.common.util.Formatter"%>
<%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
<%@page import="java.net.URLEncoder"%>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />

<%
	ctx.init(request, response);
	String link = ctx.getServerDomain();

    HandlerStorage storage = ctx.getHandlerStorage();
	ValueObject params = storage.getParams();

   	
	WAFMessage wafMessage = WAFMessage.getInstance();
	
	ValueObject ContInfo  = storage.getValueObject("ContInfo");
    /*계약서식 FILE */
	RowSet autofile_list = storage.getRowSet("AUTOFILE_LIST");    
	
%>



<br>
<TABLE width="709" border="0" cellspacing="0" cellpadding="0">
	<tbody>
    <TR>
        <TD align="center">
            <TABLE width="709" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolorlight="#AEAFAF" border="1">
	          <COLGROUP>
	            <COL width="100">
	            <COL width="254px">
	            <COL width="100px">
	            <COL width="255px">
				<COL/>
	          </COLGROUP>
	          	<tr height="23" align="center">
	          		<td class="list_title4" nowrap align="Center">요청부서</td>
	          		<td class="list_data" nowrap align="Left" >&nbsp;<%=ContInfo.get("DEPART_DEPT_NM")%></td>
	          		<td class="list_title3" nowrap align="Center">작성일</td>
	          		<td class="list_data" nowrap align="Left">&nbsp;<%=ContInfo.get("CRE_DATE")%></td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title3" nowrap align="Center">작성자</td>
	          		<td class="list_data" nowrap align="Left">&nbsp;<%=ContInfo.get("USER_NAME")%></td>
	          		<td class="list_title4" nowrap align="Center">사업주명</td>
	          		<td class="list_data" nowrap align="Left">&nbsp;<%=ContInfo.get("M_MEMBER_NAME")%></td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title4" nowrap align="Center">계약번호</td>
	          		<td class="list_data" nowrap align="Left">&nbsp;<%=ContInfo.get("ORD_DOC_NO")%></td>
	          		<td class="list_title6" nowrap align="Center">PROJECT 명</td>
	          		<td class="list_data" nowrap align="Left">&nbsp;<%=ContInfo.get("DEPT_NM")%></td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title3" nowrap align="Center">계약명</td>
	          		<td class="list_data" nowrap align="Left" colspan="3">&nbsp;<%=ContInfo.get("CST_DOC_NAME")%></td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title3" nowrap align="Center">공급자</td>
	          		<td class="list_data" nowrap align="Left" colspan="3" >&nbsp;<%=ContInfo.get("S_MEMBER_NAME")%></td>
	          	</tr>
	          	<tr height="115px" align="center">
	          		<td class="list_title" align="Center">계약변경</br>내역</br>(부가세</br>별도)</td>
	          		<td class="list_data" nowrap align="Center" colspan="3" >
	          			<table  width="99%" height="100%" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolorlight="#AEAFAF" border="1">
	          			 <COLGROUP>
				            <COL width="90px">
				            <COL width="110px">
				            <COL width="110px">
				            <COL width="110px">
				            <COL width="80px">
						</COLGROUP>
					         <tr height="23" align="center">
					         	<td class="list_title" nowrap align="Center">변경후계약금액</td>
					         	<td class="list_data" nowrap align="right" style="border-right-width: 0px;">&nbsp;<%=ContInfo.get("BEF_HAN")%></td>
					         	<td class="list_data" nowrap align="right" colspan="2" style="border-left-width: 0px; border-right-width: 0px;">&nbsp;<%=ContInfo.get("CHG_ORD_SUPPLY_AMT_HAN")%></td>
					         	<td class="list_data" nowrap align="left" style="border-left-width: 0px;">&nbsp;<%=ContInfo.get("ATF_HAN")%></td>
					         </tr>
					         <tr height="23" align="center">
					         	<td class="list_title" nowrap align="Center">구 분</td>
					         	<%if(ContInfo.getInt("MOD_NO") >= 2 ){  %>
					         	<td class="list_title" nowrap align="Center">이전계약</td>
					         	<%}else{ %>
					         	<td class="list_title" nowrap align="Center">원 계약</td>
					         	<%} %>
					         	<td class="list_title" nowrap align="Center">변경 계약</td>
					         	<td class="list_title" nowrap align="Center">증감(▲ ▼)</td>
					         	<td class="list_title" nowrap align="Center">비고</td>
				         	</tr>
					         <tr height="23" align="center">
					         	<td class="list_title" nowrap align="Center">도 급 금 액</td>
					         	<td class="list_data" nowrap align="right">&nbsp;<%=Formatter2.currency(ContInfo.get("FRST_CON_AMT"), 0)%>&nbsp;</td>
					         	<td class="list_data" nowrap align="right">&nbsp;<%=Formatter2.currency(ContInfo.get("CHG_CON_AMT"), 0)%>&nbsp;</td>
					         	<td class="list_data" nowrap align="Center">&nbsp;<%=ContInfo.get("CON_AMT_NM")%></td>
					         	<td class="list_data" nowrap align="Center">&nbsp;<%=ContInfo.get("CON_AMT_BIGO")%></td>
					         </tr>
					         <tr height="23" align="center">
					         	<td class="list_title" nowrap align="Center">예 산 금 액</td>
					         	<td class="list_data" nowrap align="right">&nbsp;<%=Formatter2.currency(ContInfo.get("FRST_EXE_AMT"), 0)%>&nbsp;</td>
					         	<td class="list_data" nowrap align="right">&nbsp;<%=Formatter2.currency(ContInfo.get("CHG_EXE_AMT"), 0)%>&nbsp;</td>
					         	<td class="list_data" nowrap align="Center">&nbsp;<%=ContInfo.get("EXE__NM")%></td>
					         	<td class="list_data" nowrap align="Center">&nbsp;<%=ContInfo.get("EXE__BIGO")%></td>
					         </tr>
					         <tr height="23" align="center">
					         	<td class="list_title" nowrap align="Center">계 약 금 액</td>
					         	<td class="list_data" nowrap align="right">&nbsp;<%=Formatter2.currency(ContInfo.get("FRST_ORD_SUPPLY_AMT"),ContInfo.getInt("DIGIT"))%>&nbsp;</td>
					         	<td class="list_data" nowrap align="right">&nbsp;<%=Formatter2.currency(ContInfo.get("CHG_ORD_SUPPLY_AMT"),ContInfo.getInt("DIGIT"))%>&nbsp;</td>
					         	<td class="list_data" nowrap align="Center">&nbsp;<%=ContInfo.get("ORD_SUPPLY_NM")%></td>
					         	<td class="list_data" nowrap align="Center">&nbsp;<%=ContInfo.get("ORD_SUPPLY_BIGO")%></td>
					         </tr>
	          			</table>
	          		</td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title4" nowrap align="Center">시행기간</td>
	          		<td class="list_data" nowrap align="Left" colspan="2" style="border-right-width: 0px;">&nbsp;<%=ContInfo.get("CHG_ORD_START_DATE")%> ~ <%=ContInfo.get("CHG_ORD_END_DATE")%></td>
	          		<td class="list_data" nowrap align="Left" style="border-left-width: 0px;">&nbsp;<%=ContInfo.get("ORD_DATE_NM")%></td>
	          	</tr>
	          	<tr height="50" align="center">
	          		<td class="list_title4" nowrap align="Center">특기사항</td>
	          		<td class="list_data" nowrap align="Left" colspan="3" ><%=StringUtils.cvtHTML(ContInfo.get("IN_SPE_INFO"))%></td>
	          	</tr>
	          	<tr height="50" align="center">
	          		<td class="list_title4" nowrap align="Center">변경사유</td>
	          		<td class="list_data" nowrap align="Left" colspan="3" ><%=StringUtils.cvtHTML(ContInfo.get("IN_CHG_INFO"))%></td>
	          	</tr>
	          	<tr height="60" align="center">
	          		<td class="list_title4" nowrap align="Center">첨부서류</td>
	          		<td class="list_data" nowrap align="Center"  colspan="3">
	          			
	          			<table style="height: 100%" width="99%" height="100%" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolorlight="#AEAFAF" border="1">
		          		<tr>
		          			<td class="list_title" width="50%" height="100%" nowrap>자동생성파일</td>
		          			<td class="list_title" width="50%" height="100%" nowrap>직접첨부</td>
						</tr>
						<tr height="30">
							<td class="list_data" nowrap align="center">
					<%
						if(autofile_list.size()>0){
					%>
								<IMG src="<%=link %>/img/buyer/button/bt_attach_file.gif" id="bt_attach_file" alt="첨부파일 관리" align="top" valign="top" onClick="getFileList('<%=ContInfo.get("SUB_CONT_MOD_ID")%>');" class="button">
					<%
						}	
					%>								
							</td>
							<td class="list_data" nowrap align="center">
					<%
						RowSet addFile = FileManager.getFileList("SUB_CONT_MOD_ID", ContInfo.get("SUB_CONT_MOD_ID"));
						if (addFile.size()>0){
					%>	
							<IMG src="<%=link %>/img/buyer/button/bt_attach_file.gif" id="bt_attach_file" alt="첨부파일 관리" align="top" valign="top" onClick="open_apppend_file('SUB_CONT_MOD_ID', '<%=ContInfo.get("SUB_CONT_MOD_ID")%>');" class="button">
					<%
						}	
					%>
							</td>
						</tr>
		          		</table>
	          		</td>
	          	</tr>
			</TABLE>
        </TD>
    </TR>
  </tbody>
</TABLE>
<br>
<table><tr><td style="display:none;" id=doctitle_1><%=ContInfo.get("doctitle")%></td></tr></table>
<br>
