<%--
  - Author(s)  : Hyung min Son
  - Date       : 2014.08.08
  - Description: 입찰결과상세
  --%>
  
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="kr.co.udapsoft.common.code.*" %>
<%@ page import="com.udapsoft.waf.common.util.StringUtils"%>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@ include file="/jsp/work/taglib.jsp" %>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<%
    ctx.init(request, response);
    HandlerStorage storage = ctx.getHandlerStorage();
    ValueObject params = storage.getParams();
    ValueObject user = storage.getUser();
    ValueObject Order = storage.getValueObject("Order");
    ValueObject fileout = storage.getValueObject(Order.get("DOC_ETC_OUT"));
    String reason = "";
    boolean b_reason = false;
    if(Order.get("RNNC_REASON").length()> 0){
    	reason = Order.get("RNNC_REASON");
    	b_reason = true;
    }
    String bidflag = "<font color='red'><b>미투찰</b></font>";
    if(Order.get("SIGN_DT") != null){
    	bidflag = "<font color='blue'><b>투찰</b></font>";	
    }
%>
<SCRIPT language="JavaScript">
	/*예약함수*/
	var sheet1 = new ibsheetObject();
	var pageLastRowIndex = 1;
	var validationResult = false;
	var filterShow = false;
	var must_msg = "(은)는 필수 입력 항목입니다."; 
	function _onReady(){
		/**
		 *	IBSheet object initialize
		 */
		gridInit(sheet1);
	
		/**
		 *	Application Initialize
		 */
		 $("#btn_list").click(function() {
				$("#fevent").val("");
				$("#form1").attr("action", "/portal/bid/SuppBidResultList.screen");
				$("#form1").attr("target", "_self");
				$("#form1").attr("method", "post");
				$("#form1").submit();
		});
		
		 $("#btn_signdata").click(function() {
			 $("#fevent").val("FORM_SELECT");
				if($("#DEMANDED_KIND").val() == "O"){
					$("#form1").attr("action", "/portal/bid/OutEstmWriteView.screen");
					$("#form1").attr("target", "_self");
					$("#form1").attr("method", "post");
					$("#form1").submit();
				}else{ 
					$("#form1").attr("action", "/portal/bid/OutEstmWritePurchaseView.screen");
					$("#form1").attr("target", "_self");
					$("#form1").attr("method", "post");
					$("#form1").submit();
				}
		});
		 
		 $("#btn_giveup").click(function() {
			 var win_id = "_BidGiveupPop";
			 var link = "/portal/bid/BidGiveupPop.screen";
			       link += "?pop_win_id="+win_id;
			       link += "&VENDOR_CD="+$("#VENDOR_CD").val();
			       link += "&BID_NO="+$("#BID_NO").val();
			       link += "&BID_DEG="+$("#BID_DEG").val();
			fLayerPop(win_id, link, 600,190, '', '', 'NO');
		 });
		 

		//견적대상 업체 조회
		
		var esti = "<%=Order.get("ESTI_YN")%>";
		 if(esti == "불가능" || esti == "입찰포기"){
			 $("#btn_signdata").hide();
			 $("#btn_giveup").hide();
		 }
		 
		 if("<%=Order.get("PBC_DEFECT_CONDI2")%>"!=""||"<%=Order.get("CBC_DEFECT_DAY2")%>"!=""||"<%=Order.get("CBC_DERECT_TERM_CD2")%>"!=""){
				$("#addGuar").attr("checked", true);
				$(".checkAdd").show();
			}
			
		doSearchSheet();
	}
	
	/**
	 *	IBSheet object initialize
	 */
	function gridInit(sheetName){
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, Page:30};
		init_sheet.Cols = [
		       			{Header:'Del',					Type:"DelCheck",		SaveName:"DEL_CHECK", 					Width:50, 			Align:"Center",	Hidden:"True"},
		    			{Header:'Status',				Type:"Status", 		SaveName:"STATUS", 						Width:0, 			Align:"Center",	Hidden:"True"},
		    			{Header:'No.',					Type:"Seq", 			SaveName:"NO",								Width:0, 			Align:"Center",	Hidden:"True"},
		    			{Header:'자재코드',				Type:"Text", 			SaveName:"MATERIAL_CD", 				Width:80, 			Align:"Center"},
		    			{Header:'자재명',				Type:"Text", 			SaveName:"MATERIAL_NAME", 			Width:220, 			Align:"Left"},
		    			{Header:'규격',					Type:"Text", 			SaveName:"STD", 							Width:70, 			Align:"Left"},
		    			{Header:'단위',					Type:"Text", 			SaveName:"UNIT_KIND", 					Width:50, 			Align:"Center"},
		    			{Header:'투입요청일',			Type:"Text", 			SaveName:"REQUEST_DATE", 				Width:80, 			Align:"Center"},
		    			{Header:'견적의뢰수량',			Type:"Float", 			SaveName:"DEMANDED_QTY", 			Width:80, 			Align:"Right"}
		];

		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheetName, init_sheet);
		sheetName.SetDataAutoTrim(0);
		sheetName.SetEditable(false);
		setGridSize();
	}

	 function doSignData(VendorCd, sContHash){
			
			unisign.SignDataNVerifyVID( sContHash, null, VendorCd, function( resultObject ) {
				if( !resultObject || resultObject.resultCode != 0 ){
					if( resultObject.resultCode == '14208'){
						alert("주민번호/사업자번호를 확인할 수 없는 인증서입니다.");
					} else if( resultObject.resultCode == '999'){
						alert("사용자 DN 선택이 취소 되었습니다.");
					} else {
						alert( resultObject.resultMessage);
					}
					return ;
				}
				
				var signeddata = resultObject.signedData;
//		 		var userdn = resultObject.certAttrs.subjectName;
				
				$('.b-iframe').get(0).contentWindow.doSetPop(signeddata);
				
//				$("#signeddata").val(signeddata);
//				return true;
			});
	}
	
	 
	function doSearchSheet(){
		$("#fevent").val("GET_ITEM_LIST");
		var url = Modular.model.PageContext.CONTEXT_ROOT + "/portal/bid/QuotRequest_sheet.screen";
		Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
	}
	
	/**
	 *	IBSheet size setting
	 */
	function setGridSize() {
		sheet1.FitColWidth();
	}
	
	
	function sheet1_OnSmartResize(Width, Height) { 
		sheet1.FitColWidth();
		autoResize();
	}

	function autoResize(){
		sheet1.SetSheetHeight(300); 
	}
	
	/**
	 *	IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
	 */
	function sheet1_OnSearchEnd(code, message) {
	    if(code == 0) {
	    	setGridSize();
	    	<%if("Y".equals(Order.get("DIV_PO_YN"))){ %>
	    	var GrowCount = sheet1.LastRow();
	    	 for(var	i=0; i < 	GrowCount; i++)
	    		{
	    			 sheet1.SetCellValue(i+1,"DEMANDED_QTY",1);	
	    		}
	    	<%}%>
		} else {
			//조회 에러 수행
			alert(message);
		}
	}
	function fnact(){
		 $("#fevent").val("FORM_SELECT");
			if($("#DEMANDED_KIND").val() == "O"){
				$("#form1").attr("action", "/portal/bid/OutEstmWriteView.screen");
				$("#form1").attr("target", "_self");
				$("#form1").attr("method", "post");
				$("#form1").submit();
			}else{ 
				$("#form1").attr("action", "/portal/bid/OutEstmWritePurchaseView.screen");
				$("#form1").attr("target", "_self");
				$("#form1").attr("method", "post");
				$("#form1").submit();
			}
	}
	function flist(){
			$("#fevent").val("");
			$("#form1").attr("action", "/portal/bid/SuppBidResultList.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "post");
			$("#form1").submit();
	}
	
	//첨부파일   
	function doAttachFile(obj,No) {
		var file_div = "";
		<%if(!Order.get("DEMANDED_KIND").equals("O")){%>
			file_div = "bid/purchase/<%=Order.get("BID_NO")%>/";
		<%}else{%>
			file_div = "bid/outside/<%=Order.get("BID_NO")%>/";
		<%}%>
		 if(obj==''){
			 alert("After you have saved, you can attach a file.");
		}
		else if(obj != ''){ 
			if(No == 1){
				viewFileListNew("<%=Order.get("DOC_ETC_IN")%>", obj.value, document.form1.p_AttachFile1, "N", file_div);
			}else{
				viewFileListNew("<%=Order.get("DOC_ETC_OUT")%>", obj.value, document.form1.p_AttachFile2, "N", file_div);
			}
		} 
	}
	
	function doResult(resultObj) {
		try {
			if( resultObj.getRequestEvent() == "FORM_UPDATE") {
				if( resultObj.getSuccess() ) {
					alert("저장 되었습니다.");
 					$("#btn_list").click();
				}
				else {
					dlgErrorMsg(resultObj);
				}
			}
			
			if( resultObj.getRequestEvent() == "FORM_DELETE") {
				if( resultObj.getSuccess() ) {
					alert("삭제 되었습니다.");
 					$("#btn_list").click();
				}
				else {
					dlgErrorMsg(resultObj);
				}
			}
		} catch(errorObject) {
			showErrorDlg("doResult()", errorObject);
		}
	}
	
	function PopClose(win_id,result){
		if( result != null ){
			if(result[0] == 0){
				setTimeout(function(){	fLayerPopClose(win_id);},100);
				if(result[1].length> 0)alert(result[1]);
				$("#btn_list").click();
			}
		}else{
			setTimeout(function(){	fLayerPopClose(win_id);	},100);
		}
	}
	
</SCRIPT>
<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>
<form id="form1" name="form1" method="post" modular:type="search">

<INPUT type='hidden' name="fevent" id="fevent"  value="">
<INPUT type='hidden' name="DEMANDED_ID" value="<%=Order.get("DEMANDED_ID")%>">
<INPUT type='hidden' name="DEMANDED_KIND" value="<%=Order.get("DEMANDED_KIND")%>">
<INPUT type='hidden' name="BID_NO" value="<%=Order.get("BID_NO")%>">
<INPUT type='hidden' name="BID_DEG" value="<%=Order.get("BID_DEG")%>">
<INPUT type='hidden' name="STATUS_CD" value="<%=Order.get("STATUS_CD")%>">
<INPUT type='hidden' name="VENDOR_CD" value="<%=user.get("CORP_ID")%>">
<INPUT type='hidden' name="FILE_GB" value="<%=Order.get("FILE_GB")%>">
<table width="100%" border="0">
	<colgroup>
		<col width="*" />
		<col width="240" />
	</colgroup>
	<tr>
   		<th>
	   		<div align="left" id="title" >
 			  <ul><li>입찰결과상세</li></ul>
			</div> 
   		</th>
   		<td align="right">
			<span class="btnSearch center" id="btn_signdata"><a href="javascript:fnact();">제출견적서보기</a></span>
       		<span class="btnSearch center" id="btn_list"><a href="javascript:flist();">목록</a></span> 
   		</td>
  	</tr>
</table>
<%if(b_reason){ %>
<div class="application-info">
	<div class="application-sub-title">
		<span class="title">입찰포기정보</span>
	</div>
</div>

<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col/>
	</colgroup>
	<TR height="25">
    <TH style="text-align:left">포기자명</TH>
	<TD colspan="5"><%=Order.get("BID_RNNC_NM")%></TD>
  </TR>
  <TR height="25">
    <TH style="text-align:left">포기일시</TH>
	<TD colspan="5"><%=Order.get("BID_RNNC_DT")%></TD>
  </TR>
  <TR height="25">
    <TH style="text-align:left">포기사유</TH>
	<TD colspan="5"><%=reason%></TD>
  </TR>
</TABLE>
<%}%>

<div class="application-info magT10">
	<div class="application-sub-title">
		<span class="title">입찰기본정보</span>
	</div>
</div>

<!-- 발주의뢰정보 : 시작 -->
<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col width="145"/>
		<col width="29%"/>
		<col width="145"/>
		<col/>
	</colgroup>
  <TR height="25"> 
    <TH style="text-align:left"> 입찰번호-차수</TH>
	<TD colspan="2"><%=Order.get("bid_no") %> - <%=Order.get("bid_deg") %></TD>
	<TH style="text-align:left"> 온라인입찰여부</TD>
	<TD><%=Order.get("ONBID_YN")%></TD>
  </TR>

  <TR height="25"> 
	<TH style="text-align:left"> 입찰명</TD>
	<TD colspan="4"><%=Order.get("BID_MASTER_NM")%></TD>
  </TR>
  
  <TR height="25"> 
	<TH style="text-align:left"> 경쟁방법</TD>
	<TD colspan="2"><%=Order.get("CMPT_NM") %></TD>
	<TH style="text-align:left"> 낙찰자선정방법</TD>
	<TD><%= Order.get("SUCC_NM") %></TD> 	
  </TR> 	
  <!-- 발주의뢰정보 : 종료 -->
</table>


<div class="application-info magT15">
	<div class="application-sub-title">
		<span class="title">입찰진행</span>
	</div>
</div>
<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col width="145"/>
		<col width="29%"/>
		<col width="145"/>
		<col/>
	</colgroup>
  <TR height="25"> 
    <TH style="text-align:left">공고일자</TD>
	<TD colspan="4"> 
	 <%=Order.get("NOTI_DY") %> 
    </TD>
  </TR>

  <TR height="25"> 
	<TH rowspan="4" style="text-align:left"> 견적설명회 정보</TD>
	<TH style="text-align:left"> 여부</TD>
	<TD><%=Order.get("SITEDESC_FLAG")%></TD>
	<TH style="text-align:left"> 담당자</TD>
	<TD><%=Order.get("SITEDESCCHRGPRSNNM")%></TD>	
  </TR>
  
  <TR height="25"> 
	<TH style="text-align:left"> 담당자 전화번호</TD>
	<TD><%=Order.get("SITEDESCTELNO")%></TD>
	<TH style="text-align:left"> 일시</TD>
	<TD><%=Order.get("SITEDESCDATE")%></TD>		
  </TR> 	
  <%
  	String		siteparti	=	"";
  	if(Order.get("SITEPARTI_YN").equals("Y"))
  	{
  		siteparti	=	"<font color='blue'><b>참석</b></font>";
  	}
  	else
  	{
  		siteparti	=	"<font color='red'><b>미참석</b></font>";
  	}
  %>
  
  <TR height="25"> 
	<TH style="text-align:left"> 담당자 E-Mail</TD>
	<TD><%=Order.get("SITEDESCEMAIL")%></TD>
	<TH style="text-align:left"> 장소</TD>
	<TD><%=Order.get("SITEDESCPLACE")%></TD>
	</TR>
 <TR height="25"> 
	<TH style="background:#ffe1b5;text-align:left">참석여부</TD>
	<TD colspan="3"><%=siteparti%></TD>
  </TR> 	
			
   <TR height="25"> 
	<TH style="text-align:left" rowspan="3"> 견적 의뢰</TD>
	<TH style="text-align:left"> 견적제출기간</TD>
	<TD colspan="3"><%=Order.get("BID_FROM_DT")%> ~<%=Order.get("BID_TO_DT")%>
  </TR>
  
  <TR height="25"> 
	<TH style="text-align:left"> <%if(Order.get("DEMANDED_KIND").equals("O")){%>외주<%}else{%>구매<%}%>담당자</TD>
	<TD><%=Order.get("PUREMPNM")%></TD>
	<TH style="text-align:left"> <%if(Order.get("DEMANDED_KIND").equals("O")){%>외주<%}else{%>구매<%}%>담당자 전화번호</TD>
	<TD><%=Order.get("PO_EMPNM")%></TD>		
  </TR> 	
  <%
  	String		succ_nm	=	"";
  	String    SignDt = "";
  	if(Order.get("SUCC_YN").equals("Y"))
  	{
  		succ_nm	=	"<font color='blue'><b>선정</b></font>";
  		SignDt	=	"<font color='blue'><b>"+Order.get("SIGN_DT")+"</b></font>";
  	}
  	else
  	{
  		succ_nm	=	"<font color='red'><b>미선정</b></font>";
  		SignDt	=	"<font color='red'><b>"+Order.get("SIGN_DT")+"</b></font>";
  	}
  %>
  <TR height="25"> 
	<TH style="background:#ffe1b5;text-align:left"> 최종 견적제출시간</TD>
	<TD><B><%=SignDt%></B></TD>
	<TH style="background:#ffe1b5;text-align:left"> 투찰여부</TD>
	<TD><B><%=bidflag%></B></TD>
  </TR> 	
  
  <TR height="25"> 
	<TH rowspan="2" style="text-align:left">기술검토(TBE)</TD>
	<TH style="text-align:left">TBE 여부</TD>
	<TD> 
		<%=Order.get("TBE_FLAG").equals("Y") ? "예" : "아니오"%>
	</TD>
	<TH style="text-align:left">TBE 일자</TD>
	<TD> 
		<%=Order.get("SUPP_REQ_DY_NM")%>
	</TD>	
 </TR>
 <TR height="25"> 
	<TH style="background:#ffe1b5;text-align:left">TBE 심사결과</TD>
	<TD colspan="3"> 
		<%=Order.get("EVAL_RESULT_NM")%>
	</TD>
  </TR>
  
  <TR height="25"> 
		<TH rowspan="2" style="text-align:left">입찰결과</TD>
		<TH style="background:#ffe1b5;text-align:left">선정여부</TD>
		<TD colspan="3"><%=succ_nm %></TD>
	</TR>
	<TR height="25">
		<TH style="background:#ffe1b5;text-align:left">진행상태</TD>
		<TD colspan="3"> 
		<%=Order.get("STATUS_NM")%>
		</TD>	
	 </TR>
   <!-- 발주의뢰정보 : 종료 -->
</table>

<div class="application-info magT15">
	<div class="application-sub-title">
		<span class="title">입찰조건</span>
	</div>
</div>

<%if(Order.get("DEMANDED_KIND").equals("O")){ %>
<TABLE class="form-table">
	<colgroup>
		<col width="160"/>
		<col width="160"/>
		<col width="29%"/>
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25">
	<TH style="text-align:left">통화구분</TH>
	<TD colspan="4"><%=Order.get("CURRENCY_GB_NM") %>
	</TD>
  </TR>
   <TR height="25">
	<TH style="text-align:left">계약형태</TH>
	<TD colspan="4">
		<%=Order.get("OBC_CONT_TYPE_NM") %>
	</TD>
  </TR>
  <TR height="50">
  	<TH rowspan="2" style="text-align:left">공사대금</TH>
	<TH style="text-align:left">선급금</TH>
	<TD><% if(!Order.get("OBC_FRST_CONT_RATE").isEmpty()){%> 계약금액의 : <%= Order.get("OBC_FRST_CONT_RATE") %>%<br><%}%>
	<%= Order.get("OBC_FRST_CONDI") %><br>
	<%= Order.get("OBC_FRST_CNT_CONDI") %></TD>
	<TH style="text-align:left">기성금</TH>
	<TD><% if(!Order.get("CPC_MID_RATE").isEmpty()){%> 계약금액의 :<%= Order.get("CPC_MID_RATE")%>% ,<%}%><% if(!Order.get("OBC_MID_CASH_RATE").isEmpty()){%>현금 : <%= Order.get("OBC_MID_CASH_RATE")%>% <%}%><% if(!Order.get("OBC_MID_BILL_RATE").isEmpty()){%>어음 : <%= Order.get("OBC_MID_BILL_RATE")%>%<%}%><br>
			<% if(!Order.get("OBC_MID_PAYDAY").isEmpty()){%>세금계산서 발행일로부터 <%=Order.get("OBC_MID_PAYDAY")%>일 내 지급<br>
			<% if(!Order.get("OBC_MID_BILL_DATE").isEmpty()){%>어음일 경우, 어음 만기일은 목적물 수령일로부터 (<%= Order.get("OBC_MID_BILL_DATE")%>)일<br><%} %>
			<%=Order.get("OBC_MID_REQ_MONTH")%>개월 당 <%=Order.get("OBC_MID_CNT")%>회 말일에 청구<%}%>
	</TD>	
  </TR>
    <TR height="25">
	<TH style="text-align:left">준공금</TH>
	<TD colspan="3" style="text-align:left"><% if(!Order.get("PBC_REST_RATE").isEmpty()){%> 계약금액의 : <%=Order.get("PBC_REST_RATE")%>% ,<%}%><% if(!Order.get("OBC_FIN_CASH_RATE").isEmpty()){%>현금 : <%=Order.get("OBC_FIN_CASH_RATE")%>% <%}%><% if(!Order.get("OBC_FIN_BILL_RATE").isEmpty()){%>어음 : <%=Order.get("OBC_FIN_BILL_RATE")%>%<%}%>
			<%-- <br><% if(!Order.get("OBC_FIN_PAYDAY").isEmpty()){%>세금계산서 발행일로부터 <%=Order.get("OBC_FIN_PAYDAY")%>일 내 지급<%}%><br>
			<%=Order.get("OBC_FIN_CONDI") %></TD> --%>
  </TR>
  <TR height="25">
  	<TH rowspan="2" style="text-align:left">보증조건</TH>
	<TH style="text-align:left">선급금보증</TH>
	<TD><% if(!Order.get("CBC_FIRST_RATE").isEmpty()){%>계약금액의 <%=Order.get("CBC_FIRST_RATE")%>%<%}%></TD>
	<TH style="text-align:left">계약이행 보증</TH>
	<TD><% if(!Order.get("CONTFUL_RATE").isEmpty()){%>계약금액의 <%= Order.get("CONTFUL_RATE") %>%<%}%></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">하자이행 보증</TH>
	<TD><% if(!Order.get("WARR_RATE").isEmpty()){%>준공금액의 <%= Order.get("WARR_RATE")%>%<%}%></TD>
	<TH style="text-align:left">하자담보기간</TH>
	<TD><% if(!Order.get("CBC_DEFECT_DAY").isEmpty()){%>준공일로부터 <%= Order.get("CBC_DEFECT_DAY")%>개월<%}%></TD>
  </TR> 
  <TR height="35">
  	<TH style="text-align:left">기타조건</TH>
	<TH style="text-align:left">하도급대금<br>연동 기준비율</TH>
	<TD><% if(!Order.get("PAY_CON_RATE").isEmpty()){%> <%= Order.get("PAY_CON_RATE")%>%<%}%></TD>
	<TH style="text-align:left">지체상금</TH>
	<TD><% if(!Order.get("CBC_DAMAGE_RATE").isEmpty()){%>일당 계약금액의 <%= Order.get("CBC_DAMAGE_RATE")%>%,<%}%><% if(!Order.get("CBC_DAMAGE_MAXRATE").isEmpty()){%>최대 <%= Order.get("CBC_DAMAGE_MAXRATE")%>%<%}%></TD>	
  </TR>
  <TR height="25">
  	<TH rowspan="6" style="text-align:left">간접비 견적조건</TH>
	<TH style="text-align:left">고용보험료</TH>
	<TD><% if(!Order.get("OBC_EMP_RATE").isEmpty()){%>노무비 * <%= Order.get("OBC_EMP_RATE")%>% &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp  &nbsp
		<%}%><%=Order.get("OBC_EMP_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>
	<TH style="text-align:left">연금보험료</TH>
	<TD><% if(!Order.get("OBC_PENSION_RATE").isEmpty()){%>직접노무비 <%=Order.get("OBC_PENSION_RATE")%>% &nbsp &nbsp &nbsp&nbsp &nbsp  &nbsp
		<%}%><%=Order.get("OBC_PENSION_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">건강보험료</TH>
	<TD><% if(!Order.get("OBC_HEALTH_RATE").isEmpty()){%>직접노무비 * <%=Order.get("OBC_HEALTH_RATE")%>% &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp   &nbsp
	<%}%><%=Order.get("OBC_HEALTH_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>
	<TH style="text-align:left">노인장기보험료</TH>
	<TD><% if(!Order.get("OBC_ELDER_RATE").isEmpty()){%>건강보험료 * <%=Order.get("OBC_ELDER_RATE")%>% &nbsp &nbsp&nbsp &nbsp  &nbsp
	<%}%><%=Order.get("OBC_ELDER_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">산재보험료</TH>
	<TD><% if(!Order.get("OBC_WORK_RATE").isEmpty()){%>노무비 * <%=Order.get("OBC_WORK_RATE")%>% &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
		<%}%><%=Order.get("OBC_WORK_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>
	<TH style="text-align:left">퇴직공제부금</TH>
	<TD><% if(!Order.get("OBC_RESIGN_RATE").isEmpty()){%>노무비 * <%=Order.get("OBC_RESIGN_RATE")%>% &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp&nbsp &nbsp
		<%}%><%=Order.get("OBC_RESIGN_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">안전관리비</TH>
	<TD><% if(!Order.get("OBC_SAFE_RATE").isEmpty()){%>노무비 * <%= Order.get("OBC_SAFE_RATE")%>% &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
		<%}%><%=Order.get("OBC_SAFE_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>
	<TH style="text-align:left">환경관리비</TH>
	<TD><% if(!Order.get("OBC_ENV_RATE").isEmpty()){%>재료비 * <%= Order.get("OBC_ENV_RATE")%>%  &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp&nbsp &nbsp
		<%}%><%=Order.get("OBC_ENV_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">현장관리비</TH>
	<TD><% if(!Order.get("OBC_SITE_RATE").isEmpty()){%>직접비 * <%=Order.get("OBC_SITE_RATE")%>% &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
		<%}%><%=Order.get("OBC_SITE_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>
	<TH style="text-align:left">매입부가세</TH>
	<TD><% if(!Order.get("OBC_DUTY_RATE").isEmpty()){%>재료비 * 매입세율 <%= Order.get("OBC_DUTY_RATE")%>%  &nbsp
		<%}%><%=Order.get("OBC_DUTY_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>	
  </TR>
  <TR height="25"> 
	<TH style="text-align:left">간접비 정산조건</TH>
	<TD><%=Order.get("OBC_IND_YN").equals("Y") ? "<font color='blue'>[실적정산]</font>" : "<font color='red'>[비례정산]</font>" %></TD>
	<TH style="text-align:left">건설기계 수수료</TH>
	<TD><%=Order.get("OBC_WARR_YN").equals("Y") ? "<font color='blue'>[견적포함]</font>" : "<font color='red'>[견적미포함]</font>" %></TD>
  </TR>   
</TABLE>
<%}else{ %>
<TABLE class="form-table">
	<colgroup>
		<col width="160"/>
		<col width="20%">
		<col width="160"/>
		<col width="20%">
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25">
	<TH style="text-align:left">통화구분</TH>
	<TD colspan="5"><%=Order.get("CURRENCY_GB_NM") %>&nbsp&nbsp  
		<%=Order.get("CURRENCY_GB_YN").equals("Y") ? "[업체변경가능]" : "[업체변경불가능]" %>
		
	</TD>
  </TR>
  <TR height="25">
	<TH style="text-align:left">Installation</TH><!-- 설치비 포함여부 -->
	<TD><%=Order.get("PBC_INSTALL_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
	<TH style="text-align:left">Spare Parts for Commissionig</TH><!-- 시운전 포함여부 -->
	<TD><%=Order.get("PBC_COMMISS_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
	<TH style="text-align:left">Special Tool</TH><!-- 설치비 특별공구 포함여부 -->
	<TD><%=Order.get("PBC_SPETOOL_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">Test & Inspection at Fabrication shop</TH><!-- 샾(공장) 검사비용 포함여부 -->
	<TD><%=Order.get("PBC_TEST_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
	<TH style="text-align:left">Documentation</TH><!-- vendor print  (무조건 포함)  삭제? -->
	<TD><%=Order.get("PBC_DOC_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
	<TH style="text-align:left">Packing cost</TH><!-- 포장비용 포함여부 -->
	<TD><%=Order.get("PBC_PACK_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">Inland Transportaion</TH><!-- 내륙운송비 -->
	<TD><%=Order.get("PBC_LANDTRAN_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
	<TH style="text-align:left">Delivery Condition</TH><!-- 인도조건 (현장도착도, 현장상차도,현장설치도, 설치시운전도) -->
	<TD colspan="3">
	  <%if(!Order.get("DELIVERY_CONDITION_NM").isEmpty()){ %><%=Order.get("DELIVERY_CONDITION_NM") %>&nbsp&nbsp  <%}%><%=Order.get("DELIVERY_CONDITION_YN").equals("Y") ? "[업체변경가능]" : "[업체 변경 불가능]" %></TD>
  </TR>
   <TR height="25">
	<TH style="text-align:left">OPTIONAL PRICE</TH><!-- 현장감독관 일당   &     기타일당 내역 -->
	<TD colspan="5">A. Supervision fee &nbsp <%=Order.get("PBC_FEE_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %>
	    &nbsp&nbsp <%if(!Order.get("PBC_OPTION_COMMENT").isEmpty()){ %> B. <%= Order.get("PBC_OPTION_COMMENT")%>&nbsp<%=Order.get("PBC_OPTION_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %><%}%></TD>
  </TR>
  <TR height="25">
	<TH style="text-align:left">Liquidated Damages</TH><!-- 지체상금 fix -->
	<TD colspan="5"><%if(!Order.get("CBC_DAMAGE_RATE").isEmpty()){ %><%= Order.get("CBC_DAMAGE_RATE")%>% <%= Order.get("CBC_DAMAGE_NM")%>,<%}%>
	                        <%if(!Order.get("CBC_DAMAGE_MAXRATE").isEmpty()){ %>Max <%= Order.get("CBC_DAMAGE_MAXRATE")%>%<%}%></TD>
  </TR>
  <TR height="25">
	<TH style="text-align:left">선급금</TH>
	<TD><%=Order.get("CBC_FIRST_RATE") %>% <%= Order.get("PBC_FIRST_CONDI")%></TD>
	<TH style="text-align:left">중도금</TH>
	<TD><%= Order.get("CPC_MID_RATE")%>% <%=Order.get("PBC_MID_CONDI")%></TD>
	<TH style="text-align:left">잔금</TH>
	<TD><%= Order.get("PBC_REST_RATE") %>% <%=Order.get("PBC_REST_CONDI")%></TD>	
  </TR>
  <TR height="25">
	<TH style="text-align:left">First Payment Bond</TH><!-- 선급금이행증권(yes, no) -->
	<TD><%if(!Order.get("PBC_FRSTGUAR_RATE").isEmpty()){ %><%= Order.get("PBC_FRSTGUAR_RATE") %>% <%}%><%= Order.get("PBC_FRSTGUAR_CONDI")%></TD>
	<TH style="text-align:left">Performance Bond</TH><!-- 계약이행증권(yes, no) -->
	<TD><%if(!Order.get("CONTFUL_RATE").isEmpty()){ %><%= Order.get("CONTFUL_RATE") %>%<%}%><%=Order.get("CONTFUL_CONDI") %></TD>
	<TH style="text-align:left">Guarantee Bond</TH><!-- 하자이행증권(yes, no) -->
	<TD><%if(!Order.get("WARR_RATE").isEmpty()){ %><%= Order.get("WARR_RATE") %>%<%}%><%= Order.get("WARR_CONDI")%></TD>	
  </TR> 
  <TR height="25">
	<TH style="text-align:left">Guarantee Period</TH><!-- 하자보수기간 -->
	<TD colspan="3"><%=Order.get("PBC_DEFECT_CONDI") %><%=Order.get("CBC_DEFECT_DAY") %> 
	<%=Order.get("CBC_DERECT_TERM_NM") %>간
		<input type="checkbox" id="addGuar" style="margin-top:2px; display:none;">
	<span class="checkAdd" style="display:none;">&nbsp;or&nbsp;
	<%=Order.get("PBC_DEFECT_CONDI2") %> <%=Order.get("CBC_DEFECT_DAY2")%>  
	<%if(Order.get("CBC_DERECT_TERM_CD2").equals("01")){%>
		<span>일 간 중 선도래일</span>
	<%}else if(Order.get("CBC_DERECT_TERM_CD2").equals("02")){%>
		<span>개월 간 중 선도래일</span>
	<%} %>
	</span>
	</TD>
	<TH style="text-align:left">Delivery Period</TH><!-- 납기일 fix -->
	<TD><%if(!Order.get("DELI_FROM_DY").isEmpty() || !Order.get("DELI_TO_DY").isEmpty()){ %>
		<%=Order.get("DELI_FROM_DY_NM") %>~ 
		<%= Order.get("DELI_TO_DY_NM") %><%}%>
	</TD>
  </TR> 
</TABLE>
<%} %>
<TABLE class="form-table" style="margin-top:5px">
	<colgroup>
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25">
	<TH style="text-align:left">특이사항</TH>
	<TD >
	 <%=StringUtils.cvtHTML(Order.get("OUTER_REMARKS"))%>  
	</TD>
  </TR>
  <TR height="100">
	<TH style="text-align:left">첨부파일</TH>
	<TD>
	<TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width:85%;height:80px" rows="1" class="input" readOnly><%=fileout.get(Order.get("DOC_ETC_OUT")) %></TEXTAREA>
    <IMG id='search_spot_button' onClick="doAttachFile(document.form1.DEMANDED_ID,2);" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
	</TD>
  </TR> 
</TABLE>
<%if(!Order.get("DEMANDED_KIND").equals("O")){ %>
<div class="application-info magT15">
	<div class="application-sub-title">
		<span class="title">구매견적내역</span>
	</div>
</div>
<div id="sheet1_div" style="height: auto; min-height: 300px; overflow: auto;">
<!-- <div id="sheet_div" style="padding-top:5px; width:100%; height:100%;" valign="top">-->
	<script>createIBSheet('sheet1','100%', '300px');</script>
</div>
<%} %>
</form>

<!-- 전자인증 모듈 설정 //-->
<link rel="stylesheet" type="text/css" href="/CrossCert/CC_WSTD_home/unisignweb/rsrc/css/certcommon.css?v=1" />
<script type="text/javascript" src="/CrossCert/CC_WSTD_home/unisignweb/js/unisignwebclient.js?v=1"></script>
<script type="text/javascript" src="/CrossCert/UniSignWeb_Multi_Init_Nim.js?v=1"></script>
<!-- 전자인증 모듈 설정 //-->