<%-- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> --%> <%@ page contentType="application/vnd.ms-excel;charset=UTF-8" %> <%@ page isThreadSafe = "true" %> <%@ page buffer="256kb" %> <%@ page autoFlush = "true" %> <%@ page import="com.pms.common.utils.*"%> <%@ page import="java.util.*" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <% pageContext.setAttribute("replaceChar","\n"); %> <% java.text.SimpleDateFormat frm= new java.text.SimpleDateFormat ("yyyy_MM_dd_HH_mm"); Calendar cal = Calendar.getInstance(); String todayKor = frm.format(cal.getTime()); Map masterInfo = (Map)request.getAttribute("info"); ArrayList detailList = (ArrayList)request.getAttribute("detailList"); ArrayList apprList = (ArrayList)request.getAttribute("apprList"); ArrayList multiMasterList = (ArrayList)request.getAttribute("multiMasterList"); if(multiMasterList == null || multiMasterList.isEmpty()){ multiMasterList = new ArrayList(); } String excelName = CommonUtils.checkNull((String)masterInfo.get("PURCHASE_ORDER_NO")); /* String encodeName = excelName+todayKor+".xls"; */ String encodeName = "발주서_"+excelName+".xls"; String fileName = java.net.URLEncoder.encode(encodeName,"UTF-8"); String sty_td_h = "style=\"text-align:center; background-color:#D5D5D5;\""; response.setHeader("Content-Disposition", "attachment;filename="+fileName+""); response.setHeader("Content-Description", "JSP Generated Data"); String[] arrAppr = {"","","",""}; //결재라인 4 for(int i = 0 ; i < apprList.size() ; i++){ HashMap map = (HashMap)apprList.get(i); if(i==0){ arrAppr[0] = CommonUtils.checkNull(map.get("WRITER"))+"
"+CommonUtils.checkNull(map.get("REGDATE")); } if(i<4){ arrAppr[i+1] = CommonUtils.checkNull(map.get("TARGET_USER_NAME"))+"
"+CommonUtils.checkNull(map.get("PROC_DATE")); } } %> <%-- --%>
<%-- --%> <%-- ====================================================== --%> <%-- --%> <%-- --%> <% for(int i = 0 ; i < detailList.size() ; i++){ HashMap map = (HashMap)detailList.get(i); %> <%-- --%> <% } %> <% HashMap map; for(int i = 0 ; i < 10 ; i++){ if(multiMasterList.size()-1 >= i){ map = (HashMap)multiMasterList.get(i); }else{ map = new HashMap(); } %> <%}%> <% for(int i = 0 ; i < 10 ; i++){ if(multiMasterList.size()-1 >= i){ map = (HashMap)multiMasterList.get(i); }else{ map = new HashMap(); } %> <%}%> <% for(int i = 0 ; i < 10 ; i++){ if(multiMasterList.size()-1 >= i){ map = (HashMap)multiMasterList.get(i); }else{ map = new HashMap(); } %> <%}%>
>발주번호 <%=CommonUtils.checkNull((String)masterInfo.get("PURCHASE_ORDER_NO"))%> >발주부품 <%=CommonUtils.checkNull((String)masterInfo.get("TYPE_NAME"))%> >프로젝트번호 <%=CommonUtils.checkNull((String)masterInfo.get("PROJECT_NO"))%> >유닛명 <%=CommonUtils.checkNull((String)masterInfo.get("UNIT_NAME"))%>
발주서
(Purchase Order)
결 재 >담당 >검토 >결재 >대표
<%=arrAppr[0]%> <%=arrAppr[1]%> <%=arrAppr[2]%> <%=arrAppr[3]%>
rowspan="6">발주처 colspan="2">회사명 <%=CommonUtils.checkNull((String)masterInfo.get("SALES_NAME"))%> rowspan="6">공급처 colspan="2">회사명 <%=CommonUtils.checkNull((String)masterInfo.get("PARTNER_NAME"))%>
colspan="2">사업자번호 <%=CommonUtils.checkNull((String)masterInfo.get("SALES_REG_NO"))%> colspan="2">사업자번호 <%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_BUS_NO"))%>
colspan="2">담당자 <%=CommonUtils.checkNull((String)masterInfo.get("SALES_MNG_USER_NAME"))%> colspan="2">HP <%=CommonUtils.checkNull((String)masterInfo.get("SALES_MNG_USER_CELL_PHONE"))%> colspan="2">대표자 <%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_NAME"))%> colspan="2">HP <%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_HP"))%>
colspan="2">전화 <%=CommonUtils.checkNull((String)masterInfo.get("SALES_SUPPLY_OFFICE_NO"))%> colspan="2">FAX <%=CommonUtils.checkNull((String)masterInfo.get("SALES_SUPPLY_FAX_NO"))%> colspan="2">전화 <%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_TEL"))%> colspan="2">FAX <%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_FAX"))%>
colspan="2">E-MAIL <%=CommonUtils.checkNull((String)masterInfo.get("SALES_EMAIL"))%> colspan="2">E-MAIL <%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_EMAIL"))%>
colspan="2">주소 <%=CommonUtils.checkNull((String)masterInfo.get("SALES_SUPPLY_ADDRESS"))%> colspan="2">주소 <%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_ADDR"))%>
아래의 자재를 발주하오니 기일 내 필히 납품하여 주시기 바랍니다.
>발주구분 <%=CommonUtils.checkNull((String)masterInfo.get("ORDER_TYPE_CD_NAME"))%> >납품장소 <%=CommonUtils.checkNull((String)masterInfo.get("DELIVERY_PLACE_NAME"))%> >검수방법 <%=CommonUtils.checkNull((String)masterInfo.get("INSPECT_METHOD_NAME"))%> >결제조건 <%=CommonUtils.checkNull((String)masterInfo.get("PAYMENT_TERMS_NAME"))%> >입고요청일 <%=CommonUtils.checkNull((String)masterInfo.get("DELIVERY_DATE"))%> >
>발주서 No. <%=CommonUtils.checkNull((String)masterInfo.get("PURCHASE_ORDER_NO_ORG_NO"))%> >제 목 <%=CommonUtils.checkNull((String)masterInfo.get("TITLE"))%> >부가세포함 발주금액(원) <%=CommonUtils.checkNull((String)masterInfo.get("TOTAL_PRICE_TXT_ALL"))%>>부가세 <%=CommonUtils.checkNull((String)masterInfo.get("VAT_METHOD_NAME"))%>
>NO. >품명 >품번 >규격 >Maker >단위>설계수량>수량 >공급단가 >레이져단가 >용접단가 >가공단가 >후처리단가 >공급가>부가세포함공급가>총발주수량 >재고수량 >실발주수량 >실공급가
<%=(i+1)%> <%=CommonUtils.checkNull(map.get("PART_NAME" ))%> <%=CommonUtils.checkNull(map.get("PART_NO" ))%> <%=CommonUtils.checkNull(map.get("SPEC" ))%> <%=CommonUtils.checkNull(map.get("MAKER" ))%> <%=CommonUtils.checkNull(map.get("UNIT_NAME" ))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("ORDER_QTY" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PARTNER_PRICE" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PRICE1" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PRICE2" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PRICE3" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PRICE4" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("SUPPLY_UNIT_PRICE")))%><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("SUPPLY_UNIT_VAT_SUM_PRICE")))%><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("TOTAL_ORDER_QTY" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("STOCK_QTY" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("REAL_ORDER_QTY" )))%> <%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("REAL_SUPPLY_PRICE" )))%>
>합계(원) <%=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("TOTAL_SUPPLY_PRICE")))%> <%--=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("TOTAL_SUPPLY_UNIT_PRICE")))--%> <%=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("TOTAL_REAL_SUPPLY_PRICE")))%>
>할인금액(원) <%=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("DISCOUNT_PRICE_ALL")))%> >네고율 <%=CommonUtils.checkNull((String)masterInfo.get("NEGO_RATE"))%> >할인공급가(원) <%=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("TOTAL_PRICE_ALL")))%>
>동시적용프로젝트번호<%=CommonUtils.checkNull(map.get("CONTRACT_NO"))%>
>입고계획일<%=CommonUtils.checkNull(map.get("DELIVERY_PLAN_DATE"))%>
>입고계획수량<%=CommonUtils.checkNull(map.get("DELIVERY_PLAN_QTY"))%>
>작업지시사항${fn:length(multiMasterList)} ${fn:replace(info.REMARK, replaceChar, "
")}
★거래명세서 자동생성은 발주서 기준으로 입고수량 대비 정품수량 동일시 구매팀 확인후 발주서 기준으로 자동생성 된다.