rosewiper 2023-12-28
후불제 회원 요금결제내역 세금계산서 버튼 처리 추가 - 입금대기 상태의 내역에 대해서 세금계산서 처리 로직 변경
 - 입금대기 상태의 내역에 대해서 세금계산서 처리 로직 변경
@f05d6bf8e79ff3c65fdf7ece19d48d1e1fb6198b
src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
@@ -2130,6 +2130,7 @@
 			, HOTLINE_AGENT_CODE	AS hotlineAgentCode
 			, BLINE_CODE			AS blineCode
 			, AT_SMISHING_YN		AS atSmishingYn
+			, PRE_PAYMENT_YN 		AS prePaymentYn
 		FROM   LETTNGNRLMBER
 		WHERE  MBER_ID = #userId#
 	
src/main/webapp/WEB-INF/jsp/web/pay/PayListAllAjax.jsp
--- src/main/webapp/WEB-INF/jsp/web/pay/PayListAllAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/pay/PayListAllAjax.jsp
@@ -153,16 +153,18 @@
 	var cashRegNo = "";
 	var frm = document.taxForm;
 	var bizOrRegi = $("input:radio[name=bizOrRegi]:checked").val();
+	var taxbillAuto = '${mberManageVO.taxbillAuto}'; 			//자동발행 여부 체크
 	
 	//담당자명이 없으면 세금계산서 발행등록 메뉴로 보냄
 	if(taxMngNm == '') {
 		alert("세금계산서 발행 정보를 입력하는 화면으로 이동합니다.");
-		
 		location.href = "/web/member/pay/BillPub.do";
 	}
 	
 	//최초 레이어 오픈 시 작동
-	//if(bizOrRegi === undefined) {
+	//자동발행 저장하지 않았을 경우만 처리하도록 함 20231228 우영두 수정
+	//자동발행 저장하였을 경우 자동발행 저장된 기업/개인 라디오버튼이 선택 되도록 함.
+	if(taxbillAuto == 'N') {
 		if(taxBizNo != "") {
 			bizOrRegi = "biz";
 			$("input[type=radio][value='biz']").prop("checked",true);
@@ -170,7 +172,7 @@
 			bizOrRegi = "regi";
 			$("input[type=radio][value='regi']").prop("checked",true);
 		}
-	//}
+	}
 	
 	if(bizOrRegi == "biz"){
 		//사업자번호 공란인 경우
@@ -205,6 +207,16 @@
 	frm.rcptType.value = "9";
 	frm.phone.value = "${mberManageVO.taxMngPhoneNum}";
 	frm.email.value = "${mberManageVO.taxMngEmail}";
+	
+	if(bizOrRegi == "biz") {
+		$(".biz").show();
+		$(".regi").hide();
+	}
+	if(bizOrRegi == "regi") {
+		$(".biz").hide();
+		$(".regi").show();
+	}
+	
 }
 
 //현금영수증 value 넣기
@@ -398,7 +410,7 @@
 							※ 간편결제 영수증은 결제하신 서비스를 통해 제공됩니다.	
 						</c:when>
 						<c:otherwise>
-							※ 후불제 고객은 사용금액 결제수단은 계좌이체만 가능합니다. <br /> 
+							※ 후불제 고객의 사용금액 결제수단은 계좌이체만 가능합니다. <br /> 
 							※ 세금계산서 발행 후 매월 15일(공휴일인 경우 다음 영업일) 이전까지 아래 계좌로 입금 부탁드립니다.<br />
 							<p class="accountinfo"><span>-입금은행:</span>우리은행<span>-입금계좌:</span>1005-904-154328<span>-받는사람:</span>주식회사 아이티앤</p>
 						</c:otherwise>
@@ -567,6 +579,52 @@
 										</c:if>
 									</c:when>
 									<c:otherwise>
+										<c:if test="${result.pgStatus eq '0'}">
+											<!-- 후불제 회원 입금대기 상태인 경우 처리 -->
+											<!-- 발행대기 -->
+											<c:if test="${result.confirmYn eq 'N'}">
+												<c:if test="${result.rcptType eq '9'}">
+													<p class="fwRg c_002c9a">세금계산서 발행대기</p>
+												</c:if>
+												<c:if test="${result.rcptType eq '1' || result.rcptType eq '2'}">
+													<p class="fwRg c_002c9a">현금영수증 발행대기</p>
+												</c:if>
+												<c:if test="${result.rcptType eq '5'}">
+													<p class="fwRg c_002c9a">관리자 현금영수증 발행대기</p>
+												</c:if>
+
+												<!-- 의무발생일경우  -->												
+												<c:if test="${result.rcptType eq '3'}">
+													<c:if test="${result.payMethod eq 'BANK' or result.payMethod eq 'VBANK'}">
+														<c:if test="${result.btnChk eq 'Y'}">
+															<button type="button" class="btnType btnType20" data-tooltip="cashReceipt_popup02" onclick="javascript:taxValue('${result.moid}');">세금계산서</button>
+															<button type="button" class="btnType btnType20" data-tooltip="cashReceipt_popup01" onclick="javascript:cashValue('${result.moid}');">현금영수증</button>
+														</c:if>
+
+														<%-- <button type="button" class="btnType btnType20" onclick="fnSimpRecip('<c:out value="${result.tid}"/>','<c:out value="${result.moid}"/>'); return false;">간이영수증</button> --%>
+													</c:if>
+													
+													<!-- 휴대폰결제 -->
+													<c:if test="${result.payMethod eq 'CELLPHONE'}">
+														<!-- 22.12.09 휴대폰결제는 현금영수증 제외 -->
+														<%-- <button type="button" class="btnType btnType20" onclick="fnSimpRecip('<c:out value="${result.tid}"/>','<c:out value="${result.moid}"/>'); return false;">간이영수증</button> --%>
+														휴대폰결제(증빙서류 발급불가)
+													</c:if>
+												</c:if>
+											</c:if>
+											<!-- 발행완료 -->
+											<c:if test="${result.confirmYn eq 'Y'}">
+												<c:if test="${result.rcptType eq '9'}">
+													<p class="fwRg c_002c9a">세금계산서 발행완료</p>
+												</c:if>
+												<c:if test="${result.rcptType eq '1' || result.rcptType eq '2'}">
+													<p class="fwRg c_002c9a">현금영수증 발행완료</p>
+												</c:if>
+												<c:if test="${result.rcptType eq '5'}">
+													<p class="fwRg c_002c9a">관리자 현금영수증 발행완료</p>
+												</c:if>
+											</c:if>
+										</c:if>
 										<c:if test="${result.pgStatus eq '1'}">
 											<!-- 발행전 -->
 											<c:if test="${result.confirmYn eq null || result.confirmYn eq ''}">
@@ -825,8 +883,8 @@
                             	<!-- 선거 후보자정보와 업체정보 둘 다 등록되어있는 경우 : radio 선택하여 영역 보여주기 -->
                             	<th scope="row">발행대상</th>
                             	<td>
-                            		<input type="radio" name="bizOrRegi" value="biz" id="biz" onchange="fncBizOrRegi(this.value); return false;" checked="checked" /><label for="biz">기업</label>
-                            		<input type="radio" name="bizOrRegi" value="regi" id="regi" onchange="fncBizOrRegi(this.value); return false;" /><label for="regi">개인</label>
+                            		<input type="radio" name="bizOrRegi" value="biz" id="biz" onchange="fncBizOrRegi(this.value); return false;" <c:if test="${mberManageVO.taxbillAuto eq 'B'}" >checked="checked" </c:if><label for="biz">기업</label>
+                            		<input type="radio" name="bizOrRegi" value="regi" id="regi" onchange="fncBizOrRegi(this.value); return false;" <c:if test="${mberManageVO.taxbillAuto eq 'C'}" >checked="checked" </c:if> /><label for="regi">개인</label>
                             	</td>
                            	</tr>
                            	<!-- 업체정보 -->
src/main/webapp/WEB-INF/jsp/web/pay/PayUserSWList.jsp
--- src/main/webapp/WEB-INF/jsp/web/pay/PayUserSWList.jsp
+++ src/main/webapp/WEB-INF/jsp/web/pay/PayUserSWList.jsp
@@ -204,86 +204,146 @@
 				<button type="button" class="button info" onclick="infoPop('PayUserList');">사용안내</button>
 			</div>
 			<div class="hisroy_price">
-				<div class="hisroy_price_in">
-					<p>
-						<i></i>충전금액
-					</p>
-					
-					<div class="clearfix">
-						<p>캐시</p>
-						<p>
-							<span>
-								<c:choose>
-									<c:when test="${not empty sumPayMoney}">
-										<fmt:formatNumber value="${sumPayMoney}" pattern="#,###.#"/>
-									</c:when>
-									<c:otherwise>
-										<fmt:formatNumber value="0" pattern="#,###.#"/>
-									</c:otherwise>
-								</c:choose>
-							</span>원
-						</p>
-					</div>
-					<div class="clearfix">
-						<p>포인트</p>
-						<p>
-							<span>
-								<c:choose>
-									<c:when test="${not empty sumPoint}">
-										<fmt:formatNumber value="${sumPoint}" pattern="#,###.#"/>
-									</c:when>
-									<c:otherwise>
-										<fmt:formatNumber value="0" pattern="#,###.#"/>
-									</c:otherwise>
-								</c:choose>
-							</span>원
-						</p>
-					</div>
-				</div>
-				<div class="hisroy_price_in">
-					<p>
-						<i></i>사용금액
-					</p>
-					<c:forEach var="result" items="${usedCashTotList}" varStatus="status">
-						<div class="clearfix">
+				<c:choose>
+					<c:when test="${mberManageVO.prePaymentYn eq 'Y'}">
+						<div class="hisroy_price_in">
 							<p>
-								<c:if test="${result.divFlag eq 'CASH' }">
-									캐시
-								</c:if>
-								<c:if test="${result.divFlag eq 'POINT' }">
-									포인트
-								</c:if>
+								<i></i>충전금액
 							</p>
-							<p>
-								<span>
-									<fmt:formatNumber value="${result.totalPrice}" pattern="#,###.#"/>
-								</span>원
-							</p>
+							
+							<div class="clearfix">
+								<p>캐시</p>
+								<p>
+									<span>
+										<c:choose>
+											<c:when test="${not empty sumPayMoney}">
+												<fmt:formatNumber value="${sumPayMoney}" pattern="#,###.#"/>
+											</c:when>
+											<c:otherwise>
+												<fmt:formatNumber value="0" pattern="#,###.#"/>
+											</c:otherwise>
+										</c:choose>
+									</span>원
+								</p>
+							</div>
+							<div class="clearfix">
+								<p>포인트</p>
+								<p>
+									<span>
+										<c:choose>
+											<c:when test="${not empty sumPoint}">
+												<fmt:formatNumber value="${sumPoint}" pattern="#,###.#"/>
+											</c:when>
+											<c:otherwise>
+												<fmt:formatNumber value="0" pattern="#,###.#"/>
+											</c:otherwise>
+										</c:choose>
+									</span>원
+								</p>
+							</div>
 						</div>
-					</c:forEach>
-				</div>
-				<div class="hisroy_price_in">
-					<p>
-						<i></i>잔액
-					</p>
-					<div class="clearfix">
-						<p>캐시</p>
-						<p>
-							<span>
-								<fmt:formatNumber value="${mberManageVO.userMoney}" pattern="" />
-							</span>원
-						</p>
-					</div>
-					<div class="clearfix">
-						<p>포인트</p>
-						<p>
-							<span>
-								<fmt:formatNumber value="${mberManageVO.userPoint}" pattern="" />
-							</span>원
-						</p>
-					</div>
-				</div>
+						<div class="hisroy_price_in">
+							<p>
+								<i></i>사용금액
+							</p>
+							<c:forEach var="result" items="${usedCashTotList}" varStatus="status">
+								<div class="clearfix">
+									<p>
+										<c:if test="${result.divFlag eq 'CASH' }">
+											캐시
+										</c:if>
+										<c:if test="${result.divFlag eq 'POINT' }">
+											포인트
+										</c:if>
+									</p>
+									<p>
+										<span>
+											<fmt:formatNumber value="${result.totalPrice}" pattern="#,###.#"/>
+										</span>원
+									</p>
+								</div>
+							</c:forEach>
+						</div>
+						<div class="hisroy_price_in">
+							<p>
+								<i></i>잔액
+							</p>
+							<div class="clearfix">
+								<p>캐시</p>
+								<p>
+									<span>
+										<fmt:formatNumber value="${mberManageVO.userMoney}" pattern="" />
+									</span>원
+								</p>
+							</div>
+							<div class="clearfix">
+								<p>포인트</p>
+								<p>
+									<span>
+										<fmt:formatNumber value="${mberManageVO.userPoint}" pattern="" />
+									</span>원
+								</p>
+							</div>
+						</div>
+					</c:when>
+					<c:otherwise>
+						<div class="hisroy_defprice_in">
+							<p><i></i>누적 사용금액</p>
+							<div class="clearfix">
+								<p>캐시</p>
+								<p><span>120</span>원</p>
+							</div>
+							<div class="clearfix">
+								<p>포인트</p>
+								<p><span>120</span>원</p>
+							</div>
+						</div>
+						<div class="hisroy_defprice_in">
+							<p><i></i>누적 납부금액</p>
+							<div class="clearfix">
+								<p>캐시</p>
+								<p><span>120</span>원</p>
+							</div>
+							<div class="clearfix">
+								<p>포인트</p>
+								<p><span>120</span>원</p>
+							</div>
+						</div>
+						<div class="hisroy_defprice_in">
+							<p><i></i>당월 납부 예상금액</p>
+							<div class="clearfix">
+								<p>캐시</p>
+								<p><span>120</span>원</p>
+							</div>
+							<div class="clearfix">
+								<p>포인트</p>
+								<p><span>120</span>원</p>
+							</div>
+						</div>
+                        <div class="hisroy_defprice_in">
+							<p><i></i>잔액 (사용가능금액)</p>
+							<div class="clearfix">
+								<p>캐시</p>
+								<p>
+									<span>
+										<fmt:formatNumber value="${mberManageVO.userMoney}" pattern="" />
+									</span>원
+								</p>
+							</div>
+							<div class="clearfix">
+								<p>포인트</p>
+								<p>
+									<span>
+										<fmt:formatNumber value="${mberManageVO.userPoint}" pattern="" />
+									</span>원
+								</p>
+							</div>
+						</div>
+					</c:otherwise>
+				</c:choose>
 			</div>
+			
+			
 			<div class="history_details">
 				<p class="tType1_title"><img src="/publish/images/content/history_details_title.png" alt=""> 발송내역</p>
 				<div class="details_wrap">
Add a comment
List