주문서 컬럼순서 오류 재수정
This commit is contained in:
@@ -2168,8 +2168,8 @@ public class ApprovalService {
|
||||
private String buildOrderContentsHtml(Map orderInfo, List<Map> itemList){
|
||||
StringBuilder html = new StringBuilder();
|
||||
|
||||
String contractNo = CommonUtils.checkNull(orderInfo.get("CONTRACT_NO"));
|
||||
String orderDate = CommonUtils.checkNull(orderInfo.get("ORDER_DATE"));
|
||||
String poNo = escapeHtml(CommonUtils.checkNull(orderInfo.get("PO_NO")));
|
||||
String clientNm = escapeHtml(CommonUtils.checkNull(orderInfo.get("CLIENT_NM")));
|
||||
String clientBusRegNo = escapeHtml(CommonUtils.checkNull(orderInfo.get("CLIENT_BUS_REG_NO")));
|
||||
String clientCeoNm = escapeHtml(CommonUtils.checkNull(orderInfo.get("CLIENT_CEO_NM")));
|
||||
@@ -2183,63 +2183,79 @@ public class ApprovalService {
|
||||
String vat = CommonUtils.checkNull(orderInfo.get("ORDER_VAT"));
|
||||
String totalAmount = CommonUtils.checkNull(orderInfo.get("ORDER_TOTAL_AMOUNT"));
|
||||
String vatNote = escapeHtml(CommonUtils.checkNull(orderInfo.get("VAT_NOTE")));
|
||||
String regDatetime = escapeHtml(CommonUtils.checkNull(orderInfo.get("REG_DATETIME")));
|
||||
|
||||
final String TH = "style='border:1px solid #999; padding:4px 8px; background-color:#f5f5f5; text-align:center; font-weight:bold; font-size:12px;'";
|
||||
final String TD = "style='border:1px solid #999; padding:4px 8px; font-size:12px;'";
|
||||
final String TD_C = "style='border:1px solid #999; padding:4px 8px; font-size:12px; text-align:center;'";
|
||||
final String TD_R = "style='border:1px solid #999; padding:4px 8px; font-size:12px; text-align:right;'";
|
||||
final String S = "border:1px solid #000; padding:2px 4px; font-size:11px; vertical-align:middle;";
|
||||
final String LBL = S + " text-align:center; font-weight:bold; background-color:#e8faff;";
|
||||
final String VL = LBL + " writing-mode:vertical-rl; letter-spacing:5px; font-size:12px;";
|
||||
|
||||
html.append("<div style='font-family:맑은 고딕; max-width:800px; margin:0 auto;'>");
|
||||
html.append("<h2 style='text-align:center; letter-spacing:15px;'>주 문 서</h2>");
|
||||
html.append("<div style='font-family:맑은 고딕,Malgun Gothic,sans-serif; max-width:860px; margin:0 auto;'>");
|
||||
html.append("<h2 style='text-align:center; letter-spacing:25px; border-bottom:2px solid #000; padding-bottom:8px;'>주 문 서</h2>");
|
||||
html.append("<p style='font-size:11px; margin:2px 0;'>주문일자 : ").append(escapeHtml(orderDate)).append("</p>");
|
||||
html.append("<p style='font-size:11px; margin:2px 0;'>증빙번호 : ").append(poNo).append("</p>");
|
||||
|
||||
// 헤더
|
||||
String poNo = escapeHtml(CommonUtils.checkNull(orderInfo.get("PO_NO")));
|
||||
html.append("<p style='font-size:12px;'>주문일자 : ").append(escapeHtml(orderDate)).append("</p>");
|
||||
html.append("<p style='font-size:12px;'>증빙번호 : ").append(poNo).append("</p>");
|
||||
|
||||
// 공급받는자/공급자 테이블
|
||||
html.append("<table style='width:100%; border-collapse:collapse; margin-bottom:5px;'>");
|
||||
html.append("<tr><td rowspan='4' " + TH + " style='width:25px; writing-mode:vertical-rl;'>공급받는자</td>");
|
||||
html.append("<td " + TH + ">등록번호</td><td " + TD + " colspan='2'>").append(clientBusRegNo).append("</td>");
|
||||
html.append("<td rowspan='4' " + TH + " style='width:25px; writing-mode:vertical-rl;'>공급자</td>");
|
||||
html.append("<td " + TH + ">등록번호</td><td " + TD + " colspan='2'>314-81-75146</td></tr>");
|
||||
|
||||
html.append("<tr><td " + TH + ">상호</td><td " + TD + ">").append(clientNm).append("</td>");
|
||||
html.append("<td " + TH + " style='width:35px;'>성명</td><td " + TD + ">").append(clientCeoNm).append("</td>");
|
||||
html.append("<td " + TH + ">상호</td><td " + TD + ">주식회사알피에스본사</td>");
|
||||
html.append("<td " + TH + " style='width:35px;'>성명</td><td " + TD + ">이동헌</td></tr>");
|
||||
|
||||
html.append("<tr><td " + TH + ">주소</td><td " + TD + " colspan='2'>").append(clientAddr).append("</td>");
|
||||
html.append("<td " + TH + ">주소</td><td " + TD + " colspan='2'>대전광역시 유성구 국제과학10로 8(둔곡동)</td></tr>");
|
||||
|
||||
html.append("<tr><td " + TH + ">업태</td><td " + TD + ">").append(clientBusType).append("</td>");
|
||||
html.append("<td " + TH + " style='width:35px;'>종목</td><td " + TD + ">").append(clientBusItem).append("</td>");
|
||||
html.append("<td " + TH + ">업태</td><td " + TD + ">제조업</td>");
|
||||
html.append("<td " + TH + " style='width:35px;'>종목</td><td " + TD + ">금속절삭가공기계,반도체제조용기계</td></tr>");
|
||||
html.append("</table>");
|
||||
|
||||
// 납품처/담당자
|
||||
html.append("<table style='width:100%; border-collapse:collapse; margin-bottom:5px;'>");
|
||||
html.append("<tr><td " + TH + ">납품처</td><td " + TD + ">").append(clientNm).append("</td>");
|
||||
html.append("<td " + TH + ">전화번호</td><td " + TD + ">").append(clientTelNo).append("</td>");
|
||||
html.append("<td " + TH + ">팩스번호</td><td " + TD + ">").append(clientFaxNo).append("</td></tr>");
|
||||
html.append("<tr><td " + TH + ">주소</td><td " + TD + ">").append(clientAddr).append("</td>");
|
||||
html.append("<td " + TH + ">담당자</td><td " + TD + ">").append(writerName).append("</td>");
|
||||
html.append("<td " + TH + ">C.P.번호</td><td " + TD + "></td></tr>");
|
||||
html.append("</table>");
|
||||
|
||||
// 품목 테이블
|
||||
html.append("<table style='width:100%; border-collapse:collapse;'>");
|
||||
// 공급받는자 / 공급자 (10컬럼: 세로3% + 라벨8% + 값auto + 라벨6% + 값9% × 2세트)
|
||||
html.append("<table style='width:100%; border-collapse:collapse; table-layout:fixed; margin-top:2px;'>");
|
||||
html.append("<colgroup>");
|
||||
html.append("<col style='width:3%;'><col style='width:8%;'><col style='width:20%;'><col style='width:6%;'><col style='width:9%;'>");
|
||||
html.append("<col style='width:3%;'><col style='width:8%;'><col style='width:20%;'><col style='width:6%;'><col style='width:12%;'>");
|
||||
html.append("</colgroup>");
|
||||
// row1: 등록번호
|
||||
html.append("<tr>");
|
||||
html.append("<th " + TH + " style='width:30px;'>No.</th>");
|
||||
html.append("<th " + TH + " style='width:90px;'>품번</th>");
|
||||
html.append("<th " + TH + ">품명</th>");
|
||||
html.append("<th " + TH + ">규격</th>");
|
||||
html.append("<th " + TH + " style='width:40px;'>단위</th>");
|
||||
html.append("<th " + TH + " style='width:75px;'>납기일</th>");
|
||||
html.append("<th " + TH + " style='width:50px;'>수량</th>");
|
||||
html.append("<th " + TH + " style='width:70px;'>단가</th>");
|
||||
html.append("<th " + TH + " style='width:80px;'>금액</th>");
|
||||
html.append("<td rowspan='4' style='").append(VL).append("'>공급받는자</td>");
|
||||
html.append("<td style='").append(LBL).append("'>등록번호</td>");
|
||||
html.append("<td colspan='3' style='").append(S).append("'>").append(clientBusRegNo).append("</td>");
|
||||
html.append("<td rowspan='4' style='").append(VL).append("'>공 급 자</td>");
|
||||
html.append("<td style='").append(LBL).append("'>등록번호</td>");
|
||||
html.append("<td colspan='3' style='").append(S).append("'>314-81-75146</td>");
|
||||
html.append("</tr>");
|
||||
// row2: 상호/성명
|
||||
html.append("<tr>");
|
||||
html.append("<td style='").append(LBL).append("'>상 호</td><td style='").append(S).append("'>").append(clientNm).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>성명</td><td style='").append(S).append("'>").append(clientCeoNm).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>상 호</td><td style='").append(S).append("'>주식회사알피에스본사</td>");
|
||||
html.append("<td style='").append(LBL).append("'>성명</td><td style='").append(S).append("'>이동헌</td>");
|
||||
html.append("</tr>");
|
||||
// row3: 주소
|
||||
html.append("<tr>");
|
||||
html.append("<td style='").append(LBL).append("'>주 소</td><td colspan='3' style='").append(S).append("'>").append(clientAddr).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>주 소</td><td colspan='3' style='").append(S).append("'>대전광역시 유성구 국제과학10로 8(둔곡동)</td>");
|
||||
html.append("</tr>");
|
||||
// row4: 업태/종목
|
||||
html.append("<tr>");
|
||||
html.append("<td style='").append(LBL).append("'>업 태</td><td style='").append(S).append("'>").append(clientBusType).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>종목</td><td style='").append(S).append("'>").append(clientBusItem).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>업 태</td><td style='").append(S).append("'>제조업</td>");
|
||||
html.append("<td style='").append(LBL).append("'>종목</td><td style='").append(S).append(" font-size:9px;'>금속절삭가공기계,반도체제조용기계</td>");
|
||||
html.append("</tr></table>");
|
||||
|
||||
// 납품처 / 담당자 (6컬럼)
|
||||
html.append("<table style='width:100%; border-collapse:collapse; table-layout:fixed; margin-top:-1px;'>");
|
||||
html.append("<colgroup><col style='width:9%;'><col><col style='width:9%;'><col style='width:16%;'><col style='width:9%;'><col style='width:16%;'></colgroup>");
|
||||
html.append("<tr>");
|
||||
html.append("<td style='").append(LBL).append("'>납 품 처</td><td style='").append(S).append("'>").append(clientNm).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>전화번호</td><td style='").append(S).append("'>").append(clientTelNo).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>팩스번호</td><td style='").append(S).append("'>").append(clientFaxNo).append("</td>");
|
||||
html.append("</tr><tr>");
|
||||
html.append("<td style='").append(LBL).append("'>주 소</td><td style='").append(S).append("'>").append(clientAddr).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>담 당 자</td><td style='").append(S).append("'>").append(writerName).append("</td>");
|
||||
html.append("<td style='").append(LBL).append("'>C.P.번호</td><td style='").append(S).append("'></td>");
|
||||
html.append("</tr></table>");
|
||||
|
||||
// 품목 테이블 (9컬럼)
|
||||
html.append("<table style='width:100%; border-collapse:collapse; table-layout:fixed; margin-top:-1px;'>");
|
||||
html.append("<colgroup><col style='width:4%;'><col style='width:11%;'><col style='width:20%;'><col style='width:18%;'>");
|
||||
html.append("<col style='width:5%;'><col style='width:10%;'><col style='width:6%;'><col style='width:10%;'><col style='width:10%;'></colgroup>");
|
||||
html.append("<tr>");
|
||||
html.append("<th style='").append(LBL).append("'>No.</th>");
|
||||
html.append("<th style='").append(LBL).append("'>품번</th>");
|
||||
html.append("<th style='").append(LBL).append("'>품명</th>");
|
||||
html.append("<th style='").append(LBL).append("'>규격</th>");
|
||||
html.append("<th style='").append(LBL).append("'>단위</th>");
|
||||
html.append("<th style='").append(LBL).append("'>납기일</th>");
|
||||
html.append("<th style='").append(LBL).append("'>수량</th>");
|
||||
html.append("<th style='").append(LBL).append("'>단가</th>");
|
||||
html.append("<th style='").append(LBL).append("'>금액</th>");
|
||||
html.append("</tr>");
|
||||
|
||||
int totalQty = 0;
|
||||
@@ -2253,40 +2269,42 @@ public class ApprovalService {
|
||||
String itemSupply = CommonUtils.checkNull(item.get("ORDER_SUPPLY_PRICE"));
|
||||
|
||||
html.append("<tr>");
|
||||
html.append("<td " + TD_C + ">").append(i + 1).append("</td>");
|
||||
html.append("<td " + TD_C + ">").append(escapeHtml(CommonUtils.checkNull(item.get("PART_NO")))).append("</td>");
|
||||
html.append("<td " + TD + ">").append(escapeHtml(CommonUtils.checkNull(item.get("PART_NAME")))).append("</td>");
|
||||
html.append("<td " + TD + ">").append(escapeHtml(CommonUtils.checkNull(item.get("SPEC")))).append("</td>");
|
||||
html.append("<td " + TD_C + ">").append(escapeHtml(CommonUtils.checkNull(item.get("UNIT_NAME")))).append("</td>");
|
||||
html.append("<td " + TD_C + ">").append(escapeHtml(CommonUtils.checkNull(item.get("DUE_DATE")))).append("</td>");
|
||||
html.append("<td " + TD_R + ">").append(formatNumber(qty)).append("</td>");
|
||||
html.append("<td " + TD_R + ">").append(formatNumber(unitPrice)).append("</td>");
|
||||
html.append("<td " + TD_R + ">").append(formatNumber(itemSupply)).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:center;'>").append(i + 1).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:center;'>").append(escapeHtml(CommonUtils.checkNull(item.get("PART_NO")))).append("</td>");
|
||||
html.append("<td style='").append(S).append("'>").append(escapeHtml(CommonUtils.checkNull(item.get("PART_NAME")))).append("</td>");
|
||||
html.append("<td style='").append(S).append("'>").append(escapeHtml(CommonUtils.checkNull(item.get("SPEC")))).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:center;'>").append(escapeHtml(CommonUtils.checkNull(item.get("UNIT_NAME")))).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:center;'>").append(escapeHtml(CommonUtils.checkNull(item.get("DUE_DATE")))).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:right;'>").append(formatNumber(qty)).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:right;'>").append(formatNumber(unitPrice)).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:right;'>").append(formatNumber(itemSupply)).append("</td>");
|
||||
html.append("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
// 합계
|
||||
html.append("<tr style='background-color:#ffffcc;'>");
|
||||
html.append("<td " + TD_C + " colspan='6' style='font-weight:bold;'>합 계</td>");
|
||||
html.append("<td " + TD_R + " style='font-weight:bold;'>").append(formatNumber(totalQty)).append("</td>");
|
||||
html.append("<td " + TD_R + "></td>");
|
||||
html.append("<td " + TD_R + " style='font-weight:bold;'>").append(formatNumber(supplyPrice)).append("</td>");
|
||||
// 합계행
|
||||
html.append("<tr><td colspan='9' style='").append(S).append(" text-align:center; background-color:#ffffcc; font-weight:bold; letter-spacing:8px;'>합 계</td></tr>");
|
||||
html.append("<tr>");
|
||||
html.append("<td colspan='6' style='").append(S).append(" text-align:center; font-weight:bold;'></td>");
|
||||
html.append("<td style='").append(S).append(" text-align:right; font-weight:bold;'>").append(formatNumber(totalQty)).append("</td>");
|
||||
html.append("<td style='").append(S).append(" text-align:right;'></td>");
|
||||
html.append("<td style='").append(S).append(" text-align:right; font-weight:bold;'>").append(formatNumber(supplyPrice)).append("</td>");
|
||||
html.append("</tr></table>");
|
||||
|
||||
// 비고(합계 요약)
|
||||
html.append("<table style='width:100%; border-collapse:collapse;'>");
|
||||
html.append("<tr><td rowspan='3' " + TH + " style='width:40px; writing-mode:vertical-rl; letter-spacing:8px; font-size:13px;'>비 고</td>");
|
||||
html.append("<td rowspan='3' " + TD + "></td>");
|
||||
html.append("<td " + TH + " style='width:120px; letter-spacing:2px;'>공 급 가 액 합 계</td><td " + TD_R + " style='width:150px;'>").append(formatNumber(supplyPrice)).append("</td></tr>");
|
||||
html.append("<tr><td " + TH + " style='letter-spacing:2px;'>부 가 가 치 세</td><td " + TD_R + ">").append(formatNumber(vat)).append("</td></tr>");
|
||||
html.append("<tr><td " + TH + " style='letter-spacing:5px;'>총 계</td><td " + TD_R + " style='font-weight:bold;'>").append(formatNumber(totalAmount)).append("</td></tr>");
|
||||
// 비고(합계 요약) - 4컬럼
|
||||
html.append("<table style='width:100%; border-collapse:collapse; table-layout:fixed; margin-top:-1px;'>");
|
||||
html.append("<colgroup><col style='width:5%;'><col><col style='width:15%;'><col style='width:19%;'></colgroup>");
|
||||
html.append("<tr><td rowspan='3' style='").append(VL).append(" letter-spacing:8px; font-size:13px;'>비 고</td>");
|
||||
html.append("<td rowspan='3' style='").append(S).append("'></td>");
|
||||
html.append("<td style='").append(LBL).append(" letter-spacing:2px;'>공 급 가 액 합 계</td><td style='").append(S).append(" text-align:right;'>").append(formatNumber(supplyPrice)).append("</td></tr>");
|
||||
html.append("<tr><td style='").append(LBL).append(" letter-spacing:2px;'>부 가 가 치 세</td><td style='").append(S).append(" text-align:right;'>").append(formatNumber(vat)).append("</td></tr>");
|
||||
html.append("<tr><td style='").append(LBL).append(" letter-spacing:5px;'>총 계</td><td style='").append(S).append(" text-align:right; font-weight:bold;'>").append(formatNumber(totalAmount)).append("</td></tr>");
|
||||
html.append("</table>");
|
||||
// 하단 부가세 구분 + 날짜
|
||||
html.append("<div style='display:flex; justify-content:space-between; padding:3px 5px; font-size:11px; border:1px solid #999; border-top:none;'>");
|
||||
html.append("<span>").append(vatNote).append("</span>");
|
||||
html.append("<span>").append(escapeHtml(CommonUtils.checkNull(orderInfo.get("REG_DATETIME")))).append("</span>");
|
||||
html.append("</div>");
|
||||
html.append("<table style='width:100%; border-collapse:collapse; margin-top:-1px;'><tr>");
|
||||
html.append("<td style='").append(S).append(" border-top:none;'>").append(vatNote).append("</td>");
|
||||
html.append("<td style='").append(S).append(" border-top:none; text-align:right;'>").append(regDatetime).append("</td>");
|
||||
html.append("</tr></table>");
|
||||
|
||||
html.append("</div>");
|
||||
|
||||
@@ -2301,6 +2319,7 @@ public class ApprovalService {
|
||||
|
||||
String contractNo = CommonUtils.checkNull(orderInfo.get("CONTRACT_NO"));
|
||||
String orderDate = CommonUtils.checkNull(orderInfo.get("ORDER_DATE"));
|
||||
String poNo = CommonUtils.checkNull(orderInfo.get("PO_NO"));
|
||||
String clientNm = CommonUtils.checkNull(orderInfo.get("CLIENT_NM"));
|
||||
String clientBusRegNo = CommonUtils.checkNull(orderInfo.get("CLIENT_BUS_REG_NO"));
|
||||
String clientCeoNm = CommonUtils.checkNull(orderInfo.get("CLIENT_CEO_NM"));
|
||||
@@ -2319,55 +2338,54 @@ public class ApprovalService {
|
||||
html.append("<!DOCTYPE html><html><head><meta charset='UTF-8'>");
|
||||
html.append("<title>주문서 - ").append(contractNo).append("</title>");
|
||||
html.append("<style>");
|
||||
html.append("body { font-family: '맑은 고딕', sans-serif; font-size: 12px; margin: 20px 40px; }");
|
||||
html.append(".title { text-align: center; font-size: 26px; font-weight: bold; letter-spacing: 18px; margin-bottom: 10px; }");
|
||||
html.append(".header { font-size: 12px; margin-bottom: 8px; }");
|
||||
html.append("table { width: 100%; border-collapse: collapse; margin-bottom: 5px; }");
|
||||
html.append("th, td { border: 1px solid #000; padding: 3px 6px; font-size: 11px; }");
|
||||
html.append("th { background-color: #f0f0f0; text-align: center; font-weight: bold; }");
|
||||
html.append(".center { text-align: center; }");
|
||||
html.append(".right { text-align: right; }");
|
||||
html.append(".total-row td { background-color: #ffffcc; font-weight: bold; }");
|
||||
html.append(".vl { writing-mode: vertical-rl; letter-spacing: 3px; width: 25px; text-align: center; font-weight: bold; background-color: #f0f0f0; }");
|
||||
html.append("body { font-family:'맑은 고딕',sans-serif; font-size:12px; margin:15px 20px; }");
|
||||
html.append("table { width:100%; border-collapse:collapse; }");
|
||||
html.append("td,th { border:1px solid #000; padding:2px 4px; font-size:11px; vertical-align:middle; word-break:break-all; }");
|
||||
html.append(".lbl { text-align:center; font-weight:bold; background-color:#e8faff; }");
|
||||
html.append(".vl { text-align:center; font-weight:bold; background-color:#e8faff; writing-mode:vertical-rl; letter-spacing:5px; font-size:12px; }");
|
||||
html.append(".tc { text-align:center; } .tr { text-align:right; }");
|
||||
html.append("</style></head><body>");
|
||||
|
||||
html.append("<div class='title'>주 문 서</div>");
|
||||
String poNo = CommonUtils.checkNull(orderInfo.get("PO_NO"));
|
||||
html.append("<div class='header'>주문일자 : ").append(orderDate).append("</div>");
|
||||
html.append("<div class='header'>증빙번호 : ").append(poNo).append("</div>");
|
||||
html.append("<div style='max-width:860px; margin:0 auto;'>");
|
||||
html.append("<div style='text-align:center; font-size:24px; font-weight:bold; letter-spacing:25px; padding:10px 0 8px 0; border-bottom:2px solid #000; margin-bottom:3px;'>주 문 서</div>");
|
||||
html.append("<div style='font-size:11px; padding:2px 0;'>주문일자 : ").append(orderDate).append("</div>");
|
||||
html.append("<div style='font-size:11px; padding:2px 0;'>증빙번호 : ").append(poNo).append("</div>");
|
||||
|
||||
// 공급받는자/공급자
|
||||
html.append("<table>");
|
||||
html.append("<tr><td class='vl' rowspan='4'>공<br/>급<br/>받<br/>는<br/>자</td>");
|
||||
html.append("<th style='width:55px;'>등록번호</th><td colspan='2'>").append(clientBusRegNo).append("</td>");
|
||||
html.append("<td class='vl' rowspan='4'>공<br/>급<br/>자</td>");
|
||||
html.append("<th style='width:55px;'>등록번호</th><td colspan='2'>314-81-75146</td></tr>");
|
||||
|
||||
html.append("<tr><th>상 호</th><td>").append(clientNm).append("</td><th style='width:40px;'>성명</th><td>").append(clientCeoNm).append("</td>");
|
||||
html.append("<th>상 호</th><td>주식회사알피에스본사</td><th style='width:40px;'>성명</th><td>이동헌</td></tr>");
|
||||
|
||||
html.append("<tr><th>주 소</th><td colspan='2'>").append(clientAddr).append("</td>");
|
||||
html.append("<th>주 소</th><td colspan='2'>대전광역시 유성구 국제과학10로 8(둔곡동)</td></tr>");
|
||||
|
||||
html.append("<tr><th>업 태</th><td>").append(clientBusType).append("</td><th style='width:40px;'>종목</th><td>").append(clientBusItem).append("</td>");
|
||||
html.append("<th>업 태</th><td>제조업</td><th style='width:40px;'>종목</th><td>금속절삭가공기계,반도체제조용기계</td></tr>");
|
||||
// 공급받는자 / 공급자 (10컬럼)
|
||||
html.append("<table style='margin-top:2px; table-layout:fixed;'>");
|
||||
html.append("<colgroup>");
|
||||
html.append("<col style='width:28px;'><col style='width:62px;'><col><col style='width:45px;'><col style='width:70px;'>");
|
||||
html.append("<col style='width:28px;'><col style='width:62px;'><col><col style='width:45px;'><col style='width:90px;'>");
|
||||
html.append("</colgroup>");
|
||||
html.append("<tr>");
|
||||
html.append("<td rowspan='4' class='vl'>공급받는자</td>");
|
||||
html.append("<td class='lbl'>등록번호</td><td colspan='3'>").append(clientBusRegNo).append("</td>");
|
||||
html.append("<td rowspan='4' class='vl'>공 급 자</td>");
|
||||
html.append("<td class='lbl'>등록번호</td><td colspan='3'>314-81-75146</td></tr>");
|
||||
html.append("<tr><td class='lbl'>상 호</td><td>").append(clientNm).append("</td><td class='lbl'>성명</td><td>").append(clientCeoNm).append("</td>");
|
||||
html.append("<td class='lbl'>상 호</td><td>주식회사알피에스본사</td><td class='lbl'>성명</td><td>이동헌</td></tr>");
|
||||
html.append("<tr><td class='lbl'>주 소</td><td colspan='3'>").append(clientAddr).append("</td>");
|
||||
html.append("<td class='lbl'>주 소</td><td colspan='3'>대전광역시 유성구 국제과학10로 8(둔곡동)</td></tr>");
|
||||
html.append("<tr><td class='lbl'>업 태</td><td>").append(clientBusType).append("</td><td class='lbl'>종목</td><td>").append(clientBusItem).append("</td>");
|
||||
html.append("<td class='lbl'>업 태</td><td>제조업</td><td class='lbl'>종목</td><td style='font-size:9px;'>금속절삭가공기계,반도체제조용기계</td></tr>");
|
||||
html.append("</table>");
|
||||
|
||||
// 납품처/담당자
|
||||
html.append("<table>");
|
||||
html.append("<tr><th style='width:70px;'>납 품 처</th><td>").append(clientNm).append("</td>");
|
||||
html.append("<th style='width:70px;'>전화번호</th><td>").append(clientTelNo).append("</td>");
|
||||
html.append("<th style='width:70px;'>팩스번호</th><td>").append(clientFaxNo).append("</td></tr>");
|
||||
html.append("<tr><th>주 소</th><td>").append(clientAddr).append("</td>");
|
||||
html.append("<th>담 당 자</th><td>").append(writerName).append("</td>");
|
||||
html.append("<th>C.P.번호</th><td></td></tr>");
|
||||
// 납품처 / 담당자 (6컬럼)
|
||||
html.append("<table style='margin-top:-1px; table-layout:fixed;'>");
|
||||
html.append("<colgroup><col style='width:70px;'><col><col style='width:70px;'><col style='width:130px;'><col style='width:70px;'><col style='width:130px;'></colgroup>");
|
||||
html.append("<tr><td class='lbl'>납 품 처</td><td>").append(clientNm).append("</td>");
|
||||
html.append("<td class='lbl'>전화번호</td><td>").append(clientTelNo).append("</td>");
|
||||
html.append("<td class='lbl'>팩스번호</td><td>").append(clientFaxNo).append("</td></tr>");
|
||||
html.append("<tr><td class='lbl'>주 소</td><td>").append(clientAddr).append("</td>");
|
||||
html.append("<td class='lbl'>담 당 자</td><td>").append(writerName).append("</td>");
|
||||
html.append("<td class='lbl'>C.P.번호</td><td></td></tr>");
|
||||
html.append("</table>");
|
||||
|
||||
// 품목
|
||||
html.append("<table>");
|
||||
html.append("<tr><th style='width:30px;'>No.</th><th style='width:90px;'>품번</th><th>품명</th><th>규격</th>");
|
||||
html.append("<th style='width:40px;'>단위</th><th style='width:75px;'>납기일</th>");
|
||||
html.append("<th style='width:50px;'>수량</th><th style='width:70px;'>단가</th><th style='width:80px;'>금액</th></tr>");
|
||||
// 품목 (9컬럼)
|
||||
html.append("<table style='margin-top:-1px; table-layout:fixed;'>");
|
||||
html.append("<colgroup><col style='width:32px;'><col style='width:85px;'><col><col><col style='width:38px;'><col style='width:78px;'><col style='width:48px;'><col style='width:68px;'><col style='width:78px;'></colgroup>");
|
||||
html.append("<tr><th class='lbl'>No.</th><th class='lbl'>품번</th><th class='lbl'>품명</th><th class='lbl'>규격</th>");
|
||||
html.append("<th class='lbl'>단위</th><th class='lbl'>납기일</th><th class='lbl'>수량</th><th class='lbl'>단가</th><th class='lbl'>금액</th></tr>");
|
||||
|
||||
int totalQty = 0;
|
||||
if(itemList != null){
|
||||
@@ -2378,37 +2396,41 @@ public class ApprovalService {
|
||||
totalQty += qty;
|
||||
|
||||
html.append("<tr>");
|
||||
html.append("<td class='center'>").append(i + 1).append("</td>");
|
||||
html.append("<td class='center'>").append(CommonUtils.checkNull(item.get("PART_NO"))).append("</td>");
|
||||
html.append("<td class='tc'>").append(i + 1).append("</td>");
|
||||
html.append("<td class='tc'>").append(CommonUtils.checkNull(item.get("PART_NO"))).append("</td>");
|
||||
html.append("<td>").append(CommonUtils.checkNull(item.get("PART_NAME"))).append("</td>");
|
||||
html.append("<td>").append(CommonUtils.checkNull(item.get("SPEC"))).append("</td>");
|
||||
html.append("<td class='center'>").append(CommonUtils.checkNull(item.get("UNIT_NAME"))).append("</td>");
|
||||
html.append("<td class='center'>").append(CommonUtils.checkNull(item.get("DUE_DATE"))).append("</td>");
|
||||
html.append("<td class='right'>").append(formatNumber(qty)).append("</td>");
|
||||
html.append("<td class='right'>").append(formatNumber(CommonUtils.checkNull(item.get("ORDER_UNIT_PRICE")))).append("</td>");
|
||||
html.append("<td class='right'>").append(formatNumber(CommonUtils.checkNull(item.get("ORDER_SUPPLY_PRICE")))).append("</td>");
|
||||
html.append("<td class='tc'>").append(CommonUtils.checkNull(item.get("UNIT_NAME"))).append("</td>");
|
||||
html.append("<td class='tc'>").append(CommonUtils.checkNull(item.get("DUE_DATE"))).append("</td>");
|
||||
html.append("<td class='tr'>").append(formatNumber(qty)).append("</td>");
|
||||
html.append("<td class='tr'>").append(formatNumber(CommonUtils.checkNull(item.get("ORDER_UNIT_PRICE")))).append("</td>");
|
||||
html.append("<td class='tr'>").append(formatNumber(CommonUtils.checkNull(item.get("ORDER_SUPPLY_PRICE")))).append("</td>");
|
||||
html.append("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
html.append("<tr class='total-row'><td colspan='6' class='center'>합 계</td>");
|
||||
html.append("<td class='right'>").append(formatNumber(totalQty)).append("</td><td></td>");
|
||||
html.append("<td class='right'>").append(formatNumber(supplyPrice)).append("</td></tr>");
|
||||
// 합계
|
||||
html.append("<tr><td colspan='9' style='text-align:center; background-color:#ffffcc; font-weight:bold; letter-spacing:8px;'>합 계</td></tr>");
|
||||
html.append("<tr><td colspan='6' class='tc' style='font-weight:bold;'></td>");
|
||||
html.append("<td class='tr' style='font-weight:bold;'>").append(formatNumber(totalQty)).append("</td><td class='tr'></td>");
|
||||
html.append("<td class='tr' style='font-weight:bold;'>").append(formatNumber(supplyPrice)).append("</td></tr>");
|
||||
html.append("</table>");
|
||||
|
||||
// 비고
|
||||
html.append("<table>");
|
||||
html.append("<tr><td class='vl' rowspan='3' style='letter-spacing:8px; font-size:13px;'>비 고</td>");
|
||||
// 비고 (4컬럼)
|
||||
html.append("<table style='margin-top:-1px; table-layout:fixed;'>");
|
||||
html.append("<colgroup><col style='width:40px;'><col><col style='width:120px;'><col style='width:150px;'></colgroup>");
|
||||
html.append("<tr><td rowspan='3' class='vl' style='letter-spacing:8px; font-size:13px;'>비 고</td>");
|
||||
html.append("<td rowspan='3'></td>");
|
||||
html.append("<th style='width:120px; letter-spacing:2px;'>공 급 가 액 합 계</th><td class='right' style='width:150px;'>").append(formatNumber(supplyPrice)).append("</td></tr>");
|
||||
html.append("<tr><th style='letter-spacing:2px;'>부 가 가 치 세</th><td class='right'>").append(formatNumber(vat)).append("</td></tr>");
|
||||
html.append("<tr><th style='letter-spacing:5px;'>총 계</th><td class='right' style='font-weight:bold;'>").append(formatNumber(totalAmount)).append("</td></tr>");
|
||||
html.append("<td class='lbl' style='letter-spacing:2px;'>공 급 가 액 합 계</td><td class='tr'>").append(formatNumber(supplyPrice)).append("</td></tr>");
|
||||
html.append("<tr><td class='lbl' style='letter-spacing:2px;'>부 가 가 치 세</td><td class='tr'>").append(formatNumber(vat)).append("</td></tr>");
|
||||
html.append("<tr><td class='lbl' style='letter-spacing:5px;'>총 계</td><td class='tr' style='font-weight:bold;'>").append(formatNumber(totalAmount)).append("</td></tr>");
|
||||
html.append("</table>");
|
||||
// 하단 부가세 구분 + 날짜
|
||||
html.append("<div style='display:flex; justify-content:space-between; padding:3px 5px; font-size:11px; border:1px solid #000; border-top:none;'>");
|
||||
html.append("<span>").append(vatNote).append("</span>");
|
||||
html.append("<span>").append(regDatetime).append("</span>");
|
||||
html.append("</div>");
|
||||
html.append("</div>");
|
||||
|
||||
html.append("</body></html>");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user