payItemResult.jsp 107 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641
  1. <%--
  2. - FileName : payItemResult.jsp
  3. - Author(s) : ok
  4. - Date : 2014.06.17
  5. - Copyright : Copyright (c) 2014 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.common.code.*" %>
  16. <%@ include file="/jsp/work/taglib.jsp"%>
  17. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  18. <%
  19. ctx.init(request, response);
  20. HandlerStorage storage = ctx.getHandlerStorage();
  21. ValueObject params = storage.getParams();
  22. ValueObject user = storage.getUser();
  23. String event = storage.getEvent();
  24. RowSet warrList = storage.getRowSet("contOutWarr"); //보증정보
  25. ValueObject prePayment = storage.getValueObject("prePayment"); //기본정보, 세금계산서정보, 선급금정보
  26. ValueObject ContInfo = storage.getValueObject("ContInfo"); //분계유형
  27. RowSet prePaymentList = storage.getRowSet("prePaymentList"); //대금내역
  28. String check1 = "";
  29. String check2 = "";
  30. String check3 = "";
  31. if("3".equals(prePayment.get("TAX_METHOD_CD"))){
  32. check3 = "checked";
  33. }else if("2".equals(prePayment.get("TAX_METHOD_CD"))){
  34. check2 = "checked";
  35. }else{
  36. check1 = "checked";
  37. }
  38. String digit = (String)prePayment.get("digit");
  39. int intDigit = Integer.parseInt(digit);
  40. //기타 첨부서류
  41. RowSet purchaseFileRow = storage.getRowSet("purchaseFileRow");
  42. String acctid = storage.getUser().get("ACCT_ID");
  43. String userRole = storage.getUser().get("RIGHT_NAME");
  44. System.out.println(userRole);
  45. String creby = user.get("ACCT_ID");
  46. String updby = user.get("ACCT_ID");
  47. if(!"".equals(prePayment.get("CRE_BY")) && !"".equals(prePayment.get("UPD_BY"))){
  48. creby = prePayment.get("CRE_BY");
  49. updby = prePayment.get("UPD_BY");
  50. }
  51. //베트남 환율정보 0원으로 표기되는 부분 수정(23.07.10)
  52. String CURRENCY_GB = (String)prePayment.get("CURRENCY_GB");
  53. int currency_digit = intDigit;
  54. if(CURRENCY_GB.equals("VND")) currency_digit = 4; //통화가 vnd인 경우 소숫점 4자리까지 표기
  55. %>
  56. <SCRIPT language="JavaScript">
  57. /*예약함수*/
  58. var sheet1;
  59. var sheet1Row;
  60. var sheet1PageNo = 1;
  61. var pageLastRowIndex = 1;
  62. var validationResult = false;
  63. var filterShow = false;
  64. var g_digit = <%= intDigit %>; // 소숫점 이하 자릿수
  65. function _onReady(){
  66. gridInit(sheet1);
  67. jQuery("#spanBtnMrr").show();
  68. jQuery("#spanBbtnContCopy").show();
  69. jQuery(document).delegate('#date1','change', function() {
  70. var f = document.form1;
  71. jQuery("#fevent").val("GET_RATE");
  72. //반려가 가능한 상태인지 확인한다.
  73. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "GET_RATE", f, "VALUEOBJECT");
  74. });
  75. //2016.11.10 외국환거래신고
  76. $("#btn_foreign").click(function() {//저장
  77. var corpId = "<%=prePayment.get("CORP_ID")%>";
  78. var win_id = "ForeignCheckPop";
  79. var editYN = "N";
  80. if ( jQuery("#statusCd").val() == "00"|| jQuery("#statusCd").val() == "01"|| jQuery("#statusCd").val() == "03"|| jQuery("#statusCd").val() == "99"){
  81. editYN="Y";
  82. }
  83. var link = "/bid/purchase/ForeignCheckPop.screen";
  84. link += "?pop_win_id="+win_id+"&BID_NO="+$("#purContId").val()+"&BID_DEG="+$("#payreqId").val()+"&VENDOR_CD=" + corpId + "&editYN="+ editYN + "&WHO5=P"
  85. link += "&P_USER=" + "<%=user.get("USER_SABUN")%>";
  86. fLayerPop(win_id, link, 950,600, '','', 'NO');
  87. });
  88. //정기평가표
  89. jQuery("#btnFixAppr").click(function() {
  90. var corpId = "<%=prePayment.get("CORP_ID")%>";
  91. var apprArrId = "<%=prePayment.get("APPR_ARR_ID")%>";
  92. var apprDocCd = "<%=prePayment.get("APPR_DOC_CD")%>";
  93. var apprDy = "<%=prePayment.get("APPR_DY")%>";
  94. if(typeof apprArrId == "undefined" || apprArrId == "" || apprArrId == null){
  95. alert("정기평가표가 등록되어 있지 않습니다.");
  96. return;
  97. }else{
  98. var f = document.form1;
  99. var reportInfo = new ReportInfo();
  100. if(apprDocCd == "03") // manufacturer의 경우
  101. {
  102. reportInfo.title = "기자재공급업체 정기평가표(Manufacturer)";
  103. if ("<%=prePayment.get("ADM_YEAR")%>" == "2014")
  104. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3.mrd";
  105. else if ("<%=prePayment.get("ADM_YEAR")%>" == "2016")
  106. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2016.mrd";
  107. else if ("<%=prePayment.get("ADM_YEAR")%>" == "2019")
  108. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2019.mrd";
  109. else if ("<%=prePayment.get("ADM_YEAR")%>" == "2020")
  110. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2020.mrd";
  111. else
  112. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2023.mrd";
  113. }else
  114. {
  115. reportInfo.title = "기자재공급업체 정기평가표(Agent)";
  116. if ("<%=prePayment.get("ADM_YEAR")%>" == "2014")
  117. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4.mrd";
  118. else if ("<%=prePayment.get("ADM_YEAR")%>" == "2016")
  119. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2016.mrd";
  120. else if ("<%=prePayment.get("ADM_YEAR")%>" == "2019")
  121. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2019.mrd";
  122. else if ("<%=prePayment.get("ADM_YEAR")%>" == "2020")
  123. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2020.mrd";
  124. else
  125. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2023.mrd";
  126. }
  127. reportInfo.set(corpId);
  128. reportInfo.set(apprArrId);
  129. reportInfo.set(apprDocCd);
  130. reportInfo.set(apprDy.substring(0,4));
  131. reportInfo.width = 1000; // Default: 1024
  132. reportInfo.height = 700; // Default: 768
  133. reportInfo.showPopup();
  134. }
  135. });
  136. $("#btnDashTest").click(function(){
  137. var url = "/payment/purchase/PayItemPurDashBoardPop.screen";
  138. url += "?job_div=P";
  139. url += "&sModule=LM";
  140. url += "&purContId=" + $("#purContId").val();
  141. var popOption = "width=800, height=600, resizable=YES, scrollbars=auto, status=YES;"; //팝업창 옵션(optoin)
  142. window.open(url, "", popOption);
  143. });
  144. $("#btnDashTestOut").click(function(){
  145. var url = "/payment/outside/PayItemOutDashBoardPop.screen";
  146. url += "?job_div=O";
  147. url += "&sModule=LM";
  148. url += "&subContId=5725"; // + $("#purContId").val();
  149. var popOption = "width=800, height=600, resizable=YES, scrollbars=auto, status=YES;"; //팝업창 옵션(optoin)
  150. window.open(url, "", popOption);
  151. });
  152. //리스트 페이지 이동
  153. jQuery("#btnList").click(function() {
  154. jQuery("#fevent").val("");
  155. jQuery("#form1").attr("action", "/payment/purchase/PayRequestList.screen");
  156. jQuery("#form1").attr("target", "_self");
  157. jQuery("#form1").attr("method", "post");
  158. jQuery("#form1").submit();
  159. });
  160. jQuery("#btnDelete").click(function() {
  161. var f = document.form1;
  162. //필수 입력항목 check
  163. if(jQuery("#prepayId").val() == ""){
  164. alert("삭제되었습니다.");
  165. return;
  166. }
  167. //입력데이터 저장
  168. if (confirm("삭제 하시겠습니까?")) {
  169. jQuery("#fevent").val("DELETE_DATA");
  170. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "DELETE_DATA", f, "SUCCESS");
  171. }
  172. });
  173. jQuery("#btnSave").click(function() {
  174. var f = document.form1;
  175. jQuery("#fevent").val("SAVE_DATA");
  176. //필수 입력항목 check
  177. if(requiredItemsCheck() == false){
  178. return;
  179. }
  180. if(contChgPayCheck() == false){
  181. return;
  182. }
  183. //2015.11.16 외화 부가세 확인 "Z99"->부가세 0 결재일때 확인안함.
  184. var conCurCd = jQuery("#conCurCd").val();
  185. if(conCurCd != "KRW" && jQuery("#bugase").val() != "INPUT_VAT"){ //2019.03.21 && jQuery("#proof_cd").val() != "Z99"
  186. var curReqAmt = jQuery("#curReqAmt").val().replace(/(\,|\:)/g,"");
  187. var curReqVatamt = jQuery("#curReqVatamt").val().replace(/(\,|\:)/g,"");
  188. if (Number(curReqAmt)/10 != Number(curReqVatamt) )
  189. {
  190. if (!confirm("외화 부가세 금액이 10%가 아닙니다. 저장 하시겠습니까?"))
  191. {
  192. return;
  193. }
  194. }
  195. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_DATA", f, "SUCCESS");
  196. }
  197. else{
  198. //입력데이터 저장
  199. if (confirm("저장 하시겠습니까?")) {
  200. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_DATA", f, "SUCCESS");
  201. }
  202. }
  203. });
  204. //대금신청요청
  205. jQuery("#btnAppReq").click(function() {
  206. //첨부파일Check
  207. //ChkAttch();
  208. var f = document.form1;
  209. jQuery("#btnAppReqSelect").val("1"); //0:저장처리, 1:대금신청요청
  210. jQuery("#fevent").val("SAVE_DATA");
  211. //필수 입력항목 check
  212. if(requiredItemsCheck() == false){
  213. return;
  214. }
  215. if(contChgPayCheck() == false){
  216. return;
  217. }
  218. //입력데이터 저장
  219. if (confirm(jQuery("#btnAppReq").text()+" 하시겠습니까?")) {
  220. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_DATA", f, "SUCCESS");
  221. }
  222. });
  223. //업체반려
  224. jQuery("#btnRejection").click(function() {
  225. var f = document.form1;
  226. if(!confirm('업체에 반려요청 됩니다.\n계속하시겠습니까?')){
  227. return;
  228. }
  229. f.rejectDiv.value = "21";
  230. jQuery("#fevent").val("CHK_REJECT");
  231. //반려가 가능한 상태인지 확인한다.
  232. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "CHK_REJECT", f, "VALUEOBJECT");
  233. });
  234. //현장반려 2019.3.20
  235. jQuery("#btnRejection1").click(function() {
  236. var f = document.form1;
  237. if(!confirm('반려시 데이터가 삭제됩니다.\n계속하시겠습니까?')){
  238. return;
  239. }
  240. f.rejectDiv.value = "2";
  241. jQuery("#fevent").val("CHK_REJECT");
  242. //반려가 가능한 상태인지 확인한다.
  243. submitXmlRequest("/payment/purchase/PayInstallResult_form.screen", "CHK_REJECT", f, "VALUEOBJECT");
  244. });
  245. //결재버튼
  246. jQuery("#btnApproval").click(function() {
  247. //통화가KRW가 아니고 분계유형에 증빙종류[기타]이면 invlice고정
  248. var conCurCd = jQuery("#conCurCd").val();
  249. var proof_cd = jQuery("#proof_cd option:selected").val();
  250. if(conCurCd != "KRW"){
  251. var rateEx = Number(jQuery("#rateEx").val());
  252. if(rateEx == 0){
  253. alert('환율이 없습니다.');
  254. return;
  255. }
  256. }
  257. //금회누계의 기성율이 100로 이상이면 잔금처리이므로 업체평가가 등록되 있는지 Check처리한다.
  258. var curBefAcmpPercent = Number(jQuery("#curBefAcmpPercent").val()); //누계기성율
  259. if(curBefAcmpPercent > 99.99999){
  260. //업체평가가 등록되어 있어야 결재가 가능하다.
  261. var corpId = "<%=prePayment.get("CORP_ID")%>";
  262. var apprArrId = "<%=prePayment.get("APPR_ARR_ID")%>";
  263. var apprDocCd = "<%=prePayment.get("APPR_DOC_CD")%>";
  264. var apprDy = "<%=prePayment.get("APPR_DY")%>";
  265. var APPR_NOTE = "<%=prePayment.get("APPR_NOTE")%>";
  266. if(typeof apprArrId == "undefined" || apprArrId == "" || apprArrId == null ){ //|| APPR_NOTE < 1
  267. alert("정기평가표가 등록되어 있지 않습니다.");
  268. return;
  269. }
  270. }
  271. //2016.5.12 외국환거래 확인
  272. if("<%=prePayment.get("CURRENCY_GB")%>" != "KRW" && jQuery("#FOREIGN_CHK").val()=="A" ){
  273. alert("외국환거래 신고대상여부를 확인해 주세요");
  274. return;
  275. }
  276. var f = document.form1;
  277. jQuery("#fevent").val("CHK_APPVAR");
  278. //결재가 가능한 상태인지 확인한다.
  279. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "CHK_APPVAR", f, "VALUEOBJECT");
  280. });
  281. //Invoice결재
  282. jQuery("#btnInvoiceApproval").click(function() {
  283. //금회누계의 기성율이 100로 이상이면 잔금처리이므로 업체평가가 등록되 있는지 Check처리한다.
  284. var curBefAcmpPercent = Number(jQuery("#curBefAcmpPercent").val()); //누계기성율
  285. if(curBefAcmpPercent > 99.99999){
  286. //업체평가가 등록되어 있어야 결재가 가능하다.
  287. var corpId = "<%=prePayment.get("CORP_ID")%>";
  288. var apprArrId = "<%=prePayment.get("APPR_ARR_ID")%>";
  289. var apprDocCd = "<%=prePayment.get("APPR_DOC_CD")%>";
  290. var apprDy = "<%=prePayment.get("APPR_DY")%>";
  291. var APPR_NOTE = "<%=prePayment.get("APPR_NOTE")%>";
  292. if(typeof apprArrId == "undefined" || apprArrId == "" || apprArrId == null ){//|| APPR_NOTE < 1
  293. alert("정기평가표가 등록되어 있지 않습니다. ");
  294. return;
  295. }
  296. }
  297. //2016.5.12 외국환거래 확인
  298. if("<%=prePayment.get("CURRENCY_GB")%>" != "KRW" && jQuery("#FOREIGN_CHK").val()=="A" ){
  299. alert("외국환거래 신고대상여부를 확인해 주세요");
  300. return;
  301. }
  302. if("<%=prePayment.get("CURRENCY_GB")%>" != "KRW"){
  303. var rateEx = Number(jQuery("#rateEx").val());
  304. if(rateEx == 0 ){
  305. alert('환율이 없습니다.');
  306. return;
  307. }
  308. }
  309. var f = document.form1;
  310. jQuery("#btnAppReqSelect").val("2"); //0:저장처리, 1:선급신청처리, 2:Invoice결재
  311. //필수 입력항목 check
  312. if (requiredItemsCheck() == false) {
  313. return;
  314. }
  315. var f = document.form1;
  316. jQuery("#fevent").val("CHK_APPVAR");
  317. //결재가 가능한 상태인지 확인한다.
  318. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "CHK_APPVAR", f, "VALUEOBJECT");
  319. });
  320. jQuery("#curReqVatamt").blur(function () {
  321. //전회 청구
  322. var payedApplyamt = jQuery("#payedApplyamt").val().replace(/(\,|\:)/g,""); //전회 청구 공급가액
  323. var payedVat = jQuery("#payedVat").val().replace(/(\,|\:)/g,""); //전회 청구 부가세
  324. var payedAmt = jQuery("#payedAmt").val().replace(/(\,|\:)/g,""); //전회 청구 합계
  325. var curReqAmt = jQuery("#curReqAmt").val().replace(/(\,|\:)/g,"");
  326. curReqAmt = Number(curReqAmt).toFixed(g_digit);
  327. var curReqVatamt = jQuery("#curReqVatamt").val().replace(/(\,|\:)/g,"");
  328. curReqVatamt = Number(curReqVatamt).toFixed(g_digit);
  329. jQuery("#curReqVatamt").val(Number(curReqVatamt).toFixed(g_digit));
  330. var curReqApplyamtVal = Number(curReqAmt) + Number(curReqVatamt); //금회 실지급 합계
  331. jQuery("#curReqApplyamt").val(Number(curReqApplyamtVal).toFixed(g_digit));
  332. //var curPayedSupplyamt = Number(curReqAmt) - Number(payedApplyamt);
  333. //jQuery("#curPayedSupplyamt").val(Number(curPayedSupplyamt).toFixed(g_digit)); //금회누계 공급가액 청구액 금액
  334. var curPayedVat = Number(payedVat) + Number(curReqVatamt);
  335. jQuery("#curPayedVat").val(Number(curPayedVat).toFixed(g_digit)); //금회누계 부가세 청구액 금액
  336. var curPayedSupplyamt = jQuery("#curPayedSupplyamt").val().replace(/(\,|\:)/g,"");
  337. curPayedSupplyamt = Number(curPayedSupplyamt).toFixed(g_digit);
  338. var curPayedAmt = Number(curPayedSupplyamt) + Number(curPayedVat);
  339. jQuery("#curPayedAmt").val(Number(curPayedAmt).toFixed(g_digit)); //금회누계 합계 청구액 금액
  340. jQuery("#curReqVatamt, #curReqApplyamt, #curPayedVat, #curPayedAmt").each(function(index){
  341. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  342. });
  343. });
  344. //jQuery("#curAcmpVat, #curPrepayApplyamt, #curPrepayVat").blur(function () {
  345. //2018.3.26 선급부가세 수정. 0이면 잔금
  346. jQuery("#curPrepayVat").blur(function () {
  347. //잔여가 0이면 잔급으로 설정
  348. //setDepostiCd(); //2019.08.02 사용자가 선택 후 아래에서 금액 변경 시 자동으로 바뀌면서 혼란이 생김
  349. //하자이행율이 100%이상이면 보증정보 표시
  350. setGuarOutList();
  351. });
  352. jQuery("#curPrepayApplyamt").blur(function () {
  353. if(jQuery("#statusCd").val() == "10"){ //완료건에 대해서는 금액 계산을 하지않는다.
  354. return;
  355. }
  356. var conConAmtVal = jQuery("#conConAmt").val().replace(/(\,|\:)/g,""); //계약금
  357. var conConVatVal = jQuery("#conConVAmt").val().replace(/(\,|\:)/g,""); //계약금 부가세
  358. var conPrepayAmtVal = jQuery("#conPrepayAmt").val().replace(/(\,|\:)/g,""); //선급금액
  359. // var conPrepayVatVal = conPrepayAmtVal /100 * 10; //선급금액 부가세
  360. var conPrepayVatVal = jQuery("#reqPrepaySVamt").val().replace(/(\,|\:)/g,""); //선급금액 부가세
  361. //전회 청구
  362. var befAcmpApplyAmtVal = jQuery("#befAcmpApplyAmt").val().replace(/(\,|\:)/g,""); //전회 청구 공급가액
  363. var befAcmpVatVal = jQuery("#befAcmpVat").val().replace(/(\,|\:)/g,""); //전회 청구 부가세
  364. var befAcmpAmtVal = jQuery("#befAcmpAmt").val().replace(/(\,|\:)/g,""); //전회 청구 합계
  365. var befAcmpPercentVal = jQuery("#befAcmpPercent").val().replace(/(\,|\:)/g,""); //전회 청구 지급율
  366. var curAcmpApplyamtVal = jQuery("#curAcmpApplyamt").val().replace(/(\,|\:)/g,""); //금회 청구 공급가액
  367. var befPrepayApplyAmtVal = jQuery("#befPrepayApplyAmt").val().replace(/(\,|\:)/g,""); //전회 선급 공급가액
  368. //금회 선급
  369. var curPrepayApplyamtVal = jQuery("#curPrepayApplyamt").val().replace(/(\,|\:)/g,""); //금회 선급 공급가액
  370. var curPrepayApplyamtVal = Number(curPrepayApplyamtVal).toFixed(g_digit); //금회 선급 공급가액
  371. var curBefPrepaySupplyamtVal = Number(befPrepayApplyAmtVal) + Number(curPrepayApplyamtVal); //누계 선급 공급가액
  372. var curBefPrepaySupplyamtVal = Number(curBefPrepaySupplyamtVal).toFixed(g_digit); //누계 선급 공급가액
  373. if(curPrepayApplyamtVal == ""){
  374. curPrepayApplyamtVal = 0;
  375. jQuery("#curPrepayApplyamt").val(0);
  376. }else{
  377. var reqPrepaySamtVal = jQuery("#reqPrepaySamt").val().replace(/(\,|\:)/g,""); //선급금 청구금액 공급가
  378. if(parseFloat(curBefPrepaySupplyamtVal) > parseFloat(reqPrepaySamtVal) ){
  379. alert("선급금 청구금액 공급가 보다 선급금공제액이 큽니다.");
  380. curPrepayApplyamtVal = jQuery("#orgCurPrepayApplyamt").val();
  381. jQuery("#curPrepayApplyamt").val(Number(curPrepayApplyamtVal).toFixed(g_digit));
  382. jQuery("#curPrepayApplyamt").focus();
  383. return;
  384. }else{
  385. if(parseFloat(curPrepayApplyamtVal) > parseFloat(curAcmpApplyamtVal) ){ //입력한 선급금공제금액이 금회기성고공급가액보다 클수 없다.
  386. alert("선급금 공제액이 금회 기성고보다 큽니다.");
  387. curPrepayApplyamtVal = jQuery("#orgCurPrepayApplyamt").val();
  388. jQuery("#curPrepayApplyamt").val(curPrepayApplyamtVal);
  389. jQuery("#curPrepayApplyamt").focus();
  390. }else{
  391. jQuery("#curPrepayApplyamt").val(curPrepayApplyamtVal); //입력한 선급금공제 금회 공급가액 표시
  392. if( jQuery("#bugase").val() == "INPUT_VAT" ){ //분계유형에따른 부가세 계산
  393. var bugaseVal = curAcmpApplyamtVal / 100 * 10;
  394. //jQuery("#curAcmpVat").val(Math.floor(bugaseVal)); //기성고 금회 부가세
  395. jQuery("#curAcmpVat").val(Number(bugaseVal).toFixed(g_digit)); //기성고 금회 부가세
  396. var bugaseVatVal = curPrepayApplyamtVal / 100 * 10;
  397. //jQuery("#curPrepayVat").val(Math.floor(bugaseVatVal)); //선급금공제 금회 부가세
  398. jQuery("#curPrepayVat").val(Number(bugaseVatVal).toFixed(g_digit)); //선급금공제 금회 부가세
  399. }else{
  400. jQuery("#curAcmpVat").val("0"); //기성고 금회 부가세
  401. jQuery("#curPrepayVat").val("0"); //선급금공제 금회 부가세
  402. }
  403. }
  404. }
  405. }
  406. //금회 청구
  407. var curAcmpVatVal = jQuery("#curAcmpVat").val().replace(/(\,|\:)/g,""); //금회 청구 부가세
  408. if(curAcmpVatVal == ""){
  409. curAcmpVatVal = 0;
  410. jQuery("#curAcmpVat").val(0);
  411. }else{
  412. jQuery("#curAcmpVat").val(Number(curAcmpVatVal).toFixed(g_digit));
  413. }
  414. var curAcmpAmtVal = Number(curAcmpApplyamtVal) + Number(curAcmpVatVal); //금회 청구 합계
  415. curAcmpAmtVal = Number(curAcmpAmtVal).toFixed(g_digit);
  416. jQuery("#curAcmpAmt").val(curAcmpAmtVal);
  417. jQuery("#curAcmpAmt, #curAcmpVat").each(function(index){
  418. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  419. });
  420. var curAcmpPercentVal = Number(curAcmpApplyamtVal) / Number(conConAmtVal) * 100; //금회 청구 지급율
  421. jQuery("#curAcmpPercent").val(curAcmpPercentVal.toFixed(1));
  422. //누계 청구
  423. var curBefAcmpSupplyamtVal = Number(befAcmpApplyAmtVal) + Number(curAcmpApplyamtVal); //누계 청구 공급가액
  424. jQuery("#curBefAcmpSupplyamt").val(Number(curBefAcmpSupplyamtVal).toFixed(g_digit));
  425. var curBefAcmpVatVal = Number(befAcmpVatVal) + Number(curAcmpVatVal); //누계 청구 부가세
  426. jQuery("#curBefAcmpVat").val(Number(curBefAcmpVatVal).toFixed(g_digit));
  427. var curBefAcmpAmtVal = Number(curBefAcmpSupplyamtVal) + Number(curBefAcmpVatVal); //누계 청구 합계
  428. jQuery("#curBefAcmpAmt").val(Number(curBefAcmpAmtVal).toFixed(g_digit));
  429. var curBefAcmpPercentVal = Number(curBefAcmpSupplyamtVal) / Number(conConAmtVal) * 100; //누계 청구 지급율
  430. jQuery("#curBefAcmpPercent").val(curBefAcmpPercentVal.toFixed(1));
  431. jQuery("#curBefAcmpSupplyamt, #curBefAcmpVat, #curBefAcmpAmt").each(function(index){
  432. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  433. });
  434. //잔여 청구
  435. var remainderAcmpSupplyamtVal = Number(conConAmtVal) - Number(curBefAcmpSupplyamtVal); //잔여 청구 공급가액
  436. jQuery("#remainderAcmpSupplyamt").val(Number(remainderAcmpSupplyamtVal).toFixed(g_digit));
  437. var remainderAcmpVatVal = Number(conConVatVal) - Number(curBefAcmpVatVal); //잔여 청구 부가세
  438. jQuery("#remainderAcmpVat").val(Number(remainderAcmpVatVal).toFixed(g_digit));
  439. var remainderAcmpAmtVal = Number(remainderAcmpSupplyamtVal) + Number(remainderAcmpVatVal); //잔여 청구 합계
  440. jQuery("#remainderAcmpAmt").val(Number(remainderAcmpAmtVal).toFixed(g_digit));
  441. var remainderAcmpPercentVal = Number(remainderAcmpSupplyamtVal) / Number(conConAmtVal) * 100; //누계 청구 지급율
  442. jQuery("#remainderAcmpPercent").val(remainderAcmpPercentVal.toFixed(1));
  443. jQuery("#remainderAcmpSupplyamt, #remainderAcmpVat, #remainderAcmpAmt").each(function(index){
  444. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  445. });
  446. //전회 선급
  447. var befPrepayVatVal = jQuery("#befPrepayVat").val().replace(/(\,|\:)/g,""); //전회 선급 부가세
  448. var befPrepayAmtVal = jQuery("#befPrepayAmt").val().replace(/(\,|\:)/g,""); //전회 선급 합계
  449. var befPrepayPercentVal = jQuery("#befPrepayPercent").val().replace(/(\,|\:)/g,""); //전회 선급 지급율
  450. var curPrepayVatVal = jQuery("#curPrepayVat").val().replace(/(\,|\:)/g,""); //금회 선급 부가세
  451. if(curPrepayVatVal == ""){
  452. curPrepayVatVal = 0;
  453. jQuery("#curPrepayVat").val(0);
  454. }else{
  455. jQuery("#curPrepayVat").val(Number(curPrepayVatVal).toFixed(g_digit));
  456. }
  457. var curPrepayDeductamtVal = Number(curPrepayApplyamtVal) + Number(curPrepayVatVal); //금회 선급 합계
  458. jQuery("#curPrepayDeductamt").val(Number(curPrepayDeductamtVal).toFixed(g_digit));
  459. if(parseFloat(curPrepayApplyamtVal) == "0"){
  460. var curPrepayPercentVal = 0.0; //금회 선급 지급율
  461. }else{
  462. var curPrepayPercentVal = Number(curPrepayApplyamtVal) / Number(conPrepayAmtVal) * 100; //금회 선급 지급율
  463. }
  464. jQuery("#curPrepayPercent").val(curPrepayPercentVal.toFixed(1));
  465. jQuery("#curPrepayApplyamt, #curPrepayVat, #curPrepayDeductamt").each(function(index){
  466. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  467. });
  468. //누계 선급
  469. jQuery("#curBefPrepaySupplyamt").val(Number(curBefPrepaySupplyamtVal).toFixed(g_digit));
  470. var curBefPrepayVatVal = Number(befPrepayVatVal) + Number(curPrepayVatVal); //누계 선급 부가세
  471. jQuery("#curBefPrepayVat").val(Number(curBefPrepayVatVal).toFixed(g_digit));
  472. var curBefPrepayAmtVal = Number(befPrepayAmtVal) + Number(curPrepayDeductamtVal); //누계 청구 합계
  473. jQuery("#curBefPrepayAmt").val(Number(curBefPrepayAmtVal).toFixed(g_digit));
  474. if(parseFloat(curBefPrepaySupplyamtVal) == "0"){
  475. var curBefPrepayPercentVal = 0.0; //누계 선급 지급율
  476. }else{
  477. var curBefPrepayPercentVal = Number(curBefPrepaySupplyamtVal) / Number(conPrepayAmtVal) * 100; //누계 선급 지급율
  478. }
  479. jQuery("#curBefPrepayPercent").val(curBefPrepayPercentVal.toFixed(1));
  480. jQuery("#curBefPrepaySupplyamt, #curBefPrepayVat, #curBefPrepayAmt").each(function(index){
  481. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  482. });
  483. //잔여 선급
  484. var remainderPrepaySupplyamtVal = Number(conPrepayAmtVal) - Number(curBefPrepaySupplyamtVal); //잔여 선급 공급가액
  485. jQuery("#remainderPrepaySupplyamt").val(Number(remainderPrepaySupplyamtVal).toFixed(g_digit));
  486. var remainderPrepayVatVal = Number(conPrepayVatVal) - Number(curBefPrepayVatVal); //잔여 선급 부가세
  487. jQuery("#remainderPrepayVat").val(Number(remainderPrepayVatVal).toFixed(g_digit));
  488. var remainderPrepayAmtVal = Number(remainderPrepaySupplyamtVal) + Number(remainderPrepayVatVal); //잔여 선급 합계
  489. jQuery("#remainderPrepayAmt").val(Number(remainderPrepayAmtVal).toFixed(g_digit));
  490. if(parseFloat(remainderPrepaySupplyamtVal) == "0"){
  491. var remainderPrepayPercentVal = 0.0; //잔여 선급 지급율
  492. }else{
  493. var remainderPrepayPercentVal = Number(remainderPrepaySupplyamtVal) / Number(conPrepayAmtVal) * 100; //잔여 선급 지급율
  494. }
  495. jQuery("#remainderPrepayPercent").val(remainderPrepayPercentVal.toFixed(1));
  496. jQuery("#remainderPrepaySupplyamt, #remainderPrepayVat, #remainderPrepayAmt").each(function(index){
  497. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  498. });
  499. //전회 실지급
  500. var payedApplyamtVal = Number(befAcmpApplyAmtVal) - Number(befPrepayApplyAmtVal); //전회 실지급 공급가액
  501. jQuery("#payedApplyamt").val(Number(payedApplyamtVal).toFixed(g_digit));
  502. var payedVatVal = Number(befAcmpVatVal) - Number(befPrepayVatVal); //전회 실지급 부가세
  503. jQuery("#payedVat").val(Number(payedVatVal).toFixed(g_digit));
  504. var payedAmtVal = Number(payedApplyamtVal) + Number(payedVatVal); //전회 실지급 합계
  505. jQuery("#payedAmt").val(Number(payedAmtVal).toFixed(g_digit));
  506. var payedPercentVal = Number(payedApplyamtVal) / Number(conConAmtVal) * 100; //전회 실지급 지급율
  507. jQuery("#payedPercent").val(payedPercentVal.toFixed(1));
  508. jQuery("#payedApplyamt, #payedVat, #payedAmt").each(function(index){
  509. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  510. });
  511. //금회 실지급
  512. var curReqAmtVal = Number(curAcmpApplyamtVal) - Number(curPrepayApplyamtVal); //금회 실지급 공급가액
  513. jQuery("#curReqAmt").val(Number(curReqAmtVal).toFixed(g_digit));
  514. //var curReqVatamtVal = parseFloat(curAcmpVatVal) - parseFloat(curPrepayVatVal); //금회 실지급 부가세
  515. if( jQuery("#bugase").val() == "INPUT_VAT" ){ //분계유형에따른 부가세 계산
  516. var curReqVatamtVal = curReqAmtVal / 100 * 10; //금회 실지급 부가세
  517. }else{
  518. var curReqVatamtVal = 0; //금회 실지급 부가세
  519. }
  520. jQuery("#curReqVatamt").val(Number(curReqVatamtVal).toFixed(g_digit));
  521. var curReqApplyamtVal = Number(curReqAmtVal) + Number(curReqVatamtVal); //금회 실지급 합계
  522. jQuery("#curReqApplyamt").val(Number(curReqApplyamtVal).toFixed(g_digit));
  523. var curReqPercentVal = Number(curReqAmtVal) / Number(conConAmtVal) * 100; //금회 실지급 지급율
  524. jQuery("#curReqPercent").val(curReqPercentVal.toFixed(1));
  525. jQuery("#curReqAmt, #curReqVatamt, #curReqApplyamt").each(function(index){
  526. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  527. });
  528. //누계 실지급
  529. var curPayedSupplyamtVal = Number(curBefAcmpSupplyamtVal) - Number(curBefPrepaySupplyamtVal); //누계 실지급 공급가액
  530. jQuery("#curPayedSupplyamt").val(Number(curPayedSupplyamtVal).toFixed(g_digit));
  531. var curPayedVatVal = Number(curBefAcmpVatVal) - Number(curBefPrepayVatVal); //누계 실지급 부가세
  532. jQuery("#curPayedVat").val(Number(curPayedVatVal).toFixed(g_digit));
  533. var curPayedAmtVal = Number(curPayedSupplyamtVal) + Number(curPayedVatVal); //누계 실지급 합계
  534. jQuery("#curPayedAmt").val(Number(curPayedAmtVal).toFixed(g_digit));
  535. var curPayedPercentVal = Number(curPayedSupplyamtVal) / Number(conConAmtVal) * 100; //누계 실지급 지급율
  536. jQuery("#curPayedPercent").val(curPayedPercentVal.toFixed(1));
  537. jQuery("#curPayedSupplyamt, #curPayedVat, #curPayedAmt").each(function(index){
  538. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  539. });
  540. //잔여 실지급
  541. var remainderSupplyamtVal = Number(remainderAcmpSupplyamtVal) - Number(remainderPrepaySupplyamtVal); //잔여 실지급 공급가액
  542. jQuery("#remainderSupplyamt").val(Number(remainderSupplyamtVal).toFixed(g_digit));
  543. var remainderVatVal = Number(remainderAcmpVatVal) - Number(remainderPrepayVatVal); //잔여 실지급 부가세
  544. jQuery("#remainderVat").val(Number(remainderVatVal).toFixed(g_digit));
  545. var remainderAmtVal = Number(remainderSupplyamtVal) + Number(remainderVatVal); //잔여 실지급 합계
  546. jQuery("#remainderAmt").val(Number(remainderAmtVal).toFixed(g_digit));
  547. var remainderPercentVal = Number(remainderSupplyamtVal) / Number(conConAmtVal) * 100; //잔여 실지급 지급율
  548. jQuery("#remainderPercent").val(remainderPercentVal.toFixed(1));
  549. jQuery("#remainderSupplyamt, #remainderVat, #remainderAmt").each(function(index){
  550. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  551. });
  552. //잔여가 0이면 잔급으로 설정
  553. //setDepostiCd(); //2019.08.02 사용자가 선택 후 아래에서 금액 변경 시 자동으로 바뀌면서 혼란이 생김
  554. //하자이행율이 100%이상이면 보증정보 표시
  555. setGuarOutList();
  556. });
  557. //보증정보팝업 호출
  558. jQuery("#contOutWarr").click(function() {
  559. if(jQuery("#prepayId").val() == ""){
  560. alert("데이터를 저장 후, 보증정보를 입력할 수가 있습니다.");
  561. return;
  562. }
  563. var param = "";
  564. var param = "?subContModId=" + jQuery("#subContModId").val();
  565. var param = param + "&warrGubun=3";
  566. //var param = param + "&warrSeq=" + jQuery("#warrSeq").val();
  567. var param = param + "&warrSeq=1";
  568. var url = "/payment/outside/ContOutWarrPopup.screen"+param;
  569. result = window.showModalDialog(url,'contOutWarr','dialogWidth:550px;dialogHeight:540px;center:yes;help:no;status:no;scroll:no;resizable:no');
  570. callback_getContWarr();
  571. });
  572. jQuery("#btnMRR").click(function () {
  573. var f = document.form1;
  574. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_MRR_FILE", f);
  575. });
  576. jQuery("#btnContCopy").click(function () {
  577. var f = document.form1;
  578. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_CONT_COPY_FILE", f);
  579. });
  580. pageinit();
  581. }
  582. //페이지 초기처리
  583. function pageinit(){
  584. //대금신청(신청상태)
  585. //setAmountData();
  586. //작성일자(증빙일자)
  587. seTaxDate();
  588. //신청구분 선택불가
  589. //appDivSet();
  590. //입력항목 초기처리
  591. //inputDataSet();
  592. //발행방법에 따른 페이지 셋팅
  593. taxDataSet();
  594. //버튼표시 셋팅
  595. btnCtr();
  596. //상태에 따른 입력항목 readOnly
  597. inputReadOnlyset();
  598. getFileListForTextarea();
  599. setTimeout(function() {
  600. getPaymentList();
  601. }, 500);
  602. //하자이행보증정보 view유무
  603. setGuarOutList();
  604. }
  605. function setGuarOutList(){
  606. var defEstGuarRateValue = Number(jQuery("#defEstGuarRate").val()); //하자보수보증금율
  607. var preFundRateValue = Number(jQuery("#befAcmpPercent").val()); //전회 누계기성율
  608. //var preFundRateValue = 90; //전회 누계기성율
  609. var checkRate1 = defEstGuarRateValue + preFundRateValue;
  610. var totFundRateValue = Number(jQuery("#curBefAcmpPercent").val()); //누계기성율
  611. var checkRate2 = defEstGuarRateValue + totFundRateValue;
  612. var acmpNoValue = jQuery("#depositSeq").val(); //지급차수
  613. if(Number(checkRate1) > 100){
  614. jQuery('#warr1').show();
  615. jQuery('#warr2').show();
  616. }else if(Number(checkRate2) > 100){
  617. jQuery('#warr1').show();
  618. jQuery('#warr2').show();
  619. }else{
  620. jQuery('#warr1').hide();
  621. jQuery('#warr2').hide();
  622. }
  623. }
  624. //대금내역 조회
  625. function getPaymentList(){
  626. jQuery("#fevent").val("GET_LIST");
  627. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/PayItemResult_sheet.screen";
  628. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 1000, "");
  629. }
  630. //시트 설정
  631. function gridInit(sheetName){
  632. var init_sheet = {};
  633. init_sheet.Cfg = {SearchMode:2, Page:1000, MergeSheet:msHeaderOnly};
  634. init_sheet.Cols = [
  635. {Header:'입고번호|입고번호', Type:"Text", SaveName:"STOCK_NO", Width:110, Align:"Left"},
  636. {Header:'자재코드|자재코드', Type:"Text", SaveName:"MATERIAL_CD", Width:110, Align:"Center"},
  637. {Header:'자재명|자재명', Type:"Text", SaveName:"MATERIAL_NAME", Width:110, Align:"Left"},
  638. {Header:'규격|규격', Type:"Text", SaveName:"MATERIAL_SPEC", Width:50, Align:"Left"},
  639. {Header:'단위|단위', Type:"Text", SaveName:"UNIT_KIND", Width:45, Align:"Center"},
  640. {Header:'수량|수량', Type:"Int", SaveName:"ITEM_QTY", Width:55, Align:"Right", Format:"Integer"},
  641. {Header:'KRW|단가', Type:"Int", SaveName:"ITEM_PRI", Width:50, Align:"Right", Format:"Integer"},
  642. {Header:'KRW|금액', Type:"AutoSum", SaveName:"ITEM_AMT", Width:50, Align:"Right", Format:"Integer"},
  643. {Header:'<%=prePayment.get("CURRENCY_GB")%>|단가', Type:"Text", SaveName:"EXC_PRI", Width:50, Align:"Right", Format:"Integer"},
  644. {Header:'<%=prePayment.get("CURRENCY_GB")%>|금액', Type:"AutoSum", SaveName:"EXC_AMT", Width:50, Align:"Right", Format:"Float"}
  645. ];
  646. init_sheet.HeaderMode = {Sort:1};
  647. IBS_InitSheet(sheetName, init_sheet);
  648. sheetName.SetDataAutoTrim(0);
  649. sheetName.SetEditable(false);
  650. //sheetName.SetDataLinkMouse("CST_DOC_NAME", 1);
  651. setGridSize();
  652. }
  653. function sheet1_OnSearchEnd(code, message) {
  654. if(code == 0) {
  655. setGridSize();
  656. } else {
  657. //조회 에러 수행
  658. alert(message);
  659. }
  660. }
  661. function setGridSize() {
  662. sheet1.FitColWidth();
  663. }
  664. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  665. }
  666. //신청대상일때 계약선급금액을 선급신청금액에 초기 입력한다.
  667. function setAmountData() {
  668. if(jQuery("#statusCd").val() == "00"){ //신청대상
  669. var subPrepaySupplyTamtValue = jQuery("#subPrepaySupplyTamt").val(); //계약 선급금액
  670. jQuery("#reqPrepaySupplyTamt").val(subPrepaySupplyTamtValue); //선급 신청금액
  671. var subPrepaySupplyNamtValue = jQuery("#subPrepaySupplyNamt").val(); //계약 면세금액
  672. jQuery("#reqPrepaySupplyNamt").val(subPrepaySupplyNamtValue); //선급 면세금액
  673. }
  674. }
  675. function appDivSet() {
  676. jQuery("#perpayReqDiv").attr("disabled", true);
  677. jQuery("#reqPrepaySupplyTamt, #reqPrepaySupplyNamt").blur();
  678. }
  679. function seTaxDate(){
  680. var newDay = new Date( get_year(), get_month(), "");
  681. var lastDay = newDay.getDate();
  682. var yyyymmdd = get_year() +'-'+ get_month() +"-"+ lastDay;
  683. if(jQuery('#date1').val() == ""){
  684. jQuery('#date1').val(yyyymmdd);
  685. }
  686. jQuery('#lastDate').val(yyyymmdd);
  687. }
  688. function btnCtr(){
  689. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  690. if(radioCheck == "3"){ //Invoice
  691. if(jQuery("#statusCd").val() == "00" || jQuery("#statusCd").val() == "" || jQuery("#statusCd").val() == "01" || jQuery("#statusCd").val() == "99"){
  692. jQuery("#spanBtnSave").show();
  693. jQuery("#spanBtnRejection1").show();
  694. jQuery("#spanBtnDelete").hide();
  695. jQuery("#spanBtnAppReq").hide();
  696. jQuery("#spanBtnApproval").hide();
  697. jQuery("#spanBtnInvoiceApproval").show();
  698. jQuery("#spanBtnRejection").hide();
  699. jQuery("#spanBtnList").show();
  700. jQuery("#spanTaxSave").hide();
  701. }else {
  702. jQuery("#spanBtnSave").hide();
  703. jQuery("#spanBtnRejection1").hide();
  704. jQuery("#spanBtnDelete").hide();
  705. jQuery("#spanBtnAppReq").hide();
  706. jQuery("#spanBtnApproval").hide();
  707. jQuery("#spanBtnInvoiceApproval").hide();
  708. jQuery("#spanBtnRejection").hide();
  709. jQuery("#spanBtnList").show();
  710. jQuery("#spanTaxSave").hide();
  711. }
  712. }else{
  713. if(jQuery("#statusCd").val() == "00" || jQuery("#statusCd").val() == ""){ //00:신청대상는 목록, 삭제, 저장 표시
  714. jQuery("#spanBtnList").show();
  715. jQuery("#spanBtnDelete").hide();
  716. jQuery("#spanBtnSave").show();
  717. jQuery("#spanBtnRejection1").show();
  718. jQuery("#spanBtnRejection").hide();
  719. jQuery("#spanBtnApproval").hide();
  720. jQuery("#spanBtnInvoiceApproval").hide();
  721. jQuery("#spanBtnAppReq").hide();
  722. jQuery("#spanGubSave").hide();
  723. jQuery("#spanTaxSave").hide();
  724. //jQuery("#purSuppFixAppr").show();
  725. }
  726. if(jQuery("#statusCd").val() == "01"){ //01:작성상태는 목록, 삭제, 저장, 대금신청요청 표시
  727. jQuery("#spanBtnList").show();
  728. jQuery("#spanBtnDelete").hide();
  729. jQuery("#spanBtnSave").show();
  730. jQuery("#spanBtnRejection1").show();
  731. jQuery("#spanBtnRejection").hide();
  732. jQuery("#spanBtnApproval").hide();
  733. if(radioCheck == "1"){
  734. jQuery("#spanBtnInvoiceApproval").hide(); //추후 숨김으로
  735. }else{
  736. jQuery("#spanBtnInvoiceApproval").show(); //추후 숨김으로
  737. }
  738. jQuery("#spanBtnAppReq").show();
  739. jQuery("#spanGubSave").hide();
  740. jQuery("#spanTaxSave").hide();
  741. //jQuery("#purSuppFixAppr").show();
  742. }
  743. if(jQuery("#statusCd").val() == "02"){ //02:대금요청상태는 목록, 삭제, 저장, 대금신청요청 표시
  744. jQuery("#spanBtnList").show();
  745. jQuery("#spanBtnDelete").hide();
  746. jQuery("#spanBtnSave").show();
  747. jQuery("#spanBtnRejection1").show();
  748. jQuery("#spanBtnRejection").hide();
  749. jQuery("#spanBtnApproval").hide();
  750. if(radioCheck == "1"){
  751. jQuery("#spanBtnInvoiceApproval").hide(); //추후 숨김으로
  752. }else{
  753. jQuery("#spanBtnInvoiceApproval").show(); //추후 숨김으로
  754. }
  755. jQuery("#spanBtnAppReq").show();
  756. jQuery("#spanGubSave").hide();
  757. jQuery("#spanTaxSave").hide();
  758. //jQuery("#purSuppFixAppr").show();
  759. }
  760. if(jQuery("#statusCd").val() == "03"){ //03:대금신청상태는 목록, 반려, 결재
  761. jQuery("#spanBtnList").show();
  762. jQuery("#spanBtnDelete").hide();
  763. jQuery("#spanBtnSave").hide();
  764. jQuery("#spanBtnRejection1").show();
  765. jQuery("#spanBtnRejection").show();
  766. jQuery("#spanBtnApproval").show();
  767. jQuery("#spanBtnInvoiceApproval").hide();
  768. jQuery("#spanBtnAppReq").show(); //2019.05.13 대금신청후 다시 대금신청
  769. jQuery("#spanGubSave").show();
  770. jQuery("#spanTaxSave").show();
  771. //jQuery("#purSuppFixAppr").show();
  772. }
  773. if(jQuery("#statusCd").val() == "04"){ //04:결재중상태는 목록
  774. jQuery("#spanBtnList").show();
  775. jQuery("#spanBtnDelete").hide();
  776. jQuery("#spanBtnSave").hide();
  777. jQuery("#spanBtnRejection1").hide();
  778. jQuery("#spanBtnRejection").hide();
  779. jQuery("#spanBtnApproval").hide();
  780. jQuery("#spanBtnInvoiceApproval").hide();
  781. jQuery("#spanBtnAppReq").hide();
  782. jQuery("#spanGubSave").hide();
  783. jQuery("#spanTaxSave").hide();
  784. //jQuery("#purSuppFixAppr").show();
  785. }
  786. if(jQuery("#statusCd").val() == "10"){ //10:결재완료상태는 목록
  787. jQuery("#spanBtnList").show();
  788. jQuery("#spanBtnDelete").hide();
  789. jQuery("#spanBtnSave").hide();
  790. jQuery("#spanBtnRejection1").hide();
  791. jQuery("#spanBtnRejection").hide();
  792. jQuery("#spanBtnApproval").hide();
  793. jQuery("#spanBtnInvoiceApproval").hide();
  794. jQuery("#spanBtnAppReq").hide();
  795. jQuery("#spanGubSave").hide();
  796. jQuery("#spanTaxSave").hide();
  797. //jQuery("#purSuppFixAppr").show();
  798. }
  799. if(jQuery("#statusCd").val() == "99"){ //99:반려상태는 목록, 삭제, 저장, 대금신청요청 표시
  800. jQuery("#spanBtnList").show();
  801. jQuery("#spanBtnDelete").hide();
  802. jQuery("#spanBtnSave").show();
  803. jQuery("#spanBtnRejection").hide();
  804. jQuery("#spanBtnApproval").hide();
  805. jQuery("#spanBtnInvoiceApproval").hide();
  806. jQuery("#spanBtnAppReq").show();
  807. jQuery("#spanGubSave").hide();
  808. jQuery("#spanTaxSave").hide();
  809. //jQuery("#purSuppFixAppr").show();
  810. }
  811. if(jQuery("#statusCd").val() == "91"){ //99:반려상태는 목록, 삭제, 저장, 대금신청요청 표시
  812. jQuery("#spanBtnList").show();
  813. jQuery("#spanBtnDelete").show();
  814. jQuery("#spanBtnSave").hide();
  815. jQuery("#spanBtnRejection").hide();
  816. jQuery("#spanBtnApproval").hide();
  817. jQuery("#spanBtnInvoiceApproval").hide();
  818. jQuery("#spanBtnAppReq").hide();
  819. jQuery("#spanGubSave").hide();
  820. jQuery("#spanTaxSave").hide();
  821. }
  822. }
  823. var curBefAcmpPercent = Number(jQuery("#curBefAcmpPercent").val());
  824. if(curBefAcmpPercent > 99.9999999){
  825. jQuery("#purSuppFixAppr").show();
  826. }
  827. }
  828. function inputReadOnlyset() {
  829. //분개유형 비활성화
  830. var acctGb = '<%=ContInfo.get("acct_gb")%>';
  831. jQuery('#acct_gb').attr('disabled', 'true');
  832. /* if(acctGb == '1' || acctGb == '2' || acctGb == '3' ){
  833. jQuery('#proof_cd').attr('disabled', 'true');
  834. jQuery('#pay_group').attr('disabled', 'true');
  835. jQuery('#payment_terms_id').attr('disabled', 'true');
  836. jQuery("#spanGubSave").css("display", "none");
  837. } */
  838. //2016.6.9 원화일때 PAYMENT TERMS수정불가
  839. if(jQuery("#conCurCd").val() == "KRW"){
  840. jQuery("#payment_terms_id").attr("disabled",'true');
  841. jQuery("#pay_group").attr("disabled",'true');
  842. }
  843. if(jQuery("#conCurCd").val() == "KRW"){
  844. jQuery("#chk_3").attr("disabled",true);
  845. }
  846. if (jQuery("#statusCd").val() == "10" || jQuery("#statusCd").val() == "04") { //입력불가상태
  847. jQuery("#userName").attr("readonly", true);
  848. jQuery("#userName").css({'background-color' : '#F0F0F0'});
  849. jQuery("#userName").css({'border' : '1px solid #bcbcbc'});
  850. jQuery("#hp").attr("readonly", true);
  851. jQuery("#hp").css({'background-color' : '#F0F0F0'});
  852. jQuery("#hp").css({'border' : '1px solid #bcbcbc'});
  853. jQuery("#eMail").attr("readonly", true);
  854. jQuery("#eMail").css({'background-color' : '#F0F0F0'});
  855. jQuery("#eMail").css({'border' : '1px solid #bcbcbc'});
  856. jQuery("#curAcmpVat").attr("readonly", true);
  857. jQuery("#curAcmpVat").css({'background-color' : '#F0F0F0'});
  858. jQuery("#curAcmpVat").css({'border' : '1px solid #bcbcbc'});
  859. jQuery("#curPrepayApplyamt").attr("readonly", true);
  860. jQuery("#curPrepayApplyamt").css({'background-color' : '#F0F0F0'});
  861. jQuery("#curPrepayApplyamt").css({'border' : '1px solid #bcbcbc'});
  862. /*
  863. jQuery("#curReqVatamt").attr("readonly", true);
  864. jQuery("#curReqVatamt").css({'background-color' : '#F0F0F0'});
  865. jQuery("#curReqVatamt").css({'border' : '1px solid #bcbcbc'});
  866. */
  867. jQuery("#curPrepayVat").attr("readonly", true);
  868. jQuery("#curPrepayVat").css({'background-color' : '#F0F0F0'});
  869. jQuery("#curPrepayVat").css({'border' : '1px solid #bcbcbc'});
  870. //jQuery("#selectDepositCd").attr("disabled", true);
  871. }else if(jQuery("#statusCd").val() == "03"){
  872. jQuery("#curAcmpVat").attr("readonly", true);
  873. jQuery("#curAcmpVat").css({'background-color' : '#F0F0F0'});
  874. jQuery("#curAcmpVat").css({'border' : '1px solid #bcbcbc'});
  875. jQuery("#curPrepayApplyamt").attr("readonly", true);
  876. jQuery("#curPrepayApplyamt").css({'background-color' : '#F0F0F0'});
  877. jQuery("#curPrepayApplyamt").css({'border' : '1px solid #bcbcbc'});
  878. jQuery("#curPrepayVat").attr("readonly", true);
  879. jQuery("#curPrepayVat").css({'background-color' : '#F0F0F0'});
  880. jQuery("#curPrepayVat").css({'border' : '1px solid #bcbcbc'});
  881. /*
  882. jQuery("#curReqVatamt").attr("readonly", true);
  883. jQuery("#curReqVatamt").css({'background-color' : '#F0F0F0'});
  884. jQuery("#curReqVatamt").css({'border' : '1px solid #bcbcbc'});
  885. */
  886. //jQuery("#selectDepositCd").attr("disabled", true);
  887. }
  888. //WarrantyDiv();
  889. }
  890. function taxDataSet(){
  891. //통화가KRW가 아니고 분계유형에 증빙종류[기타]이면 invlice고정
  892. var conCurCd = jQuery("#conCurCd").val();
  893. var proof_cd = jQuery("#proof_cd option:selected").val();
  894. if(conCurCd != "KRW" && proof_cd == "Z99"){
  895. //jQuery("#chk_3").attr("checked", true);
  896. jQuery("#chk_1").attr("disabled",true);
  897. jQuery("#chk_2").attr("disabled",true);
  898. }else if(conCurCd != "KRW" && proof_cd != "Z99"){
  899. jQuery("#chk_3").attr("disabled",true);
  900. }
  901. /* var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  902. if (radioCheck == "1") { //역발행
  903. jQuery("#taxAttachments").hide();
  904. jQuery("#taxTrRow").hide();
  905. jQuery("#invoiceAttachments").hide();
  906. jQuery("#invoiceTrRow").hide();
  907. } else if (radioCheck == "2"){ //순발행
  908. jQuery("#taxAttachments").show();
  909. jQuery("#taxTrRow").show();
  910. jQuery("#invoiceAttachments").hide();
  911. jQuery("#invoiceTrRow").hide();
  912. }else{
  913. jQuery("#taxAttachments").hide();
  914. jQuery("#taxTrRow").hide();
  915. jQuery("#invoiceAttachments").show();
  916. jQuery("#invoiceTrRow").show();
  917. } */
  918. btnCtr();
  919. }
  920. //잔여/중도금 설정
  921. function setDepostiCd(){
  922. var remainderAcmpAmtValue = jQuery("#remainderAcmpAmt").val(); //기성고_잔여_합계
  923. if(Number(remainderAcmpAmtValue) == 0){
  924. jQuery("#selectDepositCd").val("3"); //잔금
  925. }else{
  926. jQuery("#selectDepositCd").val("2"); //중도금
  927. }
  928. }
  929. function inputDataSet(){
  930. jQuery("#perpayReqDiv").attr("disabled",true);
  931. if(jQuery("#perpayReqDiv option:selected").val() == "1"){
  932. jQuery("#giveAmt").val("0"); //선급_포기금액_합계
  933. jQuery("#reqPrepayAmt").attr("readonly",true);
  934. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  935. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  936. jQuery("#reqPrepayAmt").val(jQuery("#perpayAmt").val());
  937. jQuery("#giveSupplyTamt").val("0"); //선급_포기금액_과세
  938. jQuery("#reqPrepaySupplyTamt").attr("readonly",true);
  939. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#dedede'});
  940. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #bcbcbc'});
  941. jQuery("#reqPrepaySupplyTamt").val(jQuery("#subPrepaySupplyTamt").val());
  942. jQuery("#giveSupplyNamt").val("0"); //선급_포기금액_면세
  943. jQuery("#reqPrepaySupplyNamt").attr("readonly",true);
  944. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  945. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  946. jQuery("#reqPrepaySupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  947. jQuery("#giveSurtaxAmt").val("0"); //선급_포기금액_부가세
  948. jQuery("#reqPrepaySurtaxAmt").attr("readonly",true);
  949. jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  950. jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  951. jQuery("#reqPrepaySurtaxAmt").val(jQuery("#subPrepaySurtaxAmt").val());
  952. jQuery("#givePercent").val("0.0");
  953. var reqPrepayAmt = jQuery("#reqPrepayAmt").val();
  954. reqPrepayAmt = reqPrepayAmt.replace(/(\,|\:)/g,"");
  955. var conAmt = jQuery("#conAmt").val();
  956. conAmt = conAmt.replace(/(\,|\:)/g,"");
  957. var givePercent = (reqPrepayAmt / conAmt) * 100;
  958. jQuery("#reqPrepayPercent").val(givePercent.toFixed(1));
  959. giveDataSet();
  960. warrCtr('S'); //S:보이기, H:숨기기
  961. }else if(jQuery("#perpayReqDiv option:selected").val() == "2"){
  962. jQuery("#reqPrepayAmt").attr("readonly",true);
  963. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  964. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  965. jQuery("#reqPrepaySupplyTamt").attr("readonly",false);
  966. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#ffffff'});
  967. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #595a5a'});
  968. if(jQuery("#conSupplyNamt").val() == "0"){
  969. jQuery("#reqPrepaySupplyNamt").attr("readonly",true);
  970. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  971. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  972. }else{
  973. jQuery("#reqPrepaySupplyNamt").attr("readonly",false);
  974. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#ffffff'});
  975. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #595a5a'});
  976. }
  977. jQuery("#reqPrepaySurtaxAmt").attr("readonly",true);
  978. jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  979. jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  980. jQuery("#reqPrepaySupplyTamt").val(jQuery("#orgReqPrepaySupplyTamt").val());
  981. jQuery("#reqPrepaySupplyNamt").val(jQuery("#orgReqPrepaySupplyNamt").val());
  982. jQuery("#reqPrepaySupplyTamt").blur();
  983. giveDataSet();
  984. warrCtr('S'); //S:보이기, H:숨기기
  985. }else if(jQuery("#perpayReqDiv option:selected").val() == "3"){
  986. jQuery("#reqPrepayAmt").val("0"); //선급_신청금액_합계
  987. jQuery("#reqPrepayAmt").attr("readonly",true);
  988. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  989. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  990. jQuery("#giveAmt").val(jQuery("#perpayAmt").val());
  991. jQuery("#reqPrepaySupplyTamt").val("0"); //선급_신청금액_과세
  992. jQuery("#reqPrepaySupplyTamt").attr("readonly",true);
  993. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#dedede'});
  994. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #bcbcbc'});
  995. jQuery("#giveSupplyTamt").val(jQuery("#subPrepaySupplyTamt").val());
  996. jQuery("#reqPrepaySupplyNamt").val("0"); //선급_신청금액_면세
  997. jQuery("#reqPrepaySupplyNamt").attr("readonly",true);
  998. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  999. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  1000. jQuery("#giveSupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  1001. jQuery("#reqPrepaySurtaxAmt").val("0"); //선급_신청금액_부가세
  1002. jQuery("#reqPrepaySurtaxAmt").attr("readonly",true);
  1003. jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  1004. jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  1005. jQuery("#giveSurtaxAmt").val(jQuery("#subPrepaySurtaxAmt").val());
  1006. jQuery("#reqPrepayPercent").val("0.0");
  1007. var giveAmt = jQuery("#giveAmt").val();
  1008. giveAmt = giveAmt.replace(/(\,|\:)/g,"");
  1009. var conAmt = jQuery("#conAmt").val();
  1010. conAmt = conAmt.replace(/(\,|\:)/g,"");
  1011. var givePercent = (giveAmt / conAmt) * 100;
  1012. jQuery("#givePercent").val(givePercent.toFixed(1));
  1013. giveDataSet();
  1014. //포기일때 보증정보는 필요없으므로 숨김처ㅣ
  1015. warrCtr('H'); //S:보이기, H:숨기기
  1016. }
  1017. }
  1018. function warrCtr(gubun){
  1019. if (gubun == "H") { //숨김
  1020. var warrWamt = jQuery("#warrWamt").val().replace(/(\,|\:)/g, "");
  1021. if(warrWamt == "0" || warrWamt == ""){
  1022. jQuery('#warr1').slideUp();
  1023. jQuery('#warr2').slideUp();
  1024. }else{
  1025. alert("보증정보가 존재합니다.");
  1026. //jQuery("#reqPrepaySupplyTamt").val(jQuery("#warrWamt").val());
  1027. }
  1028. } else {
  1029. jQuery('#warr1').show("slow");
  1030. jQuery('#warr2').show("slow");
  1031. }
  1032. }
  1033. function reDisplay() {
  1034. jQuery("#fevent").val("");
  1035. jQuery("#form1").attr("action", "/payment/purchase/PayItemResult.screen");
  1036. jQuery("#form1").attr("target", "_self");
  1037. jQuery("#form1").attr("method", "post");
  1038. jQuery("#form1").submit();
  1039. }
  1040. //저장 및 대금 신청시 필수항목 Check
  1041. function requiredItemsCheck(){
  1042. var date1 = jQuery('#date1').val(); //작성일자(증빙일자)
  1043. var userName = jQuery('#userName').val(); //담당자명
  1044. var hp = jQuery('#hp').val(); //담당자 핸드폰번호
  1045. var eMail = jQuery('#eMail').val(); //담당자 이메일
  1046. if(date1 == "" ){
  1047. alert("입력필수입니다.");
  1048. jQuery('#date1').focus();
  1049. return false;
  1050. }
  1051. if(userName == ""){
  1052. alert("담당자명은 입력필수입니다.");
  1053. jQuery('#userName').focus();
  1054. return false;
  1055. }
  1056. if(hp == ""){
  1057. alert("담당자 핸드폰 번호는 입력필수입니다.");
  1058. jQuery('#hp').focus();
  1059. return false;
  1060. }/*else{
  1061. var rgEx = /(01[016789])[-](\d{4}|\d{3})[-]\d{4}$/g;
  1062. var strValue = hp;
  1063. var chkFlg = rgEx.test(strValue);
  1064. if(!chkFlg){
  1065. alert("올바른 휴대폰번호가 아닙니다.");
  1066. jQuery('#hp').focus();
  1067. return false;
  1068. }
  1069. }계약서에 명시된 번호이므로 신뢰. 2019.04.24*/
  1070. if(eMail == ""){
  1071. alert("담당자 이메일은 입력필수입니다.");
  1072. jQuery('#eMail').focus();
  1073. return false;
  1074. }else{
  1075. 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})(\]?)$/;
  1076. if(!regEmail.test(eMail)) {
  1077. alert('올바른 이메일 주소가 아닙니다.');
  1078. jQuery('#eMail').focus();
  1079. return false;
  1080. }
  1081. }
  1082. //금액Check처리
  1083. var remainderAcmpAmtValue = jQuery("#remainderAcmpAmt").val(); //기성고_잔여_합게
  1084. var remainderPrepayAmtValue = jQuery("#remainderPrepayAmt").val(); //선급금공제_잔여_합게
  1085. var curReqVatamtValue = jQuery("#curReqVatamt").val().replace(/(\,|\:)/g,""); //청구액_금회_부가세
  1086. if(Number(remainderAcmpAmtValue) < 0 || Number(remainderPrepayAmtValue) < 0 || Number(curReqVatamtValue) < 0){
  1087. alert("금액을 확인바랍니다.");
  1088. return false;
  1089. }
  1090. //2016.5.25 기성잔여가 0일때, 선급금이 0이 아니면
  1091. if(Number(remainderAcmpAmtValue) == 0 && Number(remainderPrepayAmtValue) != 0 ){
  1092. alert("선급공제 잔여액을 확인바랍니다.");
  1093. return false;
  1094. }
  1095. if(jQuery("#proof_cd").val() == "Z99"){
  1096. if(Number(curReqVatamtValue) > 0 ){
  1097. alert("청구액 금회 부가세가 0이여야 합니다");
  1098. return false;
  1099. }
  1100. }
  1101. if(jQuery("#btnAppReqSelect").val() == "1"){ //대신청요청시에는 해당하는 첨부파일이 모드 등록되어있어야함.
  1102. //01:작성중, 02:대금요청, 03:대금신청, 04:결재, 10:결재완료, 99:반려
  1103. /* if (jQuery("#perpayReqDiv").val() == "1") { //선급신청
  1104. jQuery("#selectStatusCd").val("20");
  1105. } else if (jQuery("#perpayReqDiv").val() == "2") { //부분신청
  1106. jQuery("#selectStatusCd").val("20");
  1107. } else if (jQuery("#perpayReqDiv").val() == "3") { //포기신청
  1108. jQuery("#selectStatusCd").val("21");
  1109. } else {
  1110. alert("신청구분을 선택하세요");
  1111. return;
  1112. } */
  1113. }
  1114. }
  1115. //저장 및 대금 신청시 필수항목 Check
  1116. function contChgPayCheck(){
  1117. var pur_cont_mod_id = "<%=prePayment.get("PUR_CONT_MOD_ID") %>";
  1118. var max_pur_cont_mod_id = "<%=prePayment.get("MAX_PUR_CONT_MOD_ID") %>"
  1119. var max_status_cd = "<%=prePayment.get("MAX_STATUS_CD") %>"
  1120. if(pur_cont_mod_id != max_pur_cont_mod_id){
  1121. if(max_status_cd == "00" || max_status_cd == "01" || max_status_cd == "03"){ //00(계약대상),01(결재중),03(반려)
  1122. if (!confirm("본건은 변경시행결의 승인 전 구매대금 신청건 입니다.\n진행 하시겠습니까?"))
  1123. {
  1124. return false;
  1125. }
  1126. }
  1127. }
  1128. }
  1129. function doResult(resultObj) {
  1130. try {
  1131. if( resultObj.getRequestEvent() == "SAVE_DATA" || resultObj.getRequestEvent() == "SAVE_SEGUM" || resultObj.getRequestEvent() == "SAVE_GUA") {
  1132. if( resultObj.getSuccess() ) {
  1133. document.form1.isSubmit = false;
  1134. if(jQuery("#btnAppReqSelect").val() == "0"){
  1135. alert("저장되었습니다.");
  1136. //jQuery("#btnList").click();
  1137. reDisplay();
  1138. }else if (jQuery("#btnAppReqSelect").val() == "1"){
  1139. jQuery("#btnAppReqSelect").val("0");
  1140. btnAppReqProcess();
  1141. } else {
  1142. jQuery("#btnAppReqSelect").val("0");
  1143. approvalStart();
  1144. }
  1145. }else {
  1146. dlgErrorMsg(resultObj);
  1147. }
  1148. document.form1.isSubmit = false;
  1149. }
  1150. if( resultObj.getRequestEvent() == "DELETE_DATA" ) {
  1151. if( resultObj.getSuccess() ) {
  1152. alert("삭제되었습니다.");
  1153. jQuery("#btnList").click();
  1154. }else {
  1155. dlgErrorMsg(resultObj);
  1156. }
  1157. document.form1.isSubmit = false;
  1158. }
  1159. if( resultObj.getRequestEvent() == "REQ_DATA" ) {
  1160. if( resultObj.getSuccess() ) {
  1161. alert("신청요청하였습니다.");
  1162. jQuery("#btnList").click();
  1163. }else {
  1164. dlgErrorMsg(resultObj);
  1165. }
  1166. document.form1.isSubmit = false;
  1167. }
  1168. if( resultObj.getRequestEvent() == "BUDGET_CHECK" ) {
  1169. var vo = resultObj.getValueObject();
  1170. var check = vo.get('checkFlag');
  1171. if(check == 0){
  1172. document.form1.isSubmit = false;
  1173. // 예산통제하지 않는 현장은 저장
  1174. //approvalStart();
  1175. //저장처리
  1176. saveData();
  1177. }else{
  1178. document.form1.isSubmit = false;
  1179. // 예산통제하는 현장일 경우 집행내역 코드로 예산금액과 전체실적누계, 금회지급액을 구한다
  1180. //getBudgetControlAMT();2018.11.26 GET_BUDGET_AMT 확인해제. check ==0으로 처리.
  1181. }
  1182. }
  1183. if(resultObj.getRequestEvent() == "SAVE_ATTC"){
  1184. document.form1.isSubmit = false;
  1185. approvalRun();
  1186. }
  1187. if(resultObj.getRequestEvent() == "GET_BUDGET_AMT"){
  1188. // 구해온 금액을 가지고 예산과 실적을 비교한다
  1189. var vo = resultObj.getValueObject();
  1190. document.form1.isSubmit = false;
  1191. doBudgetAmtResult(vo);
  1192. }
  1193. if( resultObj.getRequestEvent() == "SAVE_DRAFT" ) {
  1194. //document.form1.draft_div_id.value = "";
  1195. document.form1.isSubmit = false;
  1196. if( resultObj.getSuccess() ) {
  1197. var status = resultObj.getMessage();
  1198. if(status == '1'){
  1199. //approvalRun();
  1200. }else if(status == '2'){
  1201. alert("결재할수 없습니다. 확인바랍니다.");
  1202. }else{
  1203. //approvalRun();
  1204. }
  1205. }else {
  1206. dlgErrorMsg(resultObj);
  1207. }
  1208. }
  1209. if( resultObj.getRequestEvent() == "GET_ATTACHFILE" ) {
  1210. if( resultObj.getSuccess() ) {
  1211. document.form1.p_AttachFile.value = resultObj.getValueObject().get("AttachFile");
  1212. }else {
  1213. dlgErrorMsg(resultObj);
  1214. }
  1215. document.form1.isSubmit = false;
  1216. }
  1217. if( resultObj.getRequestEvent() == "CHK_REJECT" ) {
  1218. var vo = resultObj.getValueObject();
  1219. var check = vo.get('checkFlag');
  1220. if(check == 0){ //가능
  1221. document.form1.isSubmit = false;
  1222. runRejection();
  1223. }else{
  1224. document.form1.isSubmit = false;
  1225. alert("이미 결제중입니다.");
  1226. }
  1227. }
  1228. if( resultObj.getRequestEvent() == "CHK_APPVAR" ) {
  1229. var vo = resultObj.getValueObject();
  1230. var check = vo.get('checkFlag');
  1231. if(check == 0){ //가능
  1232. document.form1.isSubmit = false;
  1233. if (jQuery("#btnAppReqSelect").val() == "2") { //Invoice결재
  1234. runBudgetCheck();
  1235. //runInvoice();
  1236. } else {
  1237. jQuery("#btnAppReqSelect").val("0");
  1238. runBudgetCheck();
  1239. }
  1240. }else{
  1241. if(check == 99){
  1242. document.form1.isSubmit = false;
  1243. //alert("첨부파일 세금계산서 OR Invoice가 없습니다.");
  1244. if (jQuery("#btnAppReqSelect").val() == "2") { //Invoice결재
  1245. if( jQuery(':radio[name="chk_info"]:checked').val() == "2" || jQuery(':radio[name="chk_info"]:checked').val() == "3" ){
  1246. alert("경영정보시스템의 전표상신 화면에서 세금계산서 첨부 후 완료 바랍니다.\n\r \n\r※ 세금계산서 첨부후 승인작업을 하지 않을경우 재경팀으로 대금정보가 이관 되지 않습니다.");
  1247. //runInvoice();
  1248. runBudgetCheck();
  1249. }
  1250. }
  1251. }else{
  1252. document.form1.isSubmit = false;
  1253. alert("이미 결제중입니다.");
  1254. }
  1255. }
  1256. }
  1257. if( resultObj.getRequestEvent() == "GET_RATE" ) {
  1258. var vo = resultObj.getValueObject();
  1259. document.form1.isSubmit = false;
  1260. var rate = vo.get('rate');
  1261. var rateAmt = vo.get('rateAmt');
  1262. var rateVamt = vo.get('rateVamt');
  1263. jQuery("#rateEx").val(rate);
  1264. jQuery("#rateAmt").val(rateAmt);
  1265. jQuery("#rateVamt").val(rateVamt);
  1266. jQuery("#rateAmt, #rateVamt").each(function(index) { //#rateEx,
  1267. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  1268. });
  1269. }
  1270. if( resultObj.getRequestEvent() == "SAVE_MRR_FILE" ) {
  1271. if( resultObj.getSuccess() ) {
  1272. alert("MRR 문서가 생성되었습니다.");
  1273. document.form1.isSubmit = false;
  1274. getFileListForTextarea();
  1275. }else {
  1276. dlgErrorMsg(resultObj);
  1277. }
  1278. }
  1279. if( resultObj.getRequestEvent() == "SAVE_CONT_COPY_FILE" ) {
  1280. if( resultObj.getSuccess() ) {
  1281. alert("계약서 사본을 첨부하였습니다.");
  1282. document.form1.isSubmit = false;
  1283. getFileListForTextarea();
  1284. }else {
  1285. dlgErrorMsg(resultObj);
  1286. }
  1287. }
  1288. if( resultObj.getRequestEvent() == "CHK_ATTCH" ) {
  1289. var vo = resultObj.getValueObject();
  1290. var check = vo.get('checkFlag');
  1291. if(check == 0){ //가능
  1292. document.form1.isSubmit = false;
  1293. runAppReq();
  1294. }else{
  1295. document.form1.isSubmit = false;
  1296. if(check == 1){
  1297. alert("대금청구서 첨부파일이 없습니다.");
  1298. }else if(check == 2){
  1299. alert("거래명세서 첨부파일이 없습니다.");
  1300. }
  1301. }
  1302. }
  1303. if( resultObj.getRequestEvent() == "GET_DATA" ) {
  1304. if( resultObj.getSuccess() ) {
  1305. var subContId = resultObj.getValueObject().get("SUB_CONT_ID");
  1306. if(subContId != ""){
  1307. jQuery("#subContId").val(subContId);
  1308. var warrGubun = resultObj.getValueObject().get("WARR_GUBUN");
  1309. jQuery("#warrGubun").val(warrGubun);
  1310. var warrSeq = resultObj.getValueObject().get("WARR_SEQ");
  1311. jQuery("#warrSeq").val(warrSeq);
  1312. var causeCode = resultObj.getValueObject().get("CAUSECODE");
  1313. jQuery("#causeCode").val("당초");
  1314. var guarOnoffYn = resultObj.getValueObject().get("GUAR_ONOFF_YN");
  1315. jQuery("#guarOnoffYn").val(guarOnoffYn);
  1316. var warrGoffice = resultObj.getValueObject().get("WARR_GOFFICE");
  1317. jQuery("#warrGoffice").val(warrGoffice);
  1318. var guarStatus = resultObj.getValueObject().get("GUAR_STATUS");
  1319. jQuery("#guarStatus").val(guarStatus);
  1320. var paperDate = resultObj.getValueObject().get("PAPERDATE");
  1321. jQuery("#paperDate").val(paperDate);
  1322. var warrWgno = resultObj.getValueObject().get("WARR_WGNO");
  1323. jQuery("#warrWgno").val(warrWgno);
  1324. var warrWamt = resultObj.getValueObject().get("WARR_WAMT");
  1325. jQuery("#warrWamt").val(warrWamt);
  1326. jQuery("#warrWamt").each(function(index){
  1327. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  1328. });
  1329. var warrSdateEdate = resultObj.getValueObject().get("WARR_SDATE_EDATE");
  1330. jQuery("#warrSdateEdate").val(warrSdateEdate);
  1331. }
  1332. }else {
  1333. dlgErrorMsg(resultObj);
  1334. }
  1335. document.form1.isSubmit = false;
  1336. }
  1337. }
  1338. catch(errorObject) {
  1339. showErrorDlg("doResult()", errorObject);
  1340. }
  1341. }
  1342. //저장 후 기성시청 처리
  1343. function btnAppReqProcess(){
  1344. var f = document.form1;
  1345. jQuery("#fevent").val("REQ_DATA");
  1346. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "REQ_DATA", f, "SUCCESS");
  1347. }
  1348. function saveData(){
  1349. var f = document.form1;
  1350. jQuery("#btnAppReqSelect").val("2");
  1351. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_DATA", f, "SUCCESS");
  1352. }
  1353. //2016.11.10 외국환거래신고
  1354. function PopClose(win_id,result){
  1355. if( result != null ){
  1356. if(result[0] == 2){ //2016.5.12 외국환거래신고
  1357. setTimeout(function(){ fLayerPopClose(win_id);},100);
  1358. if(result[1].length> 0)alert(result[1]);
  1359. $("#FOREIGN_CHK").val(result[2]);
  1360. $("#FOREIGN_NM").val(result[3]);
  1361. }
  1362. }else{
  1363. setTimeout(function(){ fLayerPopClose(win_id); },100);
  1364. }
  1365. }
  1366. function doKeyPress() {
  1367. if( event.keyCode == 13 ) {
  1368. doSearch(document.all.sheet1)
  1369. }
  1370. }
  1371. function calendar(thisDayObj){
  1372. dlgCalendar(thisDayObj);
  1373. }
  1374. //첨부파일
  1375. function doAttachFile(obj,No,fileName) {
  1376. if(obj.value == ''){
  1377. alert("데이터를 저장 후, 파일을 첨부할 수가 있습니다.");
  1378. }
  1379. else if(obj.value != ''){
  1380. if(No == 1){
  1381. viewFileListNew1('PURCHASE_'+obj.value, No, document.form1.fileMapID, "Y", "payment/purchase/"+obj.value);
  1382. }else{
  1383. var upLoadFlg = "Y";
  1384. if(jQuery("#statusCd").val() == "10"){ //상태값이 기성신청(03), 결재완료(10) 일때는 첨부파일 다운로드만 가능
  1385. upLoadFlg = "N";
  1386. //2016.6.2 6월 30일까지 기타는 등록가능(외국환거래 신고여부 첨부)
  1387. /*if (No == '240')
  1388. {
  1389. upLoadFlg = "Y";
  1390. }*/
  1391. }
  1392. if(<%=userRole.equals("ADMIN NEW")%>){
  1393. upLoadFlg = "Y";
  1394. }
  1395. viewFileListNew1('PURCHASE_'+obj.value, No, document.form1.fileMapID, upLoadFlg, "payment/purchase/"+obj.value, null, fileName);
  1396. }
  1397. }
  1398. //기성첨부파일 목록 조회
  1399. //getFileListForTextarea();
  1400. }
  1401. function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
  1402. var editFile = "";
  1403. if(obj==''){
  1404. alert("After you have saved, you can attach a file.");
  1405. }
  1406. else if(obj != ''){
  1407. if(fObj.guarStatus.value != "02"){editFile="N";}else{editFile="Y";}
  1408. if (<%=storage.getUser().get("RIGHT_NAME").equals("ADMIN NEW")%>) {editFile="Y"; }//2018.06.01수정
  1409. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "contPurWarrPopup");
  1410. }
  1411. }
  1412. function viewFileListNew1(fileGB, id, obj, isModify, isDrectory, iframeID, user_filename) {
  1413. var win_id = "_viewFileList";
  1414. var link = "/common/file/FileListNew.screen";
  1415. link += "?pop_win_id="+win_id;
  1416. link += "&extFunction=viewFileListClose1";
  1417. link += "&file_gb=" + fileGB;
  1418. link += "&id=" + id;
  1419. if( obj.id != null )
  1420. link += "&obj_id=" + obj.id;
  1421. if( iframeID != null )
  1422. link += "&iframeID=" + iframeID;
  1423. if( isModify != null )
  1424. link += "&is_modify=" + isModify;
  1425. if( isDrectory != null )
  1426. link += "&sys_gb=" + isDrectory;
  1427. if( user_filename != null )
  1428. link += "&user_filename=" + user_filename;
  1429. fLayerPop(win_id, link, 750,430, '', '', 'NO', '200');
  1430. }
  1431. //첨부목록 조회
  1432. function getFileListForTextarea(){
  1433. document.form1.p_AttachFile.value = "";
  1434. var f = document.form1;
  1435. jQuery("#fevent").val("GET_ATTACHFILE");
  1436. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "GET_ATTACHFILE", f, "VALUEOBJECT");
  1437. }
  1438. //보증정보 조회
  1439. function callback_getContWarr(){
  1440. //alert("보증정보 조회");
  1441. fLayerPopClose('contOutWarrPop');
  1442. var f = document.form1;
  1443. jQuery("#fevent").val("GET_DATA");
  1444. submitXmlRequest("/portal/payment/AdvencePayRequest_form.screen", "GET_DATA", f, "VALUEOBJECT");
  1445. }
  1446. function fileCheck(checkObj, val){
  1447. var f = document.form1;
  1448. var obj = eval("document.getElementById('" + val + "')");
  1449. if(obj.style.display == "none"){
  1450. obj.style.display = "inline";
  1451. checkObj.checked = true;
  1452. }else{
  1453. obj.style.display = "none";
  1454. checkObj.checked = false;
  1455. }
  1456. }
  1457. //보증정보 조회
  1458. function callback_getContWarr(){
  1459. var f = document.form1;
  1460. jQuery("#fevent").val("GET_DATA");
  1461. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "GET_DATA", f, "VALUEOBJECT");
  1462. }
  1463. function doBudgetAmtResult(vo){
  1464. var amtVO = vo;
  1465. var yyyymm = amtVO.get('YYYYMM');
  1466. var dept_cd = amtVO.get('DEPT_CD');
  1467. var payitem = amtVO.get('PAYITEM');
  1468. var estamt = amtVO.get('ESTAMT'); // 집행내역 예산금액
  1469. var cur_amt = amtVO.get('CUR_AMT'); // 이번달 전체실적누계 금액
  1470. var remainder_amt = amtVO.get('REMAINDER_AMT'); // 예산대비 실적 잔액
  1471. var supply_amt = amtVO.get('SUPPLY_AMT'); // 외화일 경우 외화로 원화금액 환산한 금회대금지급 금액
  1472. var cal_amt = amtVO.get('CAL_AMT'); // 예산 - 전체실적누계 - 금회대금지금
  1473. var estdesc = amtVO.get('ESTDESC');
  1474. var cnt = amtVO.get('CNT');
  1475. // alert("cal_amt : "+cal_amt);
  1476. if(cnt == 999){
  1477. //alert('전월이 마감되지 않았거나 해당월은 작성할 수 없습니다.');
  1478. //approvalStart();
  1479. //저장처리
  1480. saveData();
  1481. }else{
  1482. if( cal_amt > 0){
  1483. //approvalStart();
  1484. //저장처리
  1485. saveData();
  1486. }else{
  1487. alert('집행내역 [ ' + estdesc + ']의 잔액이 부족하여 전표생성이 불가합니다.<br>'+'예산금액:' + estamt + ' 실적누계금액:' + cur_amt + '<br>잔액:' + remainder_amt + ' 금회작성금액:' + supply_amt + '<br>해당 현장의 PE에게 문의하세요.');
  1488. }
  1489. }
  1490. }
  1491. //
  1492. function getBudgetControlAMT(){
  1493. document.form1.isSubmit = false;
  1494. var f = document.form1;
  1495. jQuery("#fevent").val("GET_BUDGET_AMT");
  1496. //입력데이터 저장
  1497. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "GET_BUDGET_AMT", f, "VALUEOBJECT");
  1498. }
  1499. function approvalStart(){
  1500. document.form1.isSubmit = false;
  1501. var f = document.form1;
  1502. jQuery("#fevent").val("SAVE_ATTC");
  1503. //입력데이터 저장
  1504. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_ATTC", f, "SUCCESS");
  1505. }
  1506. //결재가능여부
  1507. function approvalCheck(){
  1508. var f = document.form1;
  1509. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_DRAFT", f, "success");
  1510. }
  1511. function approvalRun(){
  1512. document.form1.isSubmit = false;
  1513. var f = document.form1;
  1514. var tmpslip_payreqId = f.payreqId.value;
  1515. var tmpslip_purContId = f.purContId.value;
  1516. var acctid = f.acctid.value;
  1517. dlgSignForm('ebid_ppyD', '/payment/purchase/PayRequestSign.screen?tmpslip_payreqId='+tmpslip_payreqId+'^tmpslip_purContId='+tmpslip_purContId+'^acctid='+acctid+'^acct_type=1^sign_type=1' );
  1518. }
  1519. //결재
  1520. function dlgSignForm( sign_class_cd, uri ) {
  1521. var f = document.form1;
  1522. var sheet1 = document.all.sheet1;
  1523. var tmpslip_payreqId = f.payreqId.value;
  1524. var tmpslip_purContId = f.purContId.value;
  1525. var url = "/slipSign/paySign_form.screen";
  1526. url += "?sign_class_cd=" + sign_class_cd;
  1527. url += "&uri=" + uri;
  1528. url += "&tmpslip_payreqId=" + tmpslip_payreqId;
  1529. url += "&tmpslip_purContId=" + tmpslip_purContId;
  1530. url += "&slip_dept=" + f.p_dept_cd.value; //2015.10.7 p158->1631로 변경 F.dept_cd.VALUE
  1531. url += "&slip_dt=" + f.date1.value;
  1532. url += "&acct_type=1";
  1533. if(confirm("결재 하시겠습니까?") ){
  1534. //f.slip_dt.value = '';
  1535. //f.sign_chk.value = "Y";
  1536. openWindowCenter(url, "sign_form", 200, 100, "");
  1537. }else{
  1538. return;
  1539. }
  1540. }
  1541. function runRejection(){
  1542. var pageDiv = '2';//2019.05.14 2->전자조달 삭제 erp반려 / 21->상태값 02로 업데이트 반려사유작성, 메일전송
  1543. var f = document.form1;
  1544. pageDiv = f.rejectDiv.value;
  1545. var win_id = "Rejection";
  1546. var link = "/payment/outside/RejectionPopup.screen";
  1547. link += "?pop_win_id="+win_id;
  1548. link += "&payreqId=" + jQuery("#payreqId").val();
  1549. link += "&pageDiv="+ pageDiv;
  1550. fLayerPop(win_id, link, 620, 220, '', '', 'NO');
  1551. /* var param = "";
  1552. var param = "?payreqId=" + jQuery("#payreqId").val();
  1553. param = param + "&pageDiv=2"; //0:선급, 1:기성, 2:대금(납품,설치), 3:대금(선급금)
  1554. var url = "/payment/outside/RejectionPopup.screen"+param;
  1555. result = window.showModalDialog(url,'rejection','dialogWidth:600px;dialogHeight:250px;center:yes;help:no;status:no;scroll:no;resizable:no');
  1556. if(result != null){
  1557. if(result[0] == "1"){
  1558. reDisplay();
  1559. //goList();
  1560. }
  1561. } */
  1562. }
  1563. //
  1564. function runInvoice(){
  1565. var f = document.form1;
  1566. jQuery("#btnAppReqSelect").val("2"); //0:저장처리, 1:선급신청처리
  1567. jQuery("#fevent").val("SAVE_DATA");
  1568. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_DATA", f, "SUCCESS");
  1569. }
  1570. function RejectionPopupClose(){
  1571. //alert();
  1572. setTimeout(function(){fLayerPopClose('Rejection');},100);
  1573. doList();
  1574. }
  1575. function doList() {
  1576. jQuery("#fevent").val("");
  1577. jQuery("#form1").attr("action", "/payment/purchase/PayRequestList.screen");
  1578. jQuery("#form1").attr("target", "_self");
  1579. jQuery("#form1").attr("method", "post");
  1580. jQuery("#form1").submit();
  1581. }
  1582. function runBudgetCheck(){
  1583. //예산통제 BUDGET_CHECK 처리
  1584. var f = document.form1;
  1585. jQuery("#fevent").val("BUDGET_CHECK");
  1586. //입력데이터 저장
  1587. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "BUDGET_CHECK", f, "VALUEOBJECT");
  1588. }
  1589. //보증정보팝업 호출
  1590. function popContWarr(wG, wSeq, wCauseCd) {
  1591. var win_id = "contPurWarrPopup";
  1592. var param = "";
  1593. var param = "?purContModId=" + jQuery("#subContModId").val();
  1594. var param = param + "&warrGubun=" + wG;
  1595. var param = param + "&warrSeq=" + wSeq;
  1596. var param = param + "&causeCode=" + wCauseCd;
  1597. var param = param + "&viewDiv=PAYREQ";
  1598. // var param = param + "&prepayId=" + jQuery("#prepayId").val();
  1599. var param = param + "&PreqStatusCd=" + jQuery("#statusCd").val();
  1600. var param = param + "&pop_win_id=" + win_id;
  1601. var param = param + "&sModule=EB";
  1602. var url = "/portal/guar/contPurWarrPopup.screen"+param;
  1603. fLayerPop(win_id, url, 560,350, '','', 'NO');
  1604. }
  1605. //보증정보팝업 종료후 액션
  1606. function popContWarrClose(returnValue){
  1607. if(returnValue == null){
  1608. fLayerPopClose('contPurWarrPopup');
  1609. }else{
  1610. fLayerPopClose('contPurWarrPopup');
  1611. location.reload();
  1612. }
  1613. }
  1614. //첨부파일Check
  1615. function ChkAttch(){
  1616. var f = document.form1;
  1617. jQuery("#fevent").val("CHK_ATTCH");
  1618. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "CHK_ATTCH", f, "VALUEOBJECT");
  1619. }
  1620. function runAppReq(){
  1621. var f = document.form1;
  1622. jQuery("#btnAppReqSelect").val("1"); //0:저장처리, 1:대금신청요청
  1623. jQuery("#fevent").val("SAVE_DATA");
  1624. //필수 입력항목 check
  1625. if(requiredItemsCheck() == false){
  1626. return;
  1627. }
  1628. //입력데이터 저장
  1629. if (confirm(jQuery("#btnAppReq").text()+" 하시겠습니까?")) {
  1630. submitXmlRequest("/payment/purchase/PayItemResult_form.screen", "SAVE_DATA", f, "SUCCESS");
  1631. }
  1632. }
  1633. function chProofCd(obj){
  1634. //통화가KRW가 아니고 분계유형에 증빙종류[기타]이면 invlice고정
  1635. var conCurCd = jQuery("#conCurCd").val();
  1636. var proof_cd = obj.value
  1637. if(conCurCd != "KRW"){
  1638. if(proof_cd == "Z99"){
  1639. jQuery("#chk_1").prop("checked", false);
  1640. jQuery("#chk_2").prop("checked", false);
  1641. jQuery("#chk_3").prop("checked", true);
  1642. jQuery("#chk_1").attr("disabled",true);
  1643. jQuery("#chk_2").attr("disabled",true);
  1644. jQuery("#chk_3").attr("disabled",false);
  1645. btnCtr();
  1646. }else if(proof_cd != "Z99"){
  1647. jQuery("#chk_1").prop("checked", true);
  1648. jQuery("#chk_2").prop("checked", false);
  1649. jQuery("#chk_3").prop("checked", false);
  1650. jQuery("#chk_1").attr("disabled",false);
  1651. jQuery("#chk_2").attr("disabled",false);
  1652. jQuery("#chk_3").attr("disabled",true);
  1653. btnCtr();
  1654. }
  1655. /* var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  1656. if (radioCheck == "1") { //역발행
  1657. jQuery("#taxAttachments").hide();
  1658. jQuery("#taxTrRow").hide();
  1659. jQuery("#invoiceAttachments").hide();
  1660. jQuery("#invoiceTrRow").hide();
  1661. } else if (radioCheck == "2"){ //순발행
  1662. jQuery("#taxAttachments").show();
  1663. jQuery("#taxTrRow").show();
  1664. jQuery("#invoiceAttachments").hide();
  1665. jQuery("#invoiceTrRow").hide();
  1666. }else{
  1667. jQuery("#taxAttachments").hide();
  1668. jQuery("#taxTrRow").hide();
  1669. jQuery("#invoiceAttachments").show();
  1670. jQuery("#invoiceTrRow").show();
  1671. } */
  1672. }
  1673. }
  1674. </SCRIPT>
  1675. <modular:search id="form1">
  1676. <modular:key id="fevent" />
  1677. </modular:search>
  1678. <form id="form1" name="form1" method="post" modular:type="search">
  1679. <INPUT type="hidden" name="fevent" id="fevent" value="">
  1680. <INPUT type="hidden" name="acctid" id="acctid" value="<%=acctid%>">
  1681. <INPUT type="hidden" name="payreqId" id="payreqId" value="<%=prePayment.get("PAYREQ_ID") %>"> <!-- 발주계약ID -->
  1682. <INPUT type="hidden" name="purContId" id="purContId" value="<%=prePayment.get("PUR_CONT_ID") %>"> <!-- 발주계약ID -->
  1683. <INPUT type="hidden" name="subContModId" id="subContModId" value="<%=prePayment.get("PUR_CONT_MOD_ID") %>">
  1684. <INPUT type="hidden" name="dept_cd" id="dept_cd" value="<%=prePayment.get("DEPT_CD") %>"> <!-- 현장코드 -->
  1685. <INPUT type="hidden" name="p_dept_cd" id="p_dept_cd" value="<%=prePayment.get("P_DEPT_CD") %>"> <!-- 현장코드 2015.10.7 p158->1613 -->
  1686. <INPUT type="hidden" name="lastDate" id="lastDate" value="">
  1687. <INPUT type="hidden" name=pItem id="pItem" value="<%=ContInfo.get("P_ITEM") %>">
  1688. <INPUT type='hidden' name="FOREIGN_CHK" value="<%=prePayment.get("FOREIGN_CHK")%>">
  1689. <!-- 리스트 검색조건 보존 시작-->
  1690. <INPUT type='hidden' id="searchDeptCd" name="searchDeptCd" value="<%=params.get("searchDeptCd")%>"> <!-- 현장코드 -->
  1691. <INPUT type='hidden' id="searchDeptNm" name="searchDeptNm" value="<%=params.get("searchDeptNm")%>"> <!-- 현장명 -->
  1692. <INPUT type='hidden' id="searchBuildName" name="searchBuildName" value="<%=params.get("searchBuildName")%>"> <!-- 계약명 -->
  1693. <INPUT type='hidden' id="searchDateStart" name="searchDateStart" value="<%=params.get("searchDateStart")%>"> <!-- 작성 시작일 -->
  1694. <INPUT type='hidden' id="searchDateEnd" name="searchDateEnd" value="<%=params.get("searchDateEnd")%>"> <!-- 작성 종료일 -->
  1695. <INPUT type='hidden' id="searchStatusCd" name="searchStatusCd" value="<%=params.get("searchStatusCd")%>"> <!-- 상태값 -->
  1696. <INPUT type='hidden' id="searchCorp" name="searchCorp" value="<%=params.get("searchCorp")%>"> <!-- 업체명 -->
  1697. <!-- 리스트 검색조건 보존 종료-->
  1698. <INPUT type="hidden" name="btnAppReqSelect" id="btnAppReqSelect" value="0"> <!-- 결재 및 저장 구분 0:저장, 1:결재 -->
  1699. <INPUT type='hidden' id="conConAmt" name="conConAmt" value="<%=prePayment.get("ORD_AMT")%>"> <!-- 계약금액 -->
  1700. <INPUT type='hidden' id="conConVAmt" name="conConVAmt" value="<%=prePayment.get("ORD_VAMT")%>"> <!-- 계약부가세금액 -->
  1701. <INPUT type='hidden' id="conPrepayAmt" name="conPrepayAmt" value="<%=prePayment.get("PREPAY_SUPPLY_AMT")%>"> <!-- 선급금액 -->
  1702. <INPUT type="hidden" name="F_CON_SUPPLY_AMT" value='<%= prePayment.get("F_CON_SUPPLY_AMT") %>'> <!-- 선급금대상계약금액 -->
  1703. <INPUT type="hidden" name="F_TAX_DY" value='<%= prePayment.get("F_TAX_DY") %>'>
  1704. <INPUT type="hidden" name="statusCd" id="statusCd" value="<%=prePayment.get("REQ_STATUS") %>"> <!-- 상태값 -->
  1705. <INPUT type='hidden' id="rejectDiv" name="rejectDiv" value=""> <!-- 반려구분 2 삭제 erp전송, 21업체반려 -->
  1706. <INPUT type="hidden" name="creBy" id="creBy" value="<%=creby %>">
  1707. <INPUT type="hidden" name="updBy" id="updBy" value="<%=updby %>">
  1708. <!-- 임시 FILE MAP ID 값 -->
  1709. <INPUT type="hidden" name="fileMapID" id="fileMapID" value="" onPropertyChange="JavaScript:getFileListForTextarea();">
  1710. <INPUT type="hidden" name="bugase" id="bugase" value="<%=prePayment.get("CHG_CODE10") %>">
  1711. <INPUT type="hidden" name="orgCurPrepayApplyamt" id="orgCurPrepayApplyamt" value="<%=prePayment.get("CUR_PREPAY_APPLYAMT") %>">
  1712. <INPUT type="hidden" name="SUPP_DIRECT_YN" id="SUPP_DIRECT_YN" value="N"> <!-- 하도급직불여부 제거 -->
  1713. <INPUT type='hidden' id="resUserName" name="resUserName" value="<%=prePayment.get("RES_USER_NAME") %>"> <!-- 계약담당자 -->
  1714. <INPUT type='hidden' id="resDivsion" name="resDivsion" value="<%=prePayment.get("RES_DIVISION") %>"> <!-- 계약담당자 -->
  1715. <INPUT type='hidden' id="resHp" name="resHp" value="<%=prePayment.get("RES_HP") %>"> <!-- 계약담당자 핸드폰번호 -->
  1716. <INPUT type='hidden' id="resEmail" name="resEmail" value="<%=prePayment.get("RES_EMAIL") %>"> <!-- 계약담당자 이메일 -->
  1717. <INPUT type='hidden' id="conDocNo" name="conDocNo" value="<%=prePayment.get("ORD_DOC_NO") %>"> <!-- 발주계약번호 -->
  1718. <INPUT type='hidden' id="corpId" name="corpId" value="<%=prePayment.get("CORP_ID") %>">
  1719. <INPUT type='hidden' id="apprArrId" name="apprArrId" value="<%=prePayment.get("APPR_ARR_ID") %>">
  1720. <INPUT type='hidden' id="apprDocCd" name="apprDocCd" value="<%=prePayment.get("APPR_DOC_CD") %>">
  1721. <INPUT type='hidden' id="apprDy" name="apprDy" value="<%=prePayment.get("APPR_DY") %>">
  1722. <!-- 평가표 -->
  1723. <input type="hidden" name="addr_gubun" id="addr_gubun" value="" />
  1724. <INPUT type='hidden' id="defEstGuarRate" name="defEstGuarRate" value="<%=prePayment.get("DEF_GUAR_AMT_RATE") %>"> <!-- 하자보수보증금율 -->
  1725. <!-- 제목 및 버튼 -->
  1726. <table width="100%">
  1727. <colgroup>
  1728. <col width="500" />
  1729. <col width="*" />
  1730. </colgroup>
  1731. <tr>
  1732. <th>
  1733. <div align="left" id="title">
  1734. <ul>
  1735. <li>구매_대금신청 상세(<%=prePayment.get("STATUS_NM")%>)</li>
  1736. </ul>
  1737. </div>
  1738. </th>
  1739. <td align="right">
  1740. <span id="spanBtnMrr" class="btnSearch center" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnMRR" >MRR</a></span>
  1741. <span id="spanBbtnContCopy" class="btnSearch center" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnContCopy" >계약서사본</a></span>
  1742. <span class="btnSearch center"><a href="javascript:void(0);" style="display: none" id="btnDashTest">대시보드 테스트 팝업</a></span>
  1743. <span class="btnSearch center"><a href="javascript:void(0);" style="display: none" id="btnDashTestOut">대시보드 테스트 팝업(외주)</a></span>
  1744. <span id="purSuppFixAppr" name="purSuppFixAppr" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnFixAppr">정기평가표</a></span>
  1745. <span id="spanBtnSave" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnSave">저장</a></span>
  1746. <span id="spanBtnDelete" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnDelete">삭제</a></span>
  1747. <span id="spanBtnAppReq" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnAppReq">대금신청요청</a></span>
  1748. <span id="spanBtnApproval" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnApproval">결재</a></span>
  1749. <span id="spanBtnInvoiceApproval" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnInvoiceApproval">결재</a></span>
  1750. <span id="spanBtnRejection" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnRejection">업체반려</a></span>
  1751. <span id="spanBtnRejection1" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnRejection1">ERP반려</a></span>
  1752. <span id="spanBtnList" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnList">목록</a></span>
  1753. </td>
  1754. </tr>
  1755. </table>
  1756. <%
  1757. if(!prePayment.get("RTN_REASON").equals("")){
  1758. %>
  1759. <div class="application-info magT10">
  1760. <div class="application-sub-title">
  1761. <span class="title">반려정보</span>
  1762. </div>
  1763. <div class="application-location"></div>
  1764. </div>
  1765. <TABLE class="form-table">
  1766. <colgroup>
  1767. <col width="13%" />
  1768. <col width="*" />
  1769. </colgroup>
  1770. <TR height="25">
  1771. <th style="text-align: left;">반려일</th>
  1772. <TD><%=Formatter2.formatDate(prePayment.get("RTN_DATE"), "-")%></TD>
  1773. </TR>
  1774. <TR>
  1775. <th style="text-align: left;">반려사유</th>
  1776. <TD><%=prePayment.get("RTN_REASON")%></TD>
  1777. </TR>
  1778. </TABLE>
  1779. <%
  1780. }else if(!prePayment.get("TAX_RTN_REASON").equals("")){
  1781. %>
  1782. <div class="application-info magT10">
  1783. <div class="application-sub-title">
  1784. <span class="title">반려정보</span>
  1785. </div>
  1786. <div class="application-location"></div>
  1787. </div>
  1788. <TABLE class="form-table">
  1789. <colgroup>
  1790. <col width="13%" />
  1791. <col width="*" />
  1792. </colgroup>
  1793. <TR height="25">
  1794. <th style="text-align: left;">반려일</th>
  1795. <TD><%=prePayment.get("TAX_RTN_DATE")%></TD>
  1796. </TR>
  1797. <TR>
  1798. <th style="text-align: left;">반려사유</th>
  1799. <TD><%=prePayment.get("TAX_RTN_REASON")%></TD>
  1800. </TR>
  1801. </TABLE>
  1802. <%
  1803. }
  1804. %>
  1805. <div class="application-info magT10">
  1806. <div class="application-sub-title">
  1807. <span class="title">계약정보</span>
  1808. </div>
  1809. <div class="application-location"></div>
  1810. </div>
  1811. <TABLE class="form-table">
  1812. <colgroup>
  1813. <col width="13%" />
  1814. <col width="20%" />
  1815. <col width="13%" />
  1816. <col width="20%" />
  1817. <col width="13%" />
  1818. <col width="*" />
  1819. </colgroup>
  1820. <TR height="25">
  1821. <th style="text-align: left;">현장명</th>
  1822. <TD><%= InputText.get("deptName", prePayment.get("DEPT_NAME"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1823. <th style="text-align: left;">계약명</th>
  1824. <TD><%= InputText.get("buildName", prePayment.get("CST_DOC_NAME"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1825. <th style="text-align: left;">통화</th>
  1826. <TD><%= InputText.get("conCurCd", prePayment.get("CURRENCY_GB"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1827. </TR>
  1828. <TR>
  1829. <th style="text-align: left;">사업자번호</th>
  1830. <TD><%= InputText.get("vendCd", prePayment.get("REG_NO"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1831. <th style="text-align: left;">계약업체명</th>
  1832. <TD><%= InputText.get("memberName", prePayment.get("CORP_KOR"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1833. <th style="text-align: left;">대표이사</th>
  1834. <TD><%= InputText.get("bossName", prePayment.get("BOSS_NAME"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1835. </TR>
  1836. <TR>
  1837. <th style="text-align: left;">계약기간</th>
  1838. <TD><%= InputText.get("startEndWorkDate", prePayment.get("ORD_START_END_DATE"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1839. <th style="text-align: left;">계약금액</th>
  1840. <TD><%= InputText.get("conConAmtNm", Formatter2.currency(prePayment.get("ORD_AMT"), intDigit)+" (부가세 별도)", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1841. <th style="text-align: left;">선급금액</th>
  1842. <TD><%= InputText.get("conPrepayAmtNm", Formatter2.currency(prePayment.get("PREPAY_SUPPLY_AMT"), intDigit)+" (부가세 별도)", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1843. </TR>
  1844. <TR>
  1845. <th style="text-align: left;">담당자명</th>
  1846. <TD><%= InputText.get("userName", prePayment.get("SUPP_USER_NAME"), 98, 6, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1847. <th style="text-align: left;">담당자 핸드폰번호</th>
  1848. <TD><%= InputText.get("hp", prePayment.get("SUPP_HP"), 98, 40, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1849. <th style="text-align: left;">담당자 이메일</th>
  1850. <TD><%= InputText.get("eMail", prePayment.get("SUPP_EMAIL"), 98, 40, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1851. </TR>
  1852. <TR>
  1853. <th style="text-align: left;">지급사유</th>
  1854. <TD >
  1855. <INPUT type="text" name="jigubsayu" id="jigubsayu" maxlength="1000" style="width:99%;" value="<%=prePayment.get("DDD") %>">
  1856. </TD>
  1857. <th style="text-align: left;">외국환거래 신고대상</th>
  1858. <TD colspan="3"><%if (prePayment.get("CURRENCY_GB").equals("KRW")) { %>
  1859. &nbsp;비대상
  1860. <%}else{ %>
  1861. &nbsp;<%= InputText.get("FOREIGN_NM", prePayment.get("FOREIGN_NM"), 10, 10, "readOnly") %>
  1862. &nbsp;<span class="btnSearch center" id="btn_foreign"><a href="javascript:void(0);">검토</a></span>
  1863. <%} %>
  1864. </TD>
  1865. <%-- <th style="text-align: left;">하도급직불여부</th>
  1866. <TD colspan="3">
  1867. &nbsp;<input type="radio" name="SUPP_DIRECT_YN" value="Y"' <%=prePayment.get("SUPP_DIRECT_YN").equals("Y") ? "checked=\"checked\"" : ""%>>예
  1868. &nbsp;<input type="radio" name="SUPP_DIRECT_YN" value="N"' <%=prePayment.get("SUPP_DIRECT_YN").equals("N") ? "checked=\"checked\"" : ""%>>아니오
  1869. </TD> --%>
  1870. </TR>
  1871. </TABLE>
  1872. <!-- 계약정보 : 끝 -->
  1873. <%
  1874. /*
  1875. 분개유형
  1876. */
  1877. %>
  1878. <%@ include file="/jsp/ko_KR/buyer/cont/outside/payItem_typeA.jsp" %>
  1879. <!-- 세금계산서정보 : 시작 -->
  1880. <div class="application-info magT10">
  1881. <div class="application-sub-title">
  1882. <span class="title">세금계산서 정보</span>
  1883. </div>
  1884. <div class="application-location">
  1885. <span id="spanTaxSave" class="btnSearch center" style="display: none"><a href="javascript:void(0);" onclick="gubSave('1');" id="btnGubSave">세금계산서저장</a></span>
  1886. </div>
  1887. </div>
  1888. <TABLE class="form-table">
  1889. <colgroup>
  1890. <col width="13%" />
  1891. <col width="20%" />
  1892. <col width="13%" />
  1893. <col width="20%" />
  1894. <col width="13%" />
  1895. <col width="*" />
  1896. </colgroup>
  1897. <TR>
  1898. <th style="text-align: left;">세금계산서 발행방법</th>
  1899. <TD colspan="3">
  1900. <input type="radio" id="chk_1" name="chk_info" value="1" onclick="taxDataSet();" <%= check1 %>>&nbsp;역발행(SGC이앤씨 발행)
  1901. &nbsp;<input type="radio" id="chk_2" name="chk_info" value="2" onclick="taxDataSet();" <%= check2 %>>&nbsp;순발행(업체직접 발행)
  1902. &nbsp;<input type="radio" id="chk_3" name="chk_info" value="3" onclick="taxDataSet();" <%= check3 %>>&nbsp;Invoice
  1903. </TD>
  1904. <th style="text-align: left;">증빙일자</th>
  1905. <TD><%= InputText.get("date1", Formatter2.formatDate(prePayment.get("TAX_DY"), "-"), 30, 10, "Center, date, PerSize, readonly", "date", "") %>
  1906. <A href="JavaScript:calendar('date1');"><IMG src="/img/supplier/template/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
  1907. </TD>
  1908. </TR>
  1909. <TR>
  1910. <TH>환율</th>
  1911. <TD>
  1912. <%-- <%= InputText.get("rateEx", Formatter2.currency(prePayment.get("rateEx"), intDigit), 98, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %> --%>
  1913. <%= InputText.get("rateEx", Formatter2.currency(prePayment.get("rateEx"), currency_digit), 98, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %>
  1914. </TD>
  1915. <TH>환율연산금액</th>
  1916. <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") %>
  1917. </TD>
  1918. </TR>
  1919. </TABLE>
  1920. <!-- 세금계산서정보 : 끝 -->
  1921. <div class="application-info magT10">
  1922. <div class="application-sub-title">
  1923. <span class="title">대금정보</span>
  1924. </div>
  1925. <div class="application-location">
  1926. </div>
  1927. </div>
  1928. <TABLE class="form-table">
  1929. <colgroup>
  1930. <col width="13%" />
  1931. <col width="20%" />
  1932. <col width="13%" />
  1933. <col width="20%" />
  1934. <col width="13%" />
  1935. <col width="*" />
  1936. </colgroup>
  1937. <TR height="25">
  1938. <th style="text-align: left;">대금구분</th>
  1939. <TD><%= InputText.get("payDiv", "납품정산", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1940. <th style="text-align: left;">지급구분</th>
  1941. <TD>
  1942. <select name="selectDepositCd" id="selectDepositCd">
  1943. <option value="2">중도금</option>
  1944. <option value="3">잔금</option>
  1945. </select>
  1946. <script>
  1947. setSelect(form1.selectDepositCd, '<%=prePayment.get("DEPOSIT_CD")%>');
  1948. </script>
  1949. </TD>
  1950. <th style="text-align: left;">지급차수</th>
  1951. <TD><%= InputText.get("depositSeq", prePayment.get("DEPOSIT_SEQ"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1952. </TR>
  1953. <TR>
  1954. <th style="text-align: left;">선급금 청구금액</th>
  1955. <TD colspan="3">
  1956. 합계금액:<%= InputText.get("reqPrepayAmt", Formatter2.currency(prePayment.get("PREPAY_AMT"), intDigit), 20, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %>
  1957. (공급가:<%= InputText.get("reqPrepaySamt", Formatter2.currency(prePayment.get("PREPAY_SUPPLY_AMT"), intDigit), 20, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %>
  1958. ,부가세:<%= InputText.get("reqPrepaySVamt", Formatter2.currency(prePayment.get("PREPAY_SURTAX_AMT"), intDigit), 20, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %>
  1959. )
  1960. </TD>
  1961. <th style="text-align: left;">업체신청일시</th>
  1962. <TD><%= InputText.get("custSignDate", prePayment.get("CUST_SIGN_DATE"), 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  1963. </TR>
  1964. </TABLE>
  1965. <!-- 대금정보 : 끝 -->
  1966. <img src="/img/com/blank.gif" height="10px" />
  1967. <TABLE class="list-form-table">
  1968. <colgroup>
  1969. <col width="3%" />
  1970. <col width="3%" />
  1971. <col width="5%" />
  1972. <col width="5%" />
  1973. <col width="5%" />
  1974. <col width="5%" />
  1975. <col width="5%" />
  1976. <col width="5%" />
  1977. <col width="5%" />
  1978. <col width="5%" />
  1979. <col width="5%" />
  1980. <col width="5%" />
  1981. <col width="5%" />
  1982. <col width="5%" />
  1983. </colgroup>
  1984. <tr>
  1985. <th colspan="2" rowspan="2"></th>
  1986. <th colspan="3">전회누계</th>
  1987. <th colspan="3">금회</th>
  1988. <th colspan="3">금회누계</th>
  1989. <th colspan="3">잔여</th>
  1990. </tr>
  1991. <tr>
  1992. <th>공급가액</th>
  1993. <th>부가세</th>
  1994. <th>합계</th>
  1995. <th>공급가액</th>
  1996. <th>부가세</th>
  1997. <th>합계</th>
  1998. <th>공급가액</th>
  1999. <th>부가세</th>
  2000. <th>합계</th>
  2001. <th>공급가액</th>
  2002. <th>부가세</th>
  2003. <th>합계</th>
  2004. </tr>
  2005. <tr>
  2006. <th rowspan="2">기성</th>
  2007. <th>율</th>
  2008. <td><%= InputText.get("befAcmpPercent", Formatter2.currency(prePayment.get("BEF_ACMP_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2009. <td colspan="2"></td>
  2010. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2011. <td><%= InputText.get("curAcmpPercent", Formatter2.currency(prePayment.get("CUR_ACMP_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2012. <td colspan="2"></td>
  2013. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2014. <td><%= InputText.get("curBefAcmpPercent", Formatter2.currency(prePayment.get("CUR_BEF_ACMP_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2015. <td colspan="2"></td>
  2016. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2017. <td><%= InputText.get("remainderAcmpPercent", Formatter2.currency(prePayment.get("REMAINDER_ACMP_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2018. <td colspan="2"></td>
  2019. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2020. </tr>
  2021. <tr>
  2022. <th>금액</th>
  2023. <td><%= InputText.get("befAcmpApplyAmt", Formatter2.currency(prePayment.get("BEF_ACMP_APPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2024. <td><%= InputText.get("befAcmpVat", Formatter2.currency(prePayment.get("BEF_ACMP_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2025. <td><%= InputText.get("befAcmpAmt", Formatter2.currency(prePayment.get("BEF_ACMP_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2026. <td><%= InputText.get("curAcmpApplyamt", Formatter2.currency(prePayment.get("CUR_ACMP_APPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2027. <td><%= InputText.get("curAcmpVat", Formatter2.currency(prePayment.get("CUR_ACMP_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2028. <td><%= InputText.get("curAcmpAmt", Formatter2.currency(prePayment.get("CUR_ACMP_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2029. <td><%= InputText.get("curBefAcmpSupplyamt", Formatter2.currency(prePayment.get("CUR_BEF_ACMP_SUPPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2030. <td><%= InputText.get("curBefAcmpVat", Formatter2.currency(prePayment.get("CUR_BEF_ACMP_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2031. <td><%= InputText.get("curBefAcmpAmt", Formatter2.currency(prePayment.get("CUR_BEF_ACMP_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2032. <td><%= InputText.get("remainderAcmpSupplyamt", Formatter2.currency(prePayment.get("REMAINDER_ACMP_SUPPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2033. <td><%= InputText.get("remainderAcmpVat", Formatter2.currency(prePayment.get("REMAINDER_ACMP_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2034. <td><%= InputText.get("remainderAcmpAmt", Formatter2.currency(prePayment.get("REMAINDER_ACMP_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2035. </tr>
  2036. <tr>
  2037. <th rowspan="2">선급<BR/>공제</th>
  2038. <th>율</th>
  2039. <td><%= InputText.get("befPrepayPercent", Formatter2.currency(prePayment.get("BEF_PREPAY_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2040. <td colspan="2"></td>
  2041. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2042. <td><%= InputText.get("curPrepayPercent", Formatter2.currency(prePayment.get("CUR_PREPAY_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2043. <td colspan="2"></td>
  2044. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2045. <td><%= InputText.get("curBefPrepayPercent", Formatter2.currency(prePayment.get("CUR_BEF_PREPAY_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2046. <td colspan="2"></td>
  2047. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2048. <td><%= InputText.get("remainderPrepayPercent", Formatter2.currency(prePayment.get("REMAINDER_PREPAY_PERCENT"),1), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2049. <td colspan="2"></td>
  2050. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2051. </tr>
  2052. <tr>
  2053. <th>금액</th>
  2054. <td><%= InputText.get("befPrepayApplyAmt", Formatter2.currency(prePayment.get("BEF_PREPAY_APPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2055. <td><%= InputText.get("befPrepayVat", Formatter2.currency(prePayment.get("BEF_PREPAY_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2056. <td><%= InputText.get("befPrepayAmt", Formatter2.currency(prePayment.get("BEF_PREPAY_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2057. <td><%= InputText.get("curPrepayApplyamt", Formatter2.currency(prePayment.get("CUR_PREPAY_APPLYAMT"),intDigit), 99, 16, "class=input byteChk ,float, right, perSize", "float") %></td>
  2058. <td><%= InputText.get("curPrepayVat", Formatter2.currency(prePayment.get("CUR_PREPAY_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2059. <td><%= InputText.get("curPrepayDeductamt", Formatter2.currency(prePayment.get("CUR_PREPAY_DEDUCTAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2060. <td><%= InputText.get("curBefPrepaySupplyamt", Formatter2.currency(prePayment.get("CUR_BEF_PREPAY_SUPPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2061. <td><%= InputText.get("curBefPrepayVat", Formatter2.currency(prePayment.get("CUR_BEF_PREPAY_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2062. <td><%= InputText.get("curBefPrepayAmt", Formatter2.currency(prePayment.get("CUR_BEF_PREPAY_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2063. <td><%= InputText.get("remainderPrepaySupplyamt", Formatter2.currency(prePayment.get("REMAINDER_PREPAY_SUPPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2064. <td><%= InputText.get("remainderPrepayVat", Formatter2.currency(prePayment.get("REMAINDER_PREPAY_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2065. <td><%= InputText.get("remainderPrepayAmt", Formatter2.currency(prePayment.get("REMAINDER_PREPAY_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2066. </tr>
  2067. <tr>
  2068. <th rowspan="1">청구액</th>
  2069. <th>금액</th>
  2070. <!-- 전회누계 -->
  2071. <td><%= InputText.get("payedApplyamt", Formatter2.currency(prePayment.get("PAYED_APPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2072. <td><%= InputText.get("payedVat", Formatter2.currency(prePayment.get("PAYED_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2073. <td><%= InputText.get("payedAmt", Formatter2.currency(prePayment.get("PAYED_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2074. <!-- 금회 2017.1.18 잔여1-2원 관리자 정산 -->
  2075. <%if (user.get("right_name").equals("ADMIN NEW")) { %>
  2076. <td><%= InputText.get("curReqAmt", Formatter2.currency(prePayment.get("CUR_REQ_AMT"),intDigit), 99, 16, "class=input byteChk ,float, right, perSize", "float") %></td>
  2077. <%}else { %>
  2078. <td><%= InputText.get("curReqAmt", Formatter2.currency(prePayment.get("CUR_REQ_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2079. <%} %>
  2080. <td><%= InputText.get("curReqVatamt", Formatter2.currency(prePayment.get("CUR_REQ_VATAMT"),intDigit), 99, 16, "class=input byteChk ,float, right, perSize", "float") %></td>
  2081. <td><%= InputText.get("curReqApplyamt", Formatter2.currency(prePayment.get("CUR_REQ_APPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2082. <!-- 금회누계 -->
  2083. <td><%= InputText.get("curPayedSupplyamt", Formatter2.currency(prePayment.get("CUR_PAYED_SUPPLYAMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2084. <td><%= InputText.get("curPayedVat", Formatter2.currency(prePayment.get("CUR_PAYED_VAT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2085. <td><%= InputText.get("curPayedAmt", Formatter2.currency(prePayment.get("CUR_PAYED_AMT"),intDigit), 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td>
  2086. <td colspan="3"></td>
  2087. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2088. <%-- <td><%= InputText.get("blank", "", 99, 16, "class=input_blank, readOnly=white, string, right, perSize, tabIndex=-1", "string") %></td> --%>
  2089. </tr>
  2090. </TABLE><br/>
  2091. <div class="application-info magT5">
  2092. <div class="application-sub-title">
  2093. <span class="title">첨부 및 기타서류</span>
  2094. </div>
  2095. <div class="application-location">
  2096. </div>
  2097. </div>
  2098. <TABLE class="form-table">
  2099. <colgroup>
  2100. <col width="25%" />
  2101. <col width="*" />
  2102. <col width="20%" />
  2103. <col width="20%" />
  2104. </colgroup>
  2105. <TR>
  2106. <th style="text-align: Center;" colspan="3">첨부서류</th>
  2107. <th style="text-align: Center;" colspan="1">파일첨부</th>
  2108. </TR>
  2109. <TR height="140">
  2110. <TD colspan="3">
  2111. <TABLE class="inner_table" border="0" >
  2112. <%
  2113. if(purchaseFileRow.size() > 0){
  2114. int i_mod = 0;
  2115. for(int i = 0; purchaseFileRow.size() > i; i++){
  2116. i_mod = i%3;
  2117. if(i_mod == 0){ %>
  2118. <TR>
  2119. <% } %>
  2120. <td width="2%">
  2121. <input type="checkbox" name="doc_cd" value="<%=purchaseFileRow.getRow(i).get("DETAILCD") %>" style="cursor:pointer;" onClick="fileCheck(this,'<%=purchaseFileRow.getRow(i).get("DETAILCD") %>')" <%if(!purchaseFileRow.getRow(i).get("DOC_CD").equals("")){out.print("checked");} %>>
  2122. </td>
  2123. <td width="20%">
  2124. <%-- <%=acmpFileRow.getRow(i).get("DETAILNM").replace(" ", "<BR>") %> --%>
  2125. <%=purchaseFileRow.getRow(i).get("DETAILNM") %>
  2126. </td>
  2127. <td width="7%" height="24">
  2128. <IMG src="/img/supplier/button/bt_attach_file.gif" id="<%=purchaseFileRow.getRow(i).get("DETAILCD") %>" alt="첨부파일 관리" align="top" style="display:<%if(!purchaseFileRow.getRow(i).get("DOC_CD").equals("")){out.print("inline");}else{out.print("none");} %>" onClick="doAttachFile(document.form1.payreqId, '<%=purchaseFileRow.getRow(i).get("DETAILCD") %>', '<%=purchaseFileRow.getRow(i).get("DETAILNM")%>');" class="button">
  2129. </td>
  2130. <% if(i_mod == 2) { %>
  2131. </TR>
  2132. <% } %>
  2133. <%
  2134. }
  2135. for(int i=i_mod+1; i<3; i++){ %>
  2136. <td></td>
  2137. <% }
  2138. if(i_mod == 0 || i_mod == 1){ %>
  2139. </TR>
  2140. <% }
  2141. }
  2142. %>
  2143. </TABLE>
  2144. </TD>
  2145. <TD><TEXTAREA name="p_AttachFile" id="p_AttachFile" rows="12" readOnly class="input ctrlTarget" style="width:98%; height: 98%; overflow-y:auto"></TEXTAREA></TD>
  2146. </TR>
  2147. <TR height="55">
  2148. <th style="text-align: Center;" colspan="1">특기사항</th>
  2149. <TD colspan="3">
  2150. <TEXTAREA name="reMarks" id="reMarks" rows="5" maxlength="1000" class="input byteChk ctrlTarget" style="width:98%; height: 98%; overflow-y:auto"><%=prePayment.get("RE_MARKS")%></TEXTAREA>
  2151. <%-- <INPUT type="text" name="reMarks" id="reMarks" maxlength="1000" style="width:99%;" value="<%=prePayment.get("RE_MARKS")%>"> --%>
  2152. </TD>
  2153. </TR>
  2154. </TABLE>
  2155. <!-- 대금내역 : 시작 -->
  2156. <div class="application-info magT15">
  2157. <div class="application-sub-title">
  2158. <span class="title">대금내역</span>
  2159. </div>
  2160. <div class="application-location">
  2161. </div>
  2162. </div>
  2163. <div id="sheet1_div" style="padding-top:0px; height: auto; min-height: 200px; overflow: auto;">
  2164. <script>createIBSheet('sheet1','100%', '200px');</script>
  2165. </div>
  2166. <!-- 보증정보 : 시작 -->
  2167. <%
  2168. /*
  2169. 보증 목록을 include 시킴 (2014-10-16) 김명호
  2170. */
  2171. %>
  2172. <%@ include file="/jsp/ko_KR/buyer/cont/purchase/guarList.jsp" %>
  2173. </FORM>