advencePayment.jsp 77 KB

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