prepayments.jsp 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019
  1. <%--
  2. - FileName : prepayments.jsp
  3. - Author(s) : ok
  4. - Date : 2014.08.20
  5. - Copyright : Copyright (c) 2013 www.udapsoft.co.kr, Inc.
  6. - Description: 전자조달 선급금현황 상세(구매)
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8"%>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage"%>
  10. <%@ page import="com.udapsoft.waf.common.ui.*"%>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*"%>
  13. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  14. <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
  15. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
  16. <%@ page import="kr.co.udapsoft.common.code.*" %>
  17. <%@ include file="/jsp/work/taglib.jsp"%>
  18. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  19. <%
  20. ctx.init(request, response);
  21. HandlerStorage storage = ctx.getHandlerStorage();
  22. ValueObject params = storage.getParams();
  23. ValueObject user = storage.getUser();
  24. String event = storage.getEvent();
  25. RowSet perpayReqDivComboList = storage.getRowSet("perpayReqDivComboList"); //신청구분 ComboList Data
  26. ValueObject prePayment = storage.getValueObject("prePayment"); //기본정보, 세금계산서정보, 선급금정보
  27. ValueObject ContInfo = storage.getValueObject("ContInfo"); //분계유형
  28. RowSet warrList = storage.getRowSet("contOutWarr"); //보증정보
  29. ValueObject file_giveup = storage.getValueObject("PREPAYMENTS_GIVEUP");
  30. ValueObject file_taxbill = storage.getValueObject("TAX_BILL");
  31. String check1 = "";
  32. String check2 = "";
  33. String check3 = "";
  34. if("3".equals(prePayment.get("TAX_METHOD_CD"))){
  35. check3 = "checked";
  36. }else if("2".equals(prePayment.get("TAX_METHOD_CD"))){
  37. check2 = "checked";
  38. }else{
  39. check1 = "checked";
  40. }
  41. String taxChargNm = "";
  42. String taxChargHp = "";
  43. String taxChargEmail = "";
  44. taxChargNm = prePayment.get("USER_NAME");
  45. taxChargHp = prePayment.get("HP");
  46. taxChargEmail = prePayment.get("EMAIL");
  47. String digit = (String)prePayment.get("digit");
  48. int intDigit = Integer.parseInt(digit);
  49. String creby = user.get("ACCT_ID");
  50. String updby = user.get("ACCT_ID");
  51. if(!"".equals(prePayment.get("CRE_BY")) && !"".equals(prePayment.get("UPD_BY"))){
  52. creby = prePayment.get("CRE_BY");
  53. updby = prePayment.get("UPD_BY");
  54. }
  55. //베트남 환율정보 0원으로 표기되는 부분 수정(23.07.10)
  56. String CON_CUR_CD = (String)prePayment.get("CON_CUR_CD");
  57. int currency_digit = intDigit;
  58. if(CON_CUR_CD.equals("VND")) currency_digit = 4; //통화가 vnd인 경우 소숫점 4자리까지 표기
  59. %>
  60. <SCRIPT language="JavaScript">
  61. /*예약함수*/
  62. var sheet1;
  63. var sheet1Row;
  64. var sheet1PageNo = 1;
  65. var pageLastRowIndex = 1;
  66. var validationResult = false;
  67. var filterShow = false;
  68. var g_digit = <%= intDigit %>; // 소숫점 이하 자릿수
  69. function _onReady() {
  70. jQuery(document).delegate('#date1','change', function() {
  71. var f = document.form1;
  72. jQuery("#fevent").val("GET_RATE");
  73. //반려가 가능한 상태인지 확인한다.
  74. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "GET_RATE", f, "VALUEOBJECT");
  75. });
  76. //리스트 페이지 이동
  77. jQuery("#btnList").click(function() {
  78. jQuery("#fevent").val("");
  79. if(jQuery("#resultListDiv").val() == "1"){
  80. jQuery("#form1").attr("action", "/payment/purchase/PrepaymentsList.screen");
  81. }else{
  82. jQuery("#form1").attr("action", "/payment/purchase/PrepaymentsResultList.screen");
  83. }
  84. jQuery("#form1").attr("target", "_self");
  85. jQuery("#form1").attr("method", "post");
  86. jQuery("#form1").submit();
  87. });
  88. jQuery("#btnDelete").click(function() {
  89. var f = document.form1;
  90. //필수 입력항목 check
  91. if (jQuery("#prepayId").val() == "") {
  92. alert("삭제되었습니다.");
  93. return;
  94. }
  95. //입력데이터 저장
  96. if (confirm("삭제 하시겠습니까?")) {
  97. jQuery("#fevent").val("DELETE_DATA");
  98. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "DELETE_DATA", f, "SUCCESS");
  99. }
  100. });
  101. jQuery("#btnSave").click(function() {
  102. var f = document.form1;
  103. jQuery("#fevent").val("SAVE_DATA");
  104. //필수 입력항목 check
  105. if (requiredItemsCheck() == false) {
  106. return;
  107. }
  108. //입력데이터 저장
  109. if (confirm("저장 하시겠습니까?")) {
  110. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "SAVE_DATA", f, "SUCCESS");
  111. }
  112. });
  113. jQuery("#btnText").click(function() {
  114. var f = document.form1;
  115. jQuery("#btnAppReqSelect").val("1"); //0:저장처리, 1:선급신청처리
  116. jQuery("#fevent").val("SAVE_DATA");
  117. //필수 입력항목 check
  118. if (requiredItemsCheck() == false) {
  119. jQuery("#btnAppReqSelect").val("0"); //0:저장처리, 1:선급신청처리
  120. return;
  121. }
  122. if (confirm(jQuery("#btnText").text() + " 하시겠습니까?")) {
  123. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "SAVE_DATA", f, "SUCCESS");
  124. }else{
  125. jQuery("#btnAppReqSelect").val("0"); //0:저장처리, 1:선급신청처리
  126. }
  127. });
  128. //반려
  129. jQuery("#btnRejection").click(function() {
  130. var f = document.form1;
  131. jQuery("#fevent").val("CHK_REJECT");
  132. //반려가 가능한 상태인지 확인한다.
  133. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "CHK_REJECT", f, "VALUEOBJECT");
  134. });
  135. //결재
  136. jQuery("#btnApproval").click(function() {
  137. //var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  138. //if(radioCheck != "3"){ //Invoice
  139. //대금 청구 필첨
  140. if(jQuery.trim(jQuery("#p_AttachFile4").text()) == "") {
  141. alert('첨부파일 대금청구가 없습니다.');
  142. return;
  143. }
  144. //}
  145. //통화가KRW가 아니고 분계유형에 증빙종류[기타]이면 invlice고정
  146. var conCurCd = jQuery("#conCurCd").val();
  147. var proof_cd = jQuery("#proof_cd option:selected").val();
  148. if(conCurCd != "KRW"){
  149. var rateEx = jQuery("#rateEx").val();
  150. if(rateEx == 0){
  151. alert('환율이 없습니다.');
  152. return;
  153. }
  154. }
  155. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  156. if (radioCheck == "2") { //순발행
  157. if(jQuery.trim(jQuery("#p_AttachFile2").text()) == "") {
  158. alert("세금계산서 첨부파일이 없습니다.");
  159. return;
  160. }
  161. }
  162. //2017.2.27 외국환거래 확인
  163. if("<%=prePayment.get("CON_CUR_CD")%>" != "KRW" && jQuery("#FOREIGN_CHK").val()=="A" ){
  164. alert("외국환거래 신고대상여부를 확인해 주세요");
  165. return;
  166. }
  167. var f = document.form1;
  168. //jQuery("#btnAppReqSelect").val("2"); //2018.07.09
  169. jQuery("#fevent").val("CHK_APPVAR");
  170. //결재가 가능한 상태인지 확인한다.
  171. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "CHK_APPVAR", f, "VALUEOBJECT");
  172. });
  173. //Invoice결재
  174. jQuery("#btnInvoiceApproval").click(function() {
  175. //var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  176. //if(radioCheck != "3"){ //Invoice
  177. //대금 청구 필첨
  178. if(jQuery.trim(jQuery("#p_AttachFile4").text()) == "") {
  179. alert('첨부파일 대금청구가 없습니다.');
  180. return;
  181. }
  182. //}
  183. //세금계산서 첨부파일 유무Cekch
  184. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  185. if (radioCheck == "2") { //순발행
  186. /* if(jQuery.trim(jQuery("#p_AttachFile2").text()) == "") {
  187. alert("세금계산서 첨부파일이 없습니다.");
  188. return;
  189. } */
  190. }
  191. if(radioCheck == "3"){
  192. if(jQuery.trim(jQuery("#p_AttachFile3").text()) == "") {
  193. alert("Invoice 첨부파일이 없습니다.");
  194. return;
  195. }
  196. }
  197. //2017.2.27 외국환거래 확인
  198. if("<%=prePayment.get("CON_CUR_CD")%>" != "KRW" && jQuery("#FOREIGN_CHK").val()=="A" ){
  199. alert("외국환거래 신고대상여부를 확인해 주세요");
  200. return;
  201. }
  202. var f = document.form1;
  203. jQuery("#btnAppReqSelect").val("2"); //0:저장처리, 1:선급신청처리, 2:Invoice결재
  204. //필수 입력항목 check
  205. if (requiredItemsCheck() == false) {
  206. return;
  207. }
  208. var f = document.form1;
  209. jQuery("#fevent").val("CHK_APPVAR");
  210. //결재가 가능한 상태인지 확인한다.
  211. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "CHK_APPVAR", f, "VALUEOBJECT");
  212. });
  213. jQuery("#btnComRnnc").click(function() {
  214. var f = document.form1;
  215. jQuery("#btnAppReqSelect").val("1"); //0:저장처리, 1:기성신청처리
  216. jQuery("#fevent").val("RNNC_DATA");
  217. //필수 입력항목 check
  218. //입력데이터 저장
  219. if (confirm("포기완료 하시겠습니까?")) {
  220. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "RNNC_DATA", f, "SUCCESS");
  221. }else{
  222. jQuery("#btnAppReqSelect").val("0"); //0:저장처리, 1:선급신청처리
  223. }
  224. });
  225. //2017.02.24 외국환거래신고
  226. $("#btn_foreign").click(function() {//저장
  227. var corpId = "<%=prePayment.get("CON_CORP_ID")%>";
  228. var win_id = "ForeignCheckPop";
  229. var editYN = "N";
  230. //04 결재중, 10선금완료 11포기완료 제외하고 등록가능.
  231. if (jQuery("#statusCd").val() != "04" && jQuery("#statusCd").val() != "10" && jQuery("#statusCd").val() != "11" ){
  232. editYN="Y";
  233. }
  234. var link = "/bid/purchase/ForeignCheckPop.screen";
  235. link += "?pop_win_id="+win_id+"&BID_NO="+$("#subContId").val()+"&BID_DEG="+$("#prepayId").val()+"&VENDOR_CD=" + corpId + "&editYN="+ editYN + "&WHO5=R"
  236. link += "&P_USER=" + "<%=user.get("USER_SABUN")%>";
  237. fLayerPop(win_id, link, 950,600, '','', 'NO');
  238. });
  239. //선급금 사용자 입력 후 처리
  240. jQuery("#reqPrepaySupplyAmt").blur(function() {
  241. var reqPrepaySupplyTamt = jQuery("#reqPrepaySupplyAmt").val();
  242. reqPrepaySupplyTamt = reqPrepaySupplyTamt.replace(/(\,|\:)/g, ""); //신청금액 과세
  243. reqPrepaySupplyTamt = Number(reqPrepaySupplyTamt).toFixed(g_digit);
  244. var subPrepaySupplyTamt = jQuery("#subPrepaySupplyAmt").val();
  245. subPrepaySupplyTamt = subPrepaySupplyTamt.replace(/(\,|\:)/g, ""); //선급금액 과세
  246. if (Number(subPrepaySupplyTamt) < Number(reqPrepaySupplyTamt)) {
  247. if(jQuery("#statusCd").val() != "10"){
  248. alert('선급금보다 신청금액이 큽니다.');
  249. reqPrepaySupplyTamt = subPrepaySupplyTamt;
  250. jQuery("#reqPrepaySupplyAmt").val(subPrepaySupplyTamt);
  251. jQuery("#giveSupplyAmt").val("0");
  252. jQuery('#reqPrepaySupplyAmt').focus();
  253. }
  254. } else {
  255. jQuery("#reqPrepaySupplyAmt").val(Number(reqPrepaySupplyTamt).toFixed(g_digit));
  256. var giveSupplyTamt = subPrepaySupplyTamt - reqPrepaySupplyTamt;
  257. jQuery("#giveSupplyAmt").val(giveSupplyTamt.toFixed(g_digit));
  258. jQuery("#giveSupplyAmt, #reqPrepaySupplyAmt").each(function(index) {
  259. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  260. });
  261. }
  262. //부가세
  263. var reqPrepaySurtaxAmt = (reqPrepaySupplyTamt * 10) / 100;
  264. reqPrepaySurtaxAmt = doFloor(reqPrepaySurtaxAmt, g_digit);
  265. var subPrepaySurtaxAmt = jQuery("#subPrepaySurtaxAmt").val();
  266. subPrepaySurtaxAmt = subPrepaySurtaxAmt.replace(/(\,|\:)/g, ""); //선급금액 부과세
  267. if(Number(subPrepaySurtaxAmt) > 0){
  268. var giveSurtaxAmt = subPrepaySurtaxAmt - reqPrepaySurtaxAmt;
  269. jQuery("#reqPrepaySurtaxAmt").val(reqPrepaySurtaxAmt);
  270. jQuery("#reqPrepaySurtaxAmt").each(function(index) {
  271. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  272. });
  273. jQuery("#giveSurtaxAmt").val(giveSurtaxAmt.toFixed(g_digit));
  274. }else{
  275. jQuery("#reqPrepaySurtaxAmt").val(0);
  276. reqPrepaySurtaxAmt = 0;
  277. }
  278. jQuery("#giveSurtaxAmt").each(function(index) {
  279. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  280. });
  281. //신청금액을 구한다.
  282. var reqPrepayAmt = Number(reqPrepaySupplyTamt) + Number(reqPrepaySurtaxAmt);
  283. var perpayAmt = jQuery("#perpayAmt").val();
  284. perpayAmt = perpayAmt.replace(/(\,|\:)/g, ""); //선급금액
  285. var giveAmt = perpayAmt - reqPrepayAmt;
  286. jQuery("#reqPrepayAmt").val(reqPrepayAmt.toFixed(g_digit));
  287. jQuery("#reqPrepayAmt").each(function(index) {
  288. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  289. });
  290. jQuery("#giveAmt").val(giveAmt.toFixed(g_digit));
  291. jQuery("#giveAmt").each(function(index) {
  292. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  293. });
  294. //요율
  295. var conAmt = jQuery("#conAmt").val();
  296. conAmt = conAmt.replace(/(\,|\:)/g, "");
  297. var conSupplyAmt = jQuery("#conSupplyAmt").val();
  298. conSupplyAmt = conSupplyAmt.replace(/(\,|\:)/g, "");
  299. var giveSupplyAmt = jQuery("#giveSupplyAmt").val();
  300. giveSupplyAmt = giveSupplyAmt.replace(/(\,|\:)/g, "");
  301. var reqPrepayPercent = (reqPrepaySupplyTamt / conSupplyAmt) * 100; //신청금액 요율
  302. var givePercent = (giveSupplyAmt / conSupplyAmt) * 100; //포기금액 요율
  303. jQuery("#reqPrepayPercent").val(reqPrepayPercent.toFixed(1));
  304. jQuery("#givePercent").val(givePercent.toFixed(1));
  305. setSeletReq();
  306. giveDataSet();
  307. });
  308. //2018.07.11 선급금 수정
  309. //perpayAmt = subPrepaySupplyAmt + subPrepaySurtaxAmt
  310. //subPrepaySupplyAmt 수정허용
  311. //subPrepaySurtaxAmt 수정허용
  312. //prepayAmtPercent 계약금액 대비
  313. jQuery("#subPrepaySupplyAmt").blur(function() {
  314. var subPrepaySupplyAmt = jQuery("#subPrepaySupplyAmt").val(); //선급공급액
  315. subPrepaySupplyAmt = subPrepaySupplyAmt.replace(/(\,|\:)/g, "");
  316. var subPrepaySurtaxAmt = (Number(subPrepaySupplyAmt) * 10) / 100; //선급부가세
  317. subPrepaySurtaxAmt = doFloor(subPrepaySurtaxAmt, g_digit);
  318. //2020.04.14 계약금액 부가세 없는 경우 선급금액 부가세 자동계산되지 않도록 수정
  319. var conSurtaxAmt = jQuery("#conSurtaxAmt").val();
  320. conSurtaxAmt = conSurtaxAmt.replace(/(\,|\:)/g, ""); //계약금액 부과세
  321. if(Number(conSurtaxAmt) > 0){
  322. jQuery("#subPrepaySurtaxAmt").val(subPrepaySurtaxAmt);
  323. jQuery("#subPrepaySurtaxAmt").each(function(index) {
  324. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  325. });
  326. }else{
  327. jQuery("#subPrepaySurtaxAmt").val(0);
  328. subPrepaySurtaxAmt = 0;
  329. }
  330. //jQuery("#subPrepaySurtaxAmt").val(subPrepaySurtaxAmt);
  331. //jQuery("#subPrepaySurtaxAmt").each(function(index) {
  332. // jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  333. //});
  334. var perpayAmt = Number(subPrepaySupplyAmt) + Number(subPrepaySurtaxAmt) ;
  335. jQuery("#perpayAmt").val(perpayAmt);
  336. jQuery("#perpayAmt").each(function(index) {
  337. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  338. });
  339. //요율
  340. var conSupplyAmt = jQuery("#conSupplyAmt").val();
  341. conSupplyAmt = conSupplyAmt.replace(/(\,|\:)/g, "");
  342. var prepayAmtPercent = (Number(subPrepaySupplyAmt) / Number(conSupplyAmt)) * 100; //신청금액 요율
  343. jQuery("#prepayAmtPercent").val(prepayAmtPercent.toFixed(1));
  344. });
  345. //2018.07.11 선급부가세 수정
  346. //perpayAmt = subPrepaySupplyAmt + subPrepaySurtaxAmt
  347. //subPrepaySupplyAmt 수정허용
  348. //subPrepaySurtaxAmt 수정허용
  349. //prepayAmtPercent 계약금액 대비
  350. jQuery("#subPrepaySurtaxAmt").blur(function() {
  351. var subPrepaySupplyAmt = jQuery("#subPrepaySupplyAmt").val(); //선급공급액
  352. subPrepaySupplyAmt = subPrepaySupplyAmt.replace(/(\,|\:)/g, "");
  353. var subPrepaySurtaxAmt = jQuery("#subPrepaySurtaxAmt").val(); //선급부가세
  354. subPrepaySurtaxAmt = subPrepaySurtaxAmt.replace(/(\,|\:)/g, "");
  355. var perpayAmt = Number(subPrepaySupplyAmt) + Number(subPrepaySurtaxAmt) ;
  356. jQuery("#perpayAmt").val(perpayAmt);
  357. jQuery("#perpayAmt").each(function(index) {
  358. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  359. });
  360. //요율
  361. var conSupplyAmt = jQuery("#conSupplyAmt").val();
  362. conSupplyAmt = conSupplyAmt.replace(/(\,|\:)/g, "");
  363. var prepayAmtPercent = (Number(subPrepaySupplyAmt) / Number(conSupplyAmt)) * 100; //신청금액 요율
  364. jQuery("#prepayAmtPercent").val(prepayAmtPercent.toFixed(1));
  365. });
  366. pageinit();
  367. }
  368. //페이지 초기처리
  369. function pageinit() {
  370. //신청구분 설정
  371. setSeletReq();
  372. //선급금 포기각서 표시 유무
  373. giveDataSet()
  374. //작성일자(증빙일자)
  375. seTaxDate();
  376. //신청구분 선택불가
  377. appDivSet();
  378. //발행방법에 따른 페이지 셋팅
  379. taxDataSet();
  380. //버튼표시 셋팅
  381. btnCtr();
  382. //상태에 따른 입력항목 readOnly
  383. inputReadOnlyset();
  384. }
  385. function appDivSet() {
  386. jQuery("#perpayReqDiv").attr("disabled", true);
  387. jQuery("#reqPrepaySupplyTamt, #reqPrepaySupplyNamt").blur();
  388. }
  389. function setSeletReq(){
  390. var reqPrepaySupplyTamt = jQuery("#reqPrepaySupplyAmt").val().replace(/(\,|\:)/g, ""); //신청금액 과세
  391. reqPrepaySupplyTamt = Number(reqPrepaySupplyTamt).toFixed(g_digit);
  392. var subPrepaySupplyTamt = jQuery("#subPrepaySupplyAmt").val().replace(/(\,|\:)/g, ""); //선급금액 과세
  393. subPrepaySupplyTamt = Number(subPrepaySupplyTamt).toFixed(g_digit);
  394. //입력한 선급금 과세가 빈값일 경우 0으로 셋팅
  395. if (reqPrepaySupplyTamt == "" || Number(reqPrepaySupplyTamt) == 0) {
  396. reqPrepaySupplyTamt = "0";
  397. jQuery("#reqPrepaySupplyAmt").val("0");
  398. }
  399. if (Number(reqPrepaySupplyTamt) == 0) { //선급포기
  400. jQuery("#perpayReqDiv").val("3");
  401. jQuery("#btnText").text("신청요청");
  402. } else if (Number(reqPrepaySupplyTamt) == Number(subPrepaySupplyTamt)) { //신청
  403. jQuery("#perpayReqDiv").val("1");
  404. jQuery("#btnText").text("신청요청");
  405. } else {
  406. jQuery("#perpayReqDiv").val("2");
  407. jQuery("#btnText").text("신청요청");
  408. }
  409. }
  410. function seTaxDate() {
  411. var newDay = new Date(get_year(), get_month(), "");
  412. var lastDay = newDay.getDate();
  413. var yyyymmdd = get_year() + '-' + get_month() + "-" + lastDay;
  414. if (jQuery('#date1').val() == "") {
  415. jQuery('#date1').val(yyyymmdd);
  416. }
  417. jQuery('#lastDate').val(yyyymmdd);
  418. }
  419. function btnCtr(){
  420. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  421. if(radioCheck == "3"){ //Invoice
  422. if(jQuery("#statusCd").val() == "00" || jQuery("#statusCd").val() == "99" || jQuery("#statusCd").val() == "01" || jQuery("#statusCd").val() == "02" || jQuery("#statusCd").val() == "03" || jQuery("#statusCd").val() == "91" || jQuery("#statusCd").val() == "20"){
  423. jQuery("#spanBtnSave").show();
  424. if(jQuery("#CNT").val() != "1") {
  425. jQuery("#spanBtnDelete").show();
  426. }
  427. jQuery("#spanBtnAppReq").hide();
  428. jQuery("#spanBtnApproval").hide();
  429. jQuery("#spanBtnInvoiceApproval").show();
  430. jQuery("#spanBtnRejection").hide();
  431. jQuery("#spanComRnnc").hide();
  432. jQuery("#spanBtnList").show();
  433. jQuery("#spanTaxSave").hide();
  434. }else {
  435. jQuery("#spanBtnSave").hide();
  436. jQuery("#spanBtnDelete").hide();
  437. jQuery("#spanBtnAppReq").hide();
  438. jQuery("#spanBtnApproval").hide();
  439. jQuery("#spanBtnInvoiceApproval").hide();
  440. jQuery("#spanBtnRejection").hide();
  441. if(jQuery("#statusCd").val() == "21" ){
  442. jQuery("#spanComRnnc").show();
  443. }else{
  444. jQuery("#spanComRnnc").hide();
  445. }
  446. jQuery("#spanBtnList").show();
  447. jQuery("#spanTaxSave").hide();
  448. }
  449. }else{
  450. if(jQuery("#statusCd").val() == "00" || jQuery("#statusCd").val() == ""){ //00:작성상태는 목록, 저장버튼 표시
  451. jQuery("#spanBtnSave").show();
  452. if(jQuery("#CNT").val() != "1") {
  453. jQuery("#spanBtnDelete").show();
  454. }
  455. jQuery("#spanBtnAppReq").hide();
  456. jQuery("#spanBtnApproval").hide();
  457. jQuery("#spanBtnInvoiceApproval").hide();
  458. jQuery("#spanBtnRejection").hide();
  459. jQuery("#spanComRnnc").hide();
  460. jQuery("#spanBtnList").show();
  461. jQuery("#spanGubSave").hide();
  462. jQuery("#spanTaxSave").hide();
  463. }
  464. if(jQuery("#statusCd").val() == "01"){ //01:작성상태는 목록, 저장, 선급신청버튼 표시
  465. jQuery("#spanBtnSave").show();
  466. if(jQuery("#CNT").val() != "1") {
  467. jQuery("#spanBtnDelete").show();
  468. }
  469. jQuery("#spanBtnAppReq").show();
  470. jQuery("#spanBtnApproval").hide();
  471. if(radioCheck == "1"){
  472. jQuery("#spanBtnInvoiceApproval").hide(); //추후 숨김으로
  473. }else{
  474. jQuery("#spanBtnInvoiceApproval").show(); //추후 숨김으로
  475. }
  476. jQuery("#spanBtnRejection").hide();
  477. jQuery("#spanComRnnc").hide();
  478. jQuery("#spanBtnList").show();
  479. jQuery("#spanGubSave").hide();
  480. jQuery("#spanTaxSave").hide();
  481. }
  482. if(jQuery("#statusCd").val() == "02"){ //02:선급신청요청상태는 목록, 저장, 선급신청 버튼 표시
  483. jQuery("#spanBtnSave").show();
  484. if(jQuery("#CNT").val() != "1") {
  485. jQuery("#spanBtnDelete").show();
  486. }
  487. jQuery("#spanBtnAppReq").show();
  488. jQuery("#spanBtnApproval").hide();
  489. if(radioCheck == "1"){
  490. jQuery("#spanBtnInvoiceApproval").hide(); //추후 숨김으로
  491. }else{
  492. jQuery("#spanBtnInvoiceApproval").show(); //추후 숨김으로
  493. }
  494. jQuery("#spanBtnRejection").hide();
  495. jQuery("#spanComRnnc").hide();
  496. jQuery("#spanBtnList").show();
  497. jQuery("#spanGubSave").hide();
  498. jQuery("#spanTaxSave").hide();
  499. }
  500. if(jQuery("#statusCd").val() == "21"){ //21:선급포기요청상태는 목록, 저장, 선급신청 버튼 표시
  501. jQuery("#spanBtnSave").hide();
  502. jQuery("#spanBtnDelete").hide();
  503. jQuery("#spanBtnAppReq").hide();
  504. jQuery("#spanBtnApproval").hide();
  505. jQuery("#spanBtnInvoiceApproval").hide();
  506. jQuery("#spanBtnRejection").show();
  507. jQuery("#spanComRnnc").show();
  508. jQuery("#spanBtnList").show();
  509. jQuery("#spanGubSave").hide();
  510. jQuery("#spanTaxSave").hide();
  511. }
  512. if(jQuery("#statusCd").val() == "03" || jQuery("#statusCd").val() == "20"){ //03:선급신청상태는 목록 버튼 표시
  513. jQuery("#spanBtnSave").hide();
  514. jQuery("#spanBtnDelete").hide();
  515. jQuery("#spanBtnAppReq").hide();
  516. jQuery("#spanBtnApproval").show();
  517. jQuery("#spanBtnInvoiceApproval").hide(); //2018.07.09
  518. jQuery("#spanBtnRejection").show();
  519. jQuery("#spanComRnnc").hide();
  520. jQuery("#spanBtnList").show();
  521. jQuery("#spanGubSave").show();
  522. jQuery("#spanTaxSave").show();
  523. }
  524. if(jQuery("#statusCd").val() == "04"){ //04:결재중상태는 목록 버튼 표시
  525. jQuery("#spanBtnSave").hide();
  526. jQuery("#spanBtnDelete").hide();
  527. jQuery("#spanBtnAppReq").hide();
  528. jQuery("#spanBtnApproval").hide();
  529. jQuery("#spanBtnRejection").hide();
  530. jQuery("#spanComRnnc").hide();
  531. jQuery("#spanBtnList").show();
  532. jQuery("#spanGubSave").hide();
  533. jQuery("#spanTaxSave").hide();
  534. }
  535. if(jQuery("#statusCd").val() == "10"){ //10:선급완료상태는 목록 버튼 표시
  536. jQuery("#spanBtnSave").hide();
  537. jQuery("#spanBtnDelete").hide();
  538. jQuery("#spanBtnAppReq").hide();
  539. jQuery("#spanBtnApproval").hide();
  540. jQuery("#spanBtnInvoiceApproval").hide();
  541. jQuery("#spanBtnRejection").hide();
  542. jQuery("#spanComRnnc").hide();
  543. jQuery("#spanBtnList").show();
  544. jQuery("#spanGubSave").hide();
  545. jQuery("#spanTaxSave").hide();
  546. }
  547. if(jQuery("#statusCd").val() == "11"){ //51:선급포기상태는 목록 버튼 표시
  548. jQuery("#spanBtnSave").hide();
  549. jQuery("#spanBtnDelete").hide();
  550. jQuery("#spanBtnAppReq").hide();
  551. jQuery("#spanBtnApproval").hide();
  552. jQuery("#spanBtnInvoiceApproval").hide();
  553. jQuery("#spanBtnRejection").hide();
  554. jQuery("#spanComRnnc").hide();
  555. jQuery("#spanBtnList").show();
  556. jQuery("#spanGubSave").hide();
  557. jQuery("#spanTaxSave").hide();
  558. }
  559. if(jQuery("#statusCd").val() == "91" || jQuery("#statusCd").val() == "99"){ //91:반려상태는 목록, 저장 버튼 표시
  560. jQuery("#spanBtnSave").show();
  561. if(jQuery("#CNT").val() != "1") {
  562. jQuery("#spanBtnDelete").show();
  563. }
  564. jQuery("#spanBtnAppReq").show();
  565. jQuery("#spanBtnApproval").hide();
  566. jQuery("#spanBtnInvoiceApproval").hide();
  567. jQuery("#spanComRnnc").hide();
  568. jQuery("#spanBtnRejection").hide();
  569. jQuery("#spanBtnList").show();
  570. jQuery("#spanGubSave").hide();
  571. jQuery("#spanTaxSave").hide();
  572. }
  573. }
  574. }
  575. function inputReadOnlyset() {
  576. //분개유형 비활성화
  577. jQuery('#acct_gb').attr('disabled', 'true');
  578. jQuery('#proof_cd').attr('disabled', 'true');
  579. //jQuery('#pay_group').attr('disabled', 'true');2015.11.25 조재윤과장 요청. 비활성화 해제.
  580. if(jQuery("#conCurCd").val() == "KRW"){
  581. jQuery("#chk_3").attr("disabled",true);
  582. }
  583. //03:선급신청, 04:결재중, 10:선급완료, 11:선급포기완료
  584. if (jQuery("#statusCd").val() == "04" || jQuery("#statusCd").val() == "10" || jQuery("#statusCd").val() == "11") { //03:선급신청상태는 목록 버튼 표시
  585. jQuery("#userName").attr("readonly", true);
  586. jQuery("#userName").css({'background-color' : '#F0F0F0'});
  587. jQuery("#userName").css({'border' : '1px solid #bcbcbc'});
  588. jQuery("#hp").attr("readonly", true);
  589. jQuery("#hp").css({'background-color' : '#F0F0F0'});
  590. jQuery("#hp").css({'border' : '1px solid #bcbcbc'});
  591. jQuery("#eMail").attr("readonly", true);
  592. jQuery("#eMail").css({'background-color' : '#F0F0F0'});
  593. jQuery("#eMail").css({'border' : '1px solid #bcbcbc'});
  594. jQuery("#reqPrepaySupplyAmt").attr("readonly", true);
  595. jQuery("#reqPrepaySupplyAmt").css({'background-color' : '#F0F0F0'});
  596. jQuery("#reqPrepaySupplyAmt").css({'border' : '1px solid #bcbcbc'});
  597. }
  598. if(jQuery("#statusCd").val() == "03"){
  599. jQuery("#reqPrepaySupplyAmt").attr("readonly", true);
  600. jQuery("#reqPrepaySupplyAmt").css({'background-color' : '#F0F0F0'});
  601. jQuery("#reqPrepaySupplyAmt").css({'border' : '1px solid #bcbcbc'});
  602. }
  603. }
  604. function taxDataSet() {
  605. //통화가KRW가 아니고 분계유형에 증빙종류[기타]이면 invlice고정
  606. var conCurCd = jQuery("#conCurCd").val();
  607. var proof_cd = jQuery("#proof_cd option:selected").val();
  608. if(conCurCd != "KRW" && proof_cd == "Z99"){
  609. jQuery("#chk_1").attr("disabled",true);
  610. jQuery("#chk_2").attr("disabled",true);
  611. }else if(conCurCd != "KRW" && proof_cd != "Z99"){
  612. jQuery("#chk_3").attr("disabled",true);
  613. }
  614. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  615. if (radioCheck == "1") { //역발행
  616. jQuery("#taxAttachments").hide();
  617. jQuery("#taxTrRow").hide();
  618. jQuery("#invoiceAttachments").hide();
  619. jQuery("#invoiceTrRow").hide();
  620. } else if (radioCheck == "2"){ //순발행
  621. jQuery("#taxAttachments").show();
  622. jQuery("#taxTrRow").show();
  623. jQuery("#invoiceAttachments").hide();
  624. jQuery("#invoiceTrRow").hide();
  625. }else{
  626. jQuery("#taxAttachments").hide();
  627. jQuery("#taxTrRow").hide();
  628. jQuery("#invoiceAttachments").show();
  629. jQuery("#invoiceTrRow").show();
  630. }
  631. btnCtr();
  632. }
  633. function giveDataSet() {
  634. if (jQuery("#perpayReqDiv option:selected").val() == "1") {
  635. jQuery("#giveAttachments").hide();
  636. jQuery("#p_Attach1").show();
  637. } else {
  638. jQuery("#giveAttachments").show();
  639. jQuery("#p_Attach1").hide();
  640. }
  641. }
  642. function inputDataSet() {
  643. jQuery("#perpayReqDiv").attr("disabled", true);
  644. if (jQuery("#perpayReqDiv option:selected").val() == "1") {
  645. jQuery("#giveAmt").val("0"); //선급_포기금액_합계
  646. jQuery("#reqPrepayAmt").attr("readonly", true);
  647. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  648. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  649. jQuery("#reqPrepayAmt").val(jQuery("#perpayAmt").val());
  650. jQuery("#giveSupplyTamt").val("0"); //선급_포기금액_과세
  651. jQuery("#reqPrepaySupplyTamt").attr("readonly", true);
  652. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#dedede'});
  653. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #bcbcbc'});
  654. jQuery("#reqPrepaySupplyTamt").val(jQuery("#subPrepaySupplyTamt").val());
  655. jQuery("#giveSupplyNamt").val("0"); //선급_포기금액_면세
  656. jQuery("#reqPrepaySupplyNamt").attr("readonly", true);
  657. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  658. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  659. jQuery("#reqPrepaySupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  660. jQuery("#giveSurtaxAmt").val("0"); //선급_포기금액_부가세
  661. //jQuery("#reqPrepaySurtaxAmt").attr("readonly", true);
  662. //jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  663. //jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  664. //jQuery("#reqPrepaySurtaxAmt").val(jQuery("#subPrepaySurtaxAmt").val());
  665. jQuery("#givePercent").val("0.0");
  666. var reqPrepayAmt = jQuery("#reqPrepayAmt").val();
  667. reqPrepayAmt = reqPrepayAmt.replace(/(\,|\:)/g, "");
  668. var conAmt = jQuery("#conAmt").val();
  669. conAmt = conAmt.replace(/(\,|\:)/g, "");
  670. var givePercent = (reqPrepayAmt / conAmt) * 100;
  671. jQuery("#reqPrepayPercent").val(givePercent.toFixed(1));
  672. giveDataSet();
  673. warrCtr('S'); //S:보이기, H:숨기기
  674. } else if (jQuery("#perpayReqDiv option:selected").val() == "2") {
  675. jQuery("#reqPrepayAmt").attr("readonly", true);
  676. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  677. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  678. jQuery("#reqPrepaySupplyTamt").attr("readonly", false);
  679. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#ffffff'});
  680. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #595a5a'});
  681. if (jQuery("#conSupplyNamt").val() == "0") {
  682. jQuery("#reqPrepaySupplyNamt").attr("readonly", true);
  683. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  684. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  685. } else {
  686. jQuery("#reqPrepaySupplyNamt").attr("readonly", false);
  687. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#ffffff'});
  688. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #595a5a'});
  689. }
  690. //jQuery("#reqPrepaySurtaxAmt").attr("readonly", true);
  691. //jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  692. //jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  693. jQuery("#reqPrepaySupplyTamt").val(jQuery("#orgReqPrepaySupplyTamt").val());
  694. jQuery("#reqPrepaySupplyNamt").val(jQuery("#orgReqPrepaySupplyNamt").val());
  695. jQuery("#reqPrepaySupplyTamt").blur();
  696. giveDataSet();
  697. warrCtr('S'); //S:보이기, H:숨기기
  698. } else if (jQuery("#perpayReqDiv option:selected").val() == "3") {
  699. jQuery("#reqPrepayAmt").val("0"); //선급_신청금액_합계
  700. jQuery("#reqPrepayAmt").attr("readonly", true);
  701. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  702. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  703. jQuery("#giveAmt").val(jQuery("#perpayAmt").val());
  704. jQuery("#reqPrepaySupplyTamt").val("0"); //선급_신청금액_과세
  705. jQuery("#reqPrepaySupplyTamt").attr("readonly", true);
  706. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#dedede'});
  707. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #bcbcbc'});
  708. jQuery("#giveSupplyTamt").val(jQuery("#subPrepaySupplyTamt").val());
  709. jQuery("#reqPrepaySupplyNamt").val("0"); //선급_신청금액_면세
  710. jQuery("#reqPrepaySupplyNamt").attr("readonly", true);
  711. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  712. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  713. jQuery("#giveSupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  714. jQuery("#reqPrepaySurtaxAmt").val("0"); //선급_신청금액_부가세
  715. //jQuery("#reqPrepaySurtaxAmt").attr("readonly", true);
  716. //jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  717. //jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  718. jQuery("#giveSurtaxAmt").val(jQuery("#subPrepaySurtaxAmt").val());
  719. jQuery("#reqPrepayPercent").val("0.0");
  720. var giveAmt = jQuery("#giveAmt").val();
  721. giveAmt = giveAmt.replace(/(\,|\:)/g, "");
  722. var conAmt = jQuery("#conAmt").val();
  723. conAmt = conAmt.replace(/(\,|\:)/g, "");
  724. var givePercent = (giveAmt / conAmt) * 100;
  725. jQuery("#givePercent").val(givePercent.toFixed(1));
  726. giveDataSet();
  727. //포기일때 보증정보는 필요없으므로 숨김처ㅣ
  728. warrCtr('H'); //S:보이기, H:숨기기
  729. }
  730. }
  731. function warrCtr(gubun) {
  732. if(jQuery("#statusCd").val() == "10" && jQuery("#warrWgno").val() == ""){
  733. jQuery('#warr1').hide();
  734. jQuery('#warr2').hide();
  735. }else{
  736. if (gubun == "H") { //숨김
  737. var warrWamt = jQuery("#warrWamt").val().replace(/(\,|\:)/g, "");
  738. if(warrWamt == "0" || warrWamt == ""){
  739. jQuery('#warr1').slideUp();
  740. jQuery('#warr2').slideUp();
  741. }else{
  742. alert("보증정보가 존재합니다.");
  743. }
  744. } else {
  745. jQuery('#warr1').show("slow");
  746. jQuery('#warr2').show("slow");
  747. }
  748. }
  749. }
  750. function reDisplay() {
  751. jQuery("#fevent").val("");
  752. jQuery("#form1").attr("action", "/payment/purchase/Prepayments.screen");
  753. jQuery("#form1").attr("target", "_self");
  754. jQuery("#form1").attr("method", "post");
  755. jQuery("#form1").submit();
  756. }
  757. //저장 및 선급금 신청시 필수항목 Check
  758. function requiredItemsCheck() {
  759. var date1 = jQuery('#date1').val(); //작성일자(증빙일자)
  760. var userName = jQuery('#userName').val(); //담당자명
  761. var hp = jQuery('#hp').val(); //담당자 핸드폰번호
  762. var eMail = jQuery('#eMail').val(); //담당자 이메일
  763. if (date1 == "") {
  764. alert("입력필수입니다.");
  765. jQuery('#date1').focus();
  766. return false;
  767. }
  768. if (userName == "") {
  769. alert("담당자명은 입력필수입니다.");
  770. jQuery('#userName').focus();
  771. return false;
  772. }
  773. if (hp == "") {
  774. alert("담당자 핸드폰 번호는 입력필수입니다.");
  775. jQuery('#hp').focus();
  776. return false;
  777. } else {
  778. var rgEx = /(01[016789])[-](\d{4}|\d{3})[-]\d{4}$/g;
  779. var strValue = hp;
  780. var chkFlg = rgEx.test(strValue);
  781. if (!chkFlg) {
  782. alert("올바른 휴대폰번호가 아닙니다.");
  783. jQuery('#hp').focus();
  784. return false;
  785. }
  786. }
  787. if (eMail == "") {
  788. alert("담당자 이메일은 입력필수입니다.");
  789. jQuery('#eMail').focus();
  790. return false;
  791. } else {
  792. var regEmail = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
  793. if (!regEmail.test(eMail)) {
  794. alert('올바른 이메일 주소가 아닙니다.');
  795. jQuery('#eMail').focus();
  796. return false;
  797. }
  798. }
  799. //2018.07.12 계약서 선급금액과 상이한 경우 사유작성 필수
  800. if (jQuery("#subPrepaySupplyAmt").val() + " (부가세 별도)" != jQuery("#conPrepayAmt").val() && jQuery("#chgReason").val()=="") {
  801. alert("선급금 변경 사유를 작성하십시요.");
  802. jQuery('#chgReason').focus();
  803. return false;
  804. }
  805. if (jQuery("#btnAppReqSelect").val() == "1") { //선급금신청요청시에는 해당하는 첨부파일이 모두 등록되어있어야함.
  806. //01:작성중, 02:선급금 신청요청, 21:선금금 포기요청, 03:선급금 신청, 04:결재중, 10:선금완료, 11:포기완료, 91:반려
  807. if (jQuery("#perpayReqDiv").val() == "1") { //선급신청
  808. jQuery("#selectStatusCd").val("02");
  809. //선급금 포기각서 파일첨부 존재를 check한다.
  810. if(jQuery.trim(jQuery("#p_AttachFile1").text()) != "") {
  811. alert("선급금 포기각서 첨부가 존재합니다.");
  812. return false;
  813. }
  814. } else if (jQuery("#perpayReqDiv").val() == "2") { //부분신청
  815. jQuery("#selectStatusCd").val("02");
  816. /* if(jQuery("#warrWgno").val() != ""){
  817. var warrWamtValue = jQuery("#warrWamt").val().replace(/(\,|\:)/g, "");
  818. var reqPrepayAmtValue = jQuery("#reqPrepayAmt").val().replace(/(\,|\:)/g, "");
  819. if(reqPrepayAmtValue != warrWamtValue){
  820. alert("선급금신청금액과 보증금액이 다릅니다.");
  821. return false;
  822. }
  823. } */
  824. } else if (jQuery("#perpayReqDiv").val() == "3") { //포기신청
  825. jQuery("#selectStatusCd").val("02");
  826. /* if(jQuery("#warrWgno").val() != ""){
  827. alert("보증정보가 존재합니다.");
  828. return false;
  829. } */
  830. } else {
  831. alert("신청구분을 선택하세요");
  832. return;
  833. }
  834. }
  835. }
  836. function doResult(resultObj) {
  837. try {
  838. if (resultObj.getRequestEvent() == "SAVE_DATA" || resultObj.getRequestEvent() == "SAVE_SEGUM" || resultObj.getRequestEvent() == "SAVE_GUA" ) {
  839. if (resultObj.getSuccess()) {
  840. document.form1.isSubmit = false;
  841. if (jQuery("#btnAppReqSelect").val() == "0") {
  842. alert("저장되었습니다.");
  843. reSearch();
  844. } else if (jQuery("#btnAppReqSelect").val() == "1"){
  845. jQuery("#btnAppReqSelect").val("0");
  846. btnAppReqProcess();
  847. } else {
  848. jQuery("#btnAppReqSelect").val("0");
  849. runApproval();
  850. }
  851. } else {
  852. dlgErrorMsg(resultObj);
  853. }
  854. document.form1.isSubmit = false;
  855. }
  856. if (resultObj.getRequestEvent() == "DELETE_DATA") {
  857. if (resultObj.getSuccess()) {
  858. alert("삭제되었습니다.");
  859. jQuery("#btnList").click();
  860. } else {
  861. dlgErrorMsg(resultObj);
  862. }
  863. document.form1.isSubmit = false;
  864. }
  865. if (resultObj.getRequestEvent() == "REQ_DATA") {
  866. if (resultObj.getSuccess()) {
  867. alert("신청요청하였습니다.");
  868. jQuery("#btnList").click();
  869. } else {
  870. dlgErrorMsg(resultObj);
  871. }
  872. document.form1.isSubmit = false;
  873. }
  874. if( resultObj.getRequestEvent() == "CHK_REJECT" ) {
  875. var vo = resultObj.getValueObject();
  876. var check = vo.get('checkFlag');
  877. if(check == 0){ //가능
  878. document.form1.isSubmit = false;
  879. runRejection();
  880. }else{
  881. document.form1.isSubmit = false;
  882. alert("이미 결제중입니다.");
  883. }
  884. }
  885. if( resultObj.getRequestEvent() == "CHK_APPVAR" ) {
  886. var vo = resultObj.getValueObject();
  887. var check = vo.get('checkFlag');
  888. if(check == 0){ //가능
  889. document.form1.isSubmit = false;
  890. if (jQuery("#btnAppReqSelect").val() == "2") { //Invoice결재
  891. runInvoice();
  892. } else {
  893. jQuery("#btnAppReqSelect").val("0");
  894. runApproval();
  895. }
  896. }else{
  897. document.form1.isSubmit = false;
  898. alert("이미 결제중입니다.");
  899. }
  900. }
  901. if( resultObj.getRequestEvent() == "GET_RATE" ) {
  902. var vo = resultObj.getValueObject();
  903. document.form1.isSubmit = false;
  904. var rate = vo.get('rate');
  905. var rateAmt = vo.get('rateAmt');
  906. var rateVamt = vo.get('rateVamt');
  907. jQuery("#rateEx").val(rate);
  908. jQuery("#rateAmt").val(rateAmt);
  909. jQuery("#rateVamt").val(rateVamt);
  910. jQuery("#rateEx, #rateAmt, #rateVamt").each(function(index) {
  911. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  912. });
  913. }
  914. if (resultObj.getRequestEvent() == "GET_DATA") {
  915. if (resultObj.getSuccess()) {
  916. var subContId = resultObj.getValueObject().get("SUB_CONT_ID");
  917. if (subContId != "") {
  918. jQuery("#subContId").val(subContId);
  919. var causeCode = resultObj.getValueObject().get("CAUSECODE");
  920. jQuery("#causeCode").val("당초");
  921. var guarOnoffYn = resultObj.getValueObject().get("GUAR_ONOFF_YN");
  922. jQuery("#guarOnoffYn").val(guarOnoffYn);
  923. var warrGoffice = resultObj.getValueObject().get("WARR_GOFFICE");
  924. jQuery("#warrGoffice").val(warrGoffice);
  925. var guarStatus = resultObj.getValueObject().get("GUAR_STATUS");
  926. jQuery("#guarStatus").val(guarStatus);
  927. var paperDate = resultObj.getValueObject().get("PAPERDATE");
  928. jQuery("#paperDate").val(paperDate);
  929. var warrWgno = resultObj.getValueObject().get("WARR_WGNO");
  930. jQuery("#warrWgno").val(warrWgno);
  931. var warrWamt = resultObj.getValueObject().get("WARR_WAMT");
  932. jQuery("#warrWamt").val(warrWamt);
  933. jQuery("#warrWamt").each(function(index) {
  934. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  935. });
  936. var warrSdateEdate = resultObj.getValueObject().get("WARR_SDATE_EDATE");
  937. jQuery("#warrSdateEdate").val(warrSdateEdate);
  938. }
  939. } else {
  940. dlgErrorMsg(resultObj);
  941. }
  942. document.form1.isSubmit = false;
  943. }
  944. if( resultObj.getRequestEvent() == "RNNC_DATA" ) {
  945. if( resultObj.getSuccess() ) {
  946. alert("포기완료 되었습니다.");
  947. jQuery("#btnList").click();
  948. }else{
  949. dlgErrorMsg(resultObj);
  950. }
  951. document.form1.isSubmit = false;
  952. }
  953. } catch (errorObject) {
  954. showErrorDlg("doResult()", errorObject);
  955. }
  956. }
  957. //저장 후 선급신청 처리
  958. function btnAppReqProcess() {
  959. var f = document.form1;
  960. jQuery("#fevent").val("REQ_DATA");
  961. submitXmlRequest("/payment/purchase/Prepayments_form.screen","REQ_DATA", f, "SUCCESS");
  962. }
  963. //상세화면 재조회
  964. function reSearch() {
  965. jQuery("#fevent").val("");
  966. jQuery("#form1").attr("action", "/payment/purchase/Prepayments.screen");
  967. jQuery("#form1").attr("target", "_self");
  968. jQuery("#form1").attr("method", "post");
  969. jQuery("#form1").submit();
  970. }
  971. function doKeyPress() {
  972. if (event.keyCode == 13) {
  973. doSearch(document.all.sheet1)
  974. }
  975. }
  976. function calendar(thisDayObj) {
  977. dlgCalendar(thisDayObj);
  978. }
  979. //첨부파일
  980. function doAttachFile(obj, No) {
  981. if (obj.value == '') {
  982. //alert("After you have saved, you can attach a file.");
  983. alert("데이터를 저장 후, 파일을 첨부할 수가 있습니다.");
  984. } else if (obj.value != '') {
  985. var upLoadFlg = "Y";
  986. if (jQuery("#statusCd").val() == "04" || jQuery("#statusCd").val() == "10" || jQuery("#statusCd").val() == "11") { //선급금 상태값이 03:선급금신청, 04:결재중, 10:선급완료, 11:폰기완료면 다운만
  987. upLoadFlg = "N";
  988. }
  989. if('<%= user.get("ACCT_TYPE_CODE")%>' == "ADMIN"){
  990. upLoadFlg = "Y";
  991. }
  992. if (No == 1) {
  993. viewFileListNew('PREPAYMENTS_GIVEUP', obj.value, document.getElementById("p_AttachFile1"), upLoadFlg, "prepay/purchase/"+obj.value);
  994. } else if (No == 2) {
  995. viewFileListNew('TAX_BILL', obj.value, document.getElementById("p_AttachFile2"), upLoadFlg, "prepay/purchase/"+obj.value);
  996. } else if (No == 3) {
  997. viewFileListNew('PREPAYMENTS_INVOICE', obj.value, document.getElementById("p_AttachFile3"), upLoadFlg, "prepay/purchase/"+obj.value);
  998. } else {
  999. viewFileListNew('PREPAYMENTS_BILLING', obj.value, document.getElementById("p_AttachFile4"), upLoadFlg, "prepay/purchase/"+obj.value);
  1000. }
  1001. }
  1002. }
  1003. //보증정보 조회
  1004. function callback_getContWarr() {
  1005. var f = document.form1;
  1006. jQuery("#fevent").val("GET_DATA");
  1007. submitXmlRequest("/portal/payment/AdvencePayRequest_form.screen","GET_DATA", f, "VALUEOBJECT");
  1008. }
  1009. //보증정보팝업 호출
  1010. function popContWarr(wG, wSeq, wCauseCd) {
  1011. if (jQuery("#prepayId").val() == "") {
  1012. alert("데이터를 저장 후, 보증정보를 입력할 수가 있습니다.");
  1013. return;
  1014. }
  1015. var win_id = "contPurWarrPopup";
  1016. var param = "";
  1017. var param = "?purContModId=" + jQuery("#subContModId").val();
  1018. var param = param + "&warrGubun=" + wG;
  1019. var param = param + "&warrSeq=" + wSeq;
  1020. var param = param + "&causeCode=" + wCauseCd;
  1021. var param = param + "&viewDiv=PREPAY";
  1022. var param = param + "&prepayId=" + jQuery("#prepayId").val();
  1023. var param = param + "&pop_win_id=" + win_id;
  1024. var param = param + "&sModule=EB";
  1025. var url = "/portal/guar/contPurWarrPopup.screen"+param;
  1026. fLayerPop(win_id, url, 560,380, '','', 'NO');
  1027. }
  1028. //보증정보팝업 종료후 액션
  1029. function popContWarrClose(returnValue){
  1030. if(returnValue == null){
  1031. fLayerPopClose('contPurWarrPopup');
  1032. }else{
  1033. fLayerPopClose('contPurWarrPopup');
  1034. reDisplay();
  1035. }
  1036. }
  1037. function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
  1038. var editFile = "";
  1039. if(obj==''){
  1040. alert("After you have saved, you can attach a file.");
  1041. }
  1042. else if(obj != ''){
  1043. if(fObj.guarStatus.value != "02"){editFile="N";}else{editFile="Y";}
  1044. if('<%= user.get("ACCT_TYPE_CODE")%>' == "ADMIN"){
  1045. editFile = "Y";
  1046. }
  1047. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "contPurWarrPopup");
  1048. }
  1049. }
  1050. //결재
  1051. function dlgSignForm( sign_class_cd, uri ) {
  1052. var f = document.form1;
  1053. var sheet1 = document.all.sheet1;
  1054. var tmpslip_prepayId = f.prepayId.value;
  1055. var tmpslip_subContModId = f.subContModId.value;
  1056. var url = "/slipSign/preSign_form.screen";
  1057. url += "?sign_class_cd=" + sign_class_cd;
  1058. url += "&uri=" + uri;
  1059. url += "&tmpslip_prepayId=" + tmpslip_prepayId;
  1060. url += "&tmpslip_subContModId=" + tmpslip_subContModId;
  1061. url += "&slip_dept=" + f.dept_cd.value;
  1062. url += "&slip_dt=" + f.date1.value;
  1063. url += "&acct_type=1";
  1064. if(confirm("결재 하시겠습니까?") ){
  1065. //f.slip_dt.value = '';
  1066. //f.sign_chk.value = "Y";
  1067. //openWindowCenter(url, "sign_form", 200, 100, "");
  1068. window.open(url, "_blank","width=200,height=100,SCROLLBARS=no");
  1069. }else{
  1070. return;
  1071. }
  1072. }
  1073. function runApproval(){
  1074. document.form1.isSubmit = false;
  1075. var f = document.form1;
  1076. var tmpslip_prepayId = f.prepayId.value;
  1077. var tmpslip_subContModId = f.subContModId.value;
  1078. dlgSignForm('ebid_pprpyD', '/payment/purchase/PreRequestSign.screen?tmpslip_prepayId='+tmpslip_prepayId+'^tmpslip_subContModId='+tmpslip_subContModId+'^acct_type=1^sign_type=1' );
  1079. }
  1080. function runRejection(){
  1081. var win_id = "Rejection";
  1082. var link = "/payment/outside/RejectionPopup.screen";
  1083. link += "?pop_win_id="+win_id;
  1084. link += "&prepayId=" + jQuery("#prepayId").val();
  1085. link += "&pageDiv=3"
  1086. fLayerPop(win_id, link, 620, 220, '', '', 'NO');
  1087. }
  1088. //
  1089. function runInvoice(){
  1090. var f = document.form1;
  1091. jQuery("#btnAppReqSelect").val("2"); //0:저장처리, 1:선급신청처리
  1092. jQuery("#fevent").val("SAVE_DATA");
  1093. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "SAVE_DATA", f, "SUCCESS");
  1094. }
  1095. function RejectionPopupClose(){
  1096. //alert();
  1097. setTimeout(function(){fLayerPopClose('Rejection');},100);
  1098. reDisplay();
  1099. }
  1100. /**
  1101. * 첨부파일 예약 함수
  1102. */
  1103. function fileDown(file_id){
  1104. var url="/common/file/FileDownloadServlet";
  1105. url += "?file_id=" + file_id;
  1106. window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new")
  1107. }
  1108. function gubSave(div){
  1109. if(div == '0'){ //분계유형저장
  1110. var pKey = jQuery("#subContModId").val();
  1111. var f = document.form1;
  1112. jQuery("#pKey").val(pKey);
  1113. //분계유형 저장
  1114. if (confirm("분계유형을 저장 하시겠습니까?")) {
  1115. jQuery("#fevent").val("SAVE_GUA");
  1116. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "SAVE_GUA", f, "SUCCESS");
  1117. }
  1118. }else{
  1119. var pKey = jQuery("#prepayId").val();
  1120. var f = document.form1;
  1121. jQuery("#pKey").val(pKey);
  1122. //세금계산서정보 저장
  1123. if (confirm("세금계산서정보을 저장 하시겠습니까?")) {
  1124. jQuery("#btnAppReqSelect").val("2");
  1125. jQuery("#fevent").val("SAVE_SEGUM");
  1126. submitXmlRequest("/payment/purchase/Prepayments_form.screen", "SAVE_SEGUM", f, "SUCCESS");
  1127. }
  1128. }
  1129. }
  1130. //2017.2.27 외국환거래신고
  1131. function PopClose(win_id,result){
  1132. if( result != null ){
  1133. if(result[0] == 2){ //2017.2.27 외국환거래신고
  1134. setTimeout(function(){ fLayerPopClose(win_id);},100);
  1135. if(result[1].length> 0)alert(result[1]);
  1136. $("#FOREIGN_CHK").val(result[2]);
  1137. $("#FOREIGN_NM").val(result[3]);
  1138. }
  1139. }else{
  1140. setTimeout(function(){ fLayerPopClose(win_id); },100);
  1141. }
  1142. }
  1143. </SCRIPT>
  1144. <modular:search id="form1">
  1145. <modular:key id="fevent" />
  1146. </modular:search>
  1147. <form id="form1" name="form1" method="post" modular:type="search">
  1148. <INPUT type="hidden" name="fevent" id="fevent" value="">
  1149. <INPUT type="hidden" name="selectSubContModId" id="selectSubContModId" value="<%=params.get("selectSubContModId") %>">
  1150. <INPUT type="hidden" name="subContModId" id="subContModId" value="<%=prePayment.get("SUB_CONT_MOD_ID") %>">
  1151. <INPUT type="hidden" name="prepayId" id="prepayId" value="<%=prePayment.get("PREPAY_ID") %>">
  1152. <INPUT type="hidden" name="corpId" id="corpId" value="<%=prePayment.get("CON_CORP_ID") %>">
  1153. <INPUT type="hidden" name="orgReqPrepaySupplyTamt" id="orgReqPrepaySupplyTamt" value="<%=prePayment.get("REQ_PREPAY_SUPPLY_TAMT") %>">
  1154. <INPUT type="hidden" name="orgReqPrepaySupplyNamt" id="orgReqPrepaySupplyNamt" value="<%=prePayment.get("REQ_PREPAY_SUPPLY_NAMT") %>">
  1155. <INPUT type="hidden" name="statusCd" id="statusCd" value="<%=prePayment.get("STATUS_CD") %>">
  1156. <INPUT type="hidden" name="subContId" id="subContId" value="<%=prePayment.get("SUB_CONT_ID") %>">
  1157. <INPUT type="hidden" name="btnAppReqSelect" id="btnAppReqSelect" value="0">
  1158. <INPUT type="hidden" name="lastDate" id="lastDate" value="">
  1159. <INPUT type='hidden' name="FOREIGN_CHK" value="<%=prePayment.get("FOREIGN_CHK")%>">
  1160. <!-- 기성신청상태구분 -->
  1161. <INPUT type="hidden" name="selectStatusCd" id="selectStatusCd" value="">
  1162. <!-- 기성신청상태 -->
  1163. <INPUT type='hidden' id="signeddata" name="signeddata" value="">
  1164. <INPUT type="hidden" name="creBy" id="creBy" value="<%=creby %>">
  1165. <INPUT type="hidden" name="updBy" id="updBy" value="<%=updby %>">
  1166. <!-- 리스트 페이지 검색 조건 -->
  1167. <INPUT type='hidden' id="searchBuildName" name="searchBuildName" value="<%=params.get("searchBuildName") %>"> <!-- 계약명 -->
  1168. <INPUT type='hidden' id="searchStatusCd" name="searchStatusCd" value="<%=params.get("searchStatusCd") %>"> <!-- 상태값 -->
  1169. <INPUT type='hidden' id="searchDeptCd" name="searchDeptCd" value="<%=params.get("searchDeptCd") %>">
  1170. <INPUT type='hidden' id="searchDeptNm" name="searchDeptNm" value="<%=params.get("searchDeptNm") %>">
  1171. <INPUT type='hidden' id="searchSignDt_from" name="searchSignDt_from" value="<%=params.get("searchSignDt_from") %>">
  1172. <INPUT type='hidden' id="searchSignDt_to" name="searchSignDt_to" value="<%=params.get("searchSignDt_to") %>">
  1173. <INPUT type='hidden' id="resultListDiv" name="resultListDiv" value="<%=params.get("resultListDiv") %>">
  1174. <INPUT type='hidden' id="pKey" name="pKey" value="">
  1175. <INPUT type='hidden' id="dept_cd" name="dept_cd" value="<%=prePayment.get("dept_cd") %>"> <!-- 현장코드 -->
  1176. <INPUT type='hidden' id="resUserName" name="resUserName" value="<%=prePayment.get("RES_USER_NAME") %>"> <!-- 계약담당자 -->
  1177. <INPUT type='hidden' id="resHp" name="resHp" value="<%=prePayment.get("RES_HP") %>"> <!-- 계약담당자 핸드폰번호 -->
  1178. <INPUT type='hidden' id="resEmail" name="resEmail" value="<%=prePayment.get("RES_EMAIL") %>"> <!-- 계약담당자 이메일 -->
  1179. <INPUT type='hidden' id="resDivision" name="resDivision" value="<%=prePayment.get("RES_DIVISION") %>">
  1180. <INPUT type='hidden' id="conDocNo" name="conDocNo" value="<%=prePayment.get("CON_DOC_NO") %>"> <!-- 발주계약번호 -->
  1181. <INPUT type="hidden" name="bugase" id="bugase" value="<%=prePayment.get("CHG_CODE10") %>">
  1182. <INPUT type="hidden" name="CNT" id="CNT" value="<%=prePayment.get("CNT") %>">
  1183. <INPUT type="hidden" name="SUPP_DIRECT_YN" id="SUPP_DIRECT_YN" value="N"> <!-- 하도급직불여부 제거 -->
  1184. <!-- 제목 및 버튼 -->
  1185. <table width="100%">
  1186. <colgroup>
  1187. <col width="500" />
  1188. <col width="*" />
  1189. </colgroup>
  1190. <tr>
  1191. <th>
  1192. <div align="left" id="title">
  1193. <ul>
  1194. <li>구매_선급금현황 상세(<span style="font-size: 11px"><%=prePayment.get("STATUS_NM")%></span>)</li>
  1195. </ul>
  1196. </div>
  1197. </th>
  1198. <td align="right">
  1199. <span id="spanBtnSave" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnSave">저장</a></span>
  1200. <span id="spanBtnDelete" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnDelete">삭제</a></span>
  1201. <span id="spanBtnAppReq" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnText">신청요청</a></span>
  1202. <span id="spanComRnnc" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnComRnnc">선급금 포기완료</a></span>
  1203. <span id="spanBtnApproval" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnApproval">결재</a></span>
  1204. <span id="spanBtnInvoiceApproval" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnInvoiceApproval">결재</a></span>
  1205. <span id="spanBtnRejection" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnRejection">반려</a></span>
  1206. <span id="spanBtnList" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnList">목록</a></span>
  1207. </td>
  1208. </tr>
  1209. </table>
  1210. <%
  1211. if(!prePayment.get("RTN_REASON").equals("")){
  1212. %>
  1213. <div class="application-info magT10">
  1214. <div class="application-sub-title">
  1215. <span class="title">반려정보</span>
  1216. </div>
  1217. <div class="application-location"></div>
  1218. </div>
  1219. <TABLE class="form-table">
  1220. <colgroup>
  1221. <col width="13%" />
  1222. <col width="*" />
  1223. </colgroup>
  1224. <TR height="25">
  1225. <th style="text-align: left;">반려일</th>
  1226. <TD><%=prePayment.get("RTN_DATE")%></TD>
  1227. </TR>
  1228. <TR>
  1229. <th style="text-align: left;">반려사유</th>
  1230. <TD><%=prePayment.get("RTN_REASON")%></TD>
  1231. </TR>
  1232. </TABLE>
  1233. <%
  1234. }else if(!prePayment.get("TAX_RTN_REASON").equals("")){
  1235. %>
  1236. <div class="application-info magT10">
  1237. <div class="application-sub-title">
  1238. <span class="title">반려정보</span>
  1239. </div>
  1240. <div class="application-location"></div>
  1241. </div>
  1242. <TABLE class="form-table">
  1243. <colgroup>
  1244. <col width="13%" />
  1245. <col width="*" />
  1246. </colgroup>
  1247. <TR height="25">
  1248. <th style="text-align: left;">반려일</th>
  1249. <TD><%=prePayment.get("TAX_RTN_DATE")%></TD>
  1250. </TR>
  1251. <TR>
  1252. <th style="text-align: left;">반려사유</th>
  1253. <TD><%=prePayment.get("TAX_RTN_REASON")%></TD>
  1254. </TR>
  1255. </TABLE>
  1256. <%
  1257. }
  1258. %>
  1259. <div class="application-info magT10">
  1260. <div class="application-sub-title">
  1261. <span class="title">기본정보</span>
  1262. </div>
  1263. <div class="application-location"></div>
  1264. </div>
  1265. <TABLE class="form-table">
  1266. <colgroup>
  1267. <col width="13%" />
  1268. <col width="20%" />
  1269. <col width="13%" />
  1270. <col width="20%" />
  1271. <col width="13%" />
  1272. <col width="*" />
  1273. </colgroup>
  1274. <TR height="25">
  1275. <th style="text-align: left;">현장명</th>
  1276. <TD><%= InputText.get("deptName", prePayment.get("DEPT_NAME"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1277. <th style="text-align: left;">계약명</th>
  1278. <TD><%= InputText.get("buildName", prePayment.get("BUILD_NAME"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1279. <th style="text-align: left;">통화</th>
  1280. <TD><%= InputText.get("conCurCd", prePayment.get("CON_CUR_CD"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1281. </TR>
  1282. <TR>
  1283. <th style="text-align: left;">사업자번호</th>
  1284. <TD><%= InputText.get("vendCd", prePayment.get("CORP_REG_NO"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1285. <th style="text-align: left;">계약업체명</th>
  1286. <TD><%= InputText.get("memberName", prePayment.get("CORP_KOR"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1287. <th style="text-align: left;">대표이사</th>
  1288. <TD><%= InputText.get("bossName", prePayment.get("BOSS_NAME"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1289. </TR>
  1290. <TR>
  1291. <th style="text-align: left;">공사기간</th>
  1292. <TD><%= InputText.get("startEndWorkDate", prePayment.get("START_END_WORK_DATE"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1293. <th style="text-align: left;">계약금액</th>
  1294. <TD><%= InputText.get("conConAmt", Formatter2.currency(prePayment.get("CON_SUPPLY_AMT"), intDigit)+" (부가세 별도)", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1295. <th style="text-align: left;">선급금액</th><!--2018.07.11 PREPAY_SUPPLY_AMT -->
  1296. <TD><%= InputText.get("conPrepayAmt", Formatter2.currency(prePayment.get("ORG_SUPPLY_AMT"), intDigit)+" (부가세 별도)", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1297. </TR>
  1298. <TR>
  1299. <th style="text-align: left;">외국환거래 신고대상</th>
  1300. <TD>
  1301. <%if (prePayment.get("CON_CUR_CD").equals("KRW")) { %>
  1302. 비대상
  1303. <%}else{ %>
  1304. <%= InputText.get("FOREIGN_NM", prePayment.get("FOREIGN_NM"), 10, 10, "readOnly") %>
  1305. <span class="btnSearch center" id="btn_foreign"><a href="javascript:void(0);">검토</a></span>
  1306. <%} %></TD>
  1307. <th style="text-align: left;">선급금액 변경사유</th>
  1308. <TD colspan = "3"><%= InputText.get("chgReason", prePayment.get("CHG_REASON"), 99, 1000, "string, left, perSize ", "string") %>
  1309. </TD>
  1310. </TR>
  1311. </TABLE>
  1312. <%
  1313. // PayGroup_PaymentTerms Mapping Object 구하기
  1314. ContCodeManager payGroupMappingUtil = new ContCodeManager();
  1315. storage.addObject("category", payGroupMappingUtil.getJSONNotation());
  1316. String category = (String)storage.getObject("category");
  1317. //System.out.println(category);
  1318. %>
  1319. <script>
  1320. var gCategoryJSON = null;
  1321. var rawData = <%= category%>; // 서버로부터 JSON 표현식 받기
  1322. gCategoryJSON = eval( rawData ); // JSON객체를 만들어 global 변수에 저장
  1323. function changePaymentTerms(selObj) {
  1324. var ct = getCategory(selObj.value); // JSON 객체에서 해당하는 PAYMENT TERMS 데이타 꺼내기
  1325. if (!ct) {
  1326. dlgAlert('오류가 발생하였습니다.<br>전산실로 연락주세요.');
  1327. return false;
  1328. }
  1329. injectSelect(document.getElementById("payment_terms_id"), ct); // PAYMENT TERMS Select Box 채우기
  1330. jQuery('#payment_terms_id').attr('disabled', 'true');
  1331. }
  1332. // JSON 객체에서 해당하는 PAYMENT TERMS 데이타 꺼내기
  1333. function getCategory(payGroup) {
  1334. return gCategoryJSON.paymentTerms[payGroup];
  1335. }
  1336. //직군 데이타를 Select Box에 주입
  1337. function injectSelect(elSel, rows) {
  1338. elSel.length = 0; // clear
  1339. for (var i=0; i<rows.length; i++) {
  1340. var row = rows[i];
  1341. var elOptNew = document.createElement('option');
  1342. elOptNew.value = row.CODE; // 코드
  1343. elOptNew.text = row.NAME; // 명칭
  1344. try {
  1345. elSel.add(elOptNew, null); // standards compliant; doesn't work in IE
  1346. } catch(ex) {
  1347. elSel.add(elOptNew); // IE only
  1348. }
  1349. if(jQuery("#payTerms").val() == row.CODE){
  1350. elSel.options[i].selected = true;
  1351. }
  1352. }
  1353. }
  1354. /**
  1355. * 집행내역코드 검색(공무)
  1356. */
  1357. function popSearchPayItem()
  1358. {
  1359. var win_id = "_searchPayItemPopup";
  1360. var link = "/cont/outside/payItemCodePopup.screen";
  1361. link += "?pop_win_id="+win_id;
  1362. link += "&gb=SUB";
  1363. link += "&req=0";
  1364. link += "&site=" + document.form1.dept_cd.value;
  1365. fLayerPop(win_id, link, 600,400, '', '', 'NO');
  1366. }
  1367. //f.dept_cd, f.pay_item, f.cost_code, f.cost_type, f.estdesc, '', f.estamt
  1368. function SearchPayItemClose(result){
  1369. if(result != null){
  1370. $("#pay_item").val(result[0]);
  1371. $("#cost_code").val(result[1]);
  1372. $("#cost_type").val(result[2]);
  1373. $("#estdesc").val(result[3]);
  1374. //obj_estamt.value = result[4];
  1375. }
  1376. fLayerPopClose('_searchPayItemPopup');
  1377. }
  1378. function chProofCd(obj){
  1379. //통화가KRW가 아니고 분계유형에 증빙종류[기타]이면 invlice고정
  1380. var conCurCd = jQuery("#conCurCd").val();
  1381. var proof_cd = obj.value
  1382. if(conCurCd != "KRW"){
  1383. if(proof_cd == "Z99"){
  1384. jQuery("#chk_1").prop("checked", false);
  1385. jQuery("#chk_2").prop("checked", false);
  1386. jQuery("#chk_3").prop("checked", true);
  1387. jQuery("#chk_1").attr("disabled",true);
  1388. jQuery("#chk_2").attr("disabled",true);
  1389. jQuery("#chk_3").attr("disabled",false);
  1390. btnCtr();
  1391. }else if(proof_cd != "Z99"){
  1392. jQuery("#chk_1").prop("checked", true);
  1393. jQuery("#chk_2").prop("checked", false);
  1394. jQuery("#chk_3").prop("checked", false);
  1395. jQuery("#chk_1").attr("disabled",false);
  1396. jQuery("#chk_2").attr("disabled",false);
  1397. jQuery("#chk_3").attr("disabled",true);
  1398. btnCtr();
  1399. }
  1400. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  1401. if (radioCheck == "1") { //역발행
  1402. jQuery("#taxAttachments").hide();
  1403. jQuery("#taxTrRow").hide();
  1404. jQuery("#invoiceAttachments").hide();
  1405. jQuery("#invoiceTrRow").hide();
  1406. } else if (radioCheck == "2"){ //순발행
  1407. jQuery("#taxAttachments").show();
  1408. jQuery("#taxTrRow").show();
  1409. jQuery("#invoiceAttachments").hide();
  1410. jQuery("#invoiceTrRow").hide();
  1411. }else{
  1412. jQuery("#taxAttachments").hide();
  1413. jQuery("#taxTrRow").hide();
  1414. jQuery("#invoiceAttachments").show();
  1415. jQuery("#invoiceTrRow").show();
  1416. }
  1417. }
  1418. }
  1419. </script>
  1420. <!-- 분개유형 -->
  1421. <div class="application-info magT10">
  1422. <div class="application-sub-title">
  1423. <span class="title">분개유형</span>
  1424. </div>
  1425. <div class="application-location">
  1426. <span id="spanGubSave" class="btnSearch center" style="display: none"><!-- <a href="javascript:void(0);" onclick="gubSave('0');" id="btnGubSave">분계유형저장</a> --></span>
  1427. </div>
  1428. </div>
  1429. <TABLE class="form-table">
  1430. <colgroup>
  1431. <col width="13%" />
  1432. <col width="20%"/>
  1433. <col width="13%" />
  1434. <col width="20%"/>
  1435. <col width="13%" />
  1436. <col width="*" />
  1437. </colgroup>
  1438. <TR height="25">
  1439. <TH>분개유형</TH>
  1440. <%-- <TD><%= ContCodeManager.getCcsifSelectCodeList("SUB_ACCT_GB", "acct_gb", "width:100%;", "", ContInfo.get("acct_gb")) %></TD> --%> <!-- 외주 분계유형 -->
  1441. <TD><%= ContCodeManager.getCcsifSelectCodeList("PUR-ACCT_GB", "acct_gb", "width:100%;", "", ContInfo.get("acct_gb"), ContInfo.get("dept_cd"), ContInfo.get("pay_div")) %></TD>
  1442. <TH>증빙종류</TH>
  1443. <TD><%= ContCodeManager.getProofCdSelectTag("proof_cd", "width:100%;", "onchange=chProofCd(this);", "", ContInfo.get("GUA_GB"), "Y") %></TD>
  1444. <TH>PAY GROUP</TH>
  1445. <input type="hidden" id="payTerms" name="payTerms" value="<%=ContInfo.get("PAYMENT_TERMS")%>">
  1446. <TD><%= ContCodeManager.getPayGroupSelectTag("pay_group", "width:100%;", "onchange=changePaymentTerms(this);", "", ContInfo.get("pay_group"), ContInfo.get("ac_unit_cd")) %></TD>
  1447. </TR>
  1448. <TR height="25">
  1449. <TH>PAYMENT TERMS</TH>
  1450. <TD colspan="5">
  1451. <SELECT class='input_select' id='payment_terms_id' name='payment_terms_id' style='width:20%;'>
  1452. </SELECT>
  1453. </TD>
  1454. </TR>
  1455. </TABLE>
  1456. <script>
  1457. changePaymentTerms(document.form1.pay_group);
  1458. setSelect(document.form1.payment_terms_id, '<%= ContInfo.get("payment_terms") %>');
  1459. </script>
  1460. <div class="application-info magT10">
  1461. <div class="application-sub-title">
  1462. <span class="title">세금계산서 정보</span>
  1463. </div>
  1464. <div class="application-location">
  1465. <span id="spanTaxSave" class="btnSearch center" style="display: none"><a href="javascript:void(0);" onclick="gubSave('1');" id="btnGubSave">세금계산서저장</a></span>
  1466. </div>
  1467. </div>
  1468. <TABLE class="form-table">
  1469. <colgroup>
  1470. <col width="13%" />
  1471. <col width="20%" />
  1472. <col width="13%" />
  1473. <col width="20%" />
  1474. <col width="13%" />
  1475. <col width="*" />
  1476. </colgroup>
  1477. <TR>
  1478. <th style="text-align: left;">세금계산서 발행방법</th>
  1479. <TD colspan="3">
  1480. <input type="radio" id="chk_1" name="chk_info" value="1" onclick="taxDataSet();" <%= check1 %>>&nbsp;역발행(SGC이앤씨 발행)
  1481. &nbsp;<input type="radio" id="chk_2" name="chk_info" value="2" onclick="taxDataSet();" <%= check2 %>>&nbsp;순발행(업체직접 발행)
  1482. &nbsp;<input type="radio" id="chk_3" name="chk_info" value="3" onclick="taxDataSet();" <%= check3 %>>&nbsp;Invoice
  1483. </TD>
  1484. <th style="text-align: left;">작성일자(증빙일자)</th>
  1485. <TD><%= InputText.get("date1", Formatter.formatDate(prePayment.get("TAX_DY"), "-"), 30, 10, "Center, date, PerSize, readonly", "date", "") %>
  1486. <A href="JavaScript:calendar('date1');"><IMG src="/img/supplier/template/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
  1487. </TD>
  1488. </TR>
  1489. <TR>
  1490. <th class="required" style="text-align: left;">담당자명</th>
  1491. <TD><%= InputText.get("userName", taxChargNm, 98, 6, "string, left, perSize", "string") %></TD>
  1492. <th class="required" style="text-align: left;">담당자 핸드폰번호</th>
  1493. <TD><input type="text" class="input" id="hp" name="hp" value="<%=taxChargHp %>" style="width: 44%" size="13" maxlength="13" alt="left">&nbsp;ex)010-0000-0000</TD>
  1494. <th class="required" style="text-align: left;">담당자 이메일</th>
  1495. <TD><%= InputText.get("eMail", taxChargEmail, 98, 40, "string, left, perSize", "string") %></TD>
  1496. </TR>
  1497. <TR>
  1498. <TH>환율</th>
  1499. <TD>
  1500. <%-- <%= InputText.get("rateEx", Formatter2.currency(prePayment.get("rateEx"), intDigit), 98, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %> --%>
  1501. <%= InputText.get("rateEx", Formatter2.currency(prePayment.get("rateEx"), currency_digit), 98, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %>
  1502. </TD>
  1503. <TH>환율연산금액</th><!-- 2017.1.31 환율연산 소수점제외 intDigit-->
  1504. <TD colspan="3">공급가:<%= InputText.get("rateAmt", Formatter2.currency(prePayment.get("rateAmt"), 0), 20, 30, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %>, 부가세:<%= InputText.get("rateVamt", Formatter2.currency(prePayment.get("rateVamt"), 0), 20, 30, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %>
  1505. </TD>
  1506. </TR>
  1507. </TABLE>
  1508. <!-- 세금계산서정보 : 끝 -->
  1509. <div class="application-info magT15">
  1510. <div class="application-sub-title">
  1511. <span class="title">선급금정보</span>
  1512. </div>
  1513. </div>
  1514. <TABLE class="form-table">
  1515. <colgroup>
  1516. <col width="13%" />
  1517. <col width="20%" />
  1518. <col width="13%" />
  1519. <col width="20%" />
  1520. <col width="13%" />
  1521. <col width="*" />
  1522. </colgroup>
  1523. <TR>
  1524. <th style="text-align: left;">신청구분</th>
  1525. <TD><%= HTMLMaker.getSelectTag(perpayReqDivComboList, "DETAILCD", "DETAILNM", "perpayReqDiv", "width:80%;height=18;' onChange='inputDataSet();", "", prePayment.get("REQ_DIV_CD")) %></TD>
  1526. <%-- <th style="text-align: left;">하도급직불여부</th>
  1527. <TD>&nbsp;<input type="radio" name="SUPP_DIRECT_YN" value="Y" <%=prePayment.get("SUPP_DIRECT_YN").equals("Y") ? "checked=\"checked\"" : ""%>>예
  1528. &nbsp;<input type="radio" name="SUPP_DIRECT_YN" value="N" <%=prePayment.get("SUPP_DIRECT_YN").equals("N") ? "checked=\"checked\"" : ""%>>아니오
  1529. </TD> --%>
  1530. <th style="text-align: left;">신청(서명)일시</th>
  1531. <TD colspan="2"><%= InputText.get("custSignDate", prePayment.get("CUST_SIGN_DATE"), 100, 50, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1532. </TR>
  1533. </TABLE>
  1534. <img src="/img/com/blank.gif" height="10px" />
  1535. <TABLE class="form-table" style="table-layout: fixed;">
  1536. <colgroup>
  1537. <col width="10%">
  1538. <col width="10%">
  1539. <col width="20%">
  1540. <col width="10%">
  1541. <col width="10%">
  1542. <col width="10%">
  1543. <col width="10%">
  1544. <col width="10%">
  1545. <col width="*">
  1546. </colgroup>
  1547. <TR>
  1548. <th rowspan="1" colspan="2" style="text-align: center;">구분</th>
  1549. <th rowspan="1" style="text-align: center;">합계</Th>
  1550. <th colspan="2" style="text-align: center;">공급가액</Th>
  1551. <th colspan="2" style="text-align: center;">부가세</Th>
  1552. <th colspan="2" style="text-align: center;">요율</Th>
  1553. </TR>
  1554. <TR>
  1555. <th rowspan="2" style="text-align: center;">계약</Th>
  1556. <th style="text-align: center;">계약금액</Th>
  1557. <TD align="right"><%= InputText.get("conAmt", Formatter2.currency(prePayment.get("CON_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1558. <TD colspan="2" align="right"><%= InputText.get("conSupplyAmt", Formatter2.currency(prePayment.get("CON_SUPPLY_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1559. <TD colspan="2" align="right"><%= InputText.get("conSurtaxAmt", Formatter2.currency(prePayment.get("CON_SURTAX_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1560. <TD colspan="2" align="right"><%= InputText.get("conAmtPercent", "100.0", 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1561. </TR>
  1562. <TR>
  1563. <th style="text-align: center;">선급금액</Th>
  1564. <TD align="right"><%= InputText.get("perpayAmt", Formatter2.currency(prePayment.get("PREPAY_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1565. <TD colspan="2" align="right"><%= InputText.get("subPrepaySupplyAmt", Formatter2.currency(prePayment.get("PREPAY_SUPPLY_AMT"), intDigit), 98, 16, " float, right, perSize ", "float") %></TD>
  1566. <TD colspan="2" align="right"><%= InputText.get("subPrepaySurtaxAmt", Formatter2.currency(prePayment.get("PREPAY_SURTAX_AMT"), intDigit), 98, 16, " float, right, perSize ", "float") %></TD>
  1567. <TD colspan="2" align="right"><%= InputText.get("prepayAmtPercent", prePayment.get("PREPAY_AMT_PERCENT"), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1568. </TR>
  1569. <TR>
  1570. <th rowspan="2" style="text-align: center;">선급</Th>
  1571. <th style="text-align: center;">신청금액</Th>
  1572. <TD align="right"><%= InputText.get("reqPrepayAmt", Formatter2.currency(prePayment.get("REQ_PREPAY_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1573. <TD colspan="2" align="right"><%= InputText.get("reqPrepaySupplyAmt", Formatter2.currency(prePayment.get("REQ_PREPAY_SUPPLY_AMT"), intDigit), 98, 16, "class=input byteChk ,float, right, perSize", "float") %></TD>
  1574. <TD colspan="2" align="right"><%= InputText.get("reqPrepaySurtaxAmt", Formatter2.currency(prePayment.get("REQ_PREPAY_SURTAX_AMT"), intDigit), 98, 16, "class=input byteChk ,float, right, perSize", "float") %></TD>
  1575. <TD colspan="2" align="right"><%= InputText.get("reqPrepayPercent", prePayment.get("REQ_PREPAY_PERCENT"), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1576. </TR>
  1577. <TR>
  1578. <th style="text-align: center;">포기금액</Th>
  1579. <TD align="right"><%= InputText.get("giveAmt", Formatter2.currency(prePayment.get("GIVE_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1580. <TD colspan="2" align="right"><%= InputText.get("giveSupplyAmt", Formatter2.currency(prePayment.get("GIVE_SUPPLY_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1581. <TD colspan="2" align="right"><%= InputText.get("giveSurtaxAmt", Formatter2.currency(prePayment.get("GIVE_SURTAX_AMT"), intDigit), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1582. <TD colspan="2" align="right"><%= InputText.get("givePercent", prePayment.get("GIVE_PERCENT"), 98, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></TD>
  1583. </TR>
  1584. </TABLE>
  1585. <div class="application-info magT15">
  1586. <div class="application-sub-title">
  1587. <span class="title">첨부파일</span>
  1588. </div>
  1589. </div>
  1590. <!-- 첨부파일 : 시작 -->
  1591. <TABLE class="form-table">
  1592. <colgroup>
  1593. <col width="5%">
  1594. <col width="6%">
  1595. <col width="11%">
  1596. <col width="11%">
  1597. <col width="11%">
  1598. <col width="11%">
  1599. <col width="11%">
  1600. <col width="11%">
  1601. <col width="*">
  1602. </colgroup>
  1603. <TR>
  1604. <th colspan="2" style="text-align: center;">구분</Th>
  1605. <th colspan="5" style="text-align: center;">첨부파일명</Th>
  1606. <th colspan="2" style="text-align: center;">첨부파일</Th>
  1607. </TR>
  1608. <TR>
  1609. <TD colspan="2">선급금 포기각서<span id="p_Attach1">(해당없음)</span></TD>
  1610. <%-- <TD colspan="5" align="left"><TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width: 100%; height: 99%; border: 0;" rows="1" class="input" readOnly><%=file_giveup.get("PREPAYMENTS_GIVEUP") %></TEXTAREA></TD> --%>
  1611. <TD colspan="5" align="left">
  1612. <table width="100%">
  1613. <colgroup>
  1614. <col width="99%" />
  1615. </colgroup>
  1616. <tr>
  1617. <td>
  1618. <div id="p_AttachFile1" class="attach_file_view">
  1619. <%=FileManager.getFileListForDiv("PREPAYMENTS_GIVEUP", prePayment.get("PREPAY_ID")) %>
  1620. </div>
  1621. </td>
  1622. <tr>
  1623. </table>
  1624. </TD>
  1625. <TD colspan="2" style="text-align: center;"><span id="giveAttachments"><IMG id='search_spot_button' onClick="doAttachFile(document.form1.prepayId,1);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'></TD>
  1626. </TR>
  1627. <TR id="taxTrRow">
  1628. <TD colspan="2" align="center">세금계산서</TD>
  1629. <%-- <TD colspan="5" align="left"><TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width: 100%; height: 99%; border: 0;" rows="1" class="input" readOnly><%=file_taxbill.get("TAX_BILL") %></TEXTAREA></TD> --%>
  1630. <TD colspan="5" align="left">
  1631. <table width="100%">
  1632. <colgroup>
  1633. <col width="99%" />
  1634. </colgroup>
  1635. <tr>
  1636. <td>
  1637. <div id="p_AttachFile2" class="attach_file_view">
  1638. <%=FileManager.getFileListForDiv("TAX_BILL", prePayment.get("PREPAY_ID")) %>
  1639. </div>
  1640. </td>
  1641. <tr>
  1642. </table>
  1643. </TD>
  1644. <TD colspan="2" style="text-align: center;"><span id="taxAttachments"><IMG id='search_spot_button' onClick="doAttachFile(document.form1.prepayId,2);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'></TD>
  1645. </TR>
  1646. <TR id="invoiceTrRow">
  1647. <TD colspan="2" align="center">Invoice</TD>
  1648. <TD colspan="5" align="left">
  1649. <table width="100%">
  1650. <colgroup>
  1651. <col width="99%" />
  1652. </colgroup>
  1653. <tr>
  1654. <td>
  1655. <div id="p_AttachFile3" class="attach_file_view">
  1656. <%=FileManager.getFileListForDiv("PREPAYMENTS_INVOICE", prePayment.get("PREPAY_ID")) %>
  1657. </div>
  1658. </td>
  1659. <tr>
  1660. </table>
  1661. </TD>
  1662. <TD colspan="2" style="text-align: center;"><span id="invoiceAttachments"><IMG id='search_spot_button' onClick="doAttachFile(document.form1.prepayId,3);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'></TD>
  1663. </TR>
  1664. <TR>
  1665. <TD colspan="2">대금청구</TD>
  1666. <TD colspan="5" align="left">
  1667. <table width="100%">
  1668. <colgroup>
  1669. <col width="99%" />
  1670. </colgroup>
  1671. <tr>
  1672. <td>
  1673. <div id="p_AttachFile4" class="attach_file_view">
  1674. <%=FileManager.getFileListForDiv("PREPAYMENTS_BILLING", prePayment.get("PREPAY_ID")) %>
  1675. </div>
  1676. </td>
  1677. <tr>
  1678. </table>
  1679. </TD>
  1680. <TD colspan="2" style="text-align: center;"><span id="giveAttachments"><IMG id='search_spot_button' onClick="doAttachFile(document.form1.prepayId,4);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'></TD>
  1681. </TR>
  1682. </TABLE>
  1683. <!-- 첨부파일 : 끝 -->
  1684. <%if(warrList.size()>0){%>
  1685. <%
  1686. /*
  1687. 보증 목록을 include 시킴 (2014-10-16) 김명호
  1688. */
  1689. %>
  1690. <%@ include file="/jsp/ko_KR/buyer/cont/purchase/guarList.jsp" %>
  1691. <%
  1692. }
  1693. %>
  1694. </FORM>