SPRAD00700_증빙서유형관리.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>품의사용내역</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <pumlist>
  12. <kyymd/>
  13. <custcode/>
  14. <custname/>
  15. <pumamt/>
  16. <amt1/>
  17. <amt2/>
  18. <seamt3/>
  19. <noseq/>
  20. <naeyong/>
  21. <pumno2/>
  22. <taxlist/>
  23. <dateflag/>
  24. <status/>
  25. <no/>
  26. <sekeumdate/>
  27. </pumlist>
  28. </list>
  29. </main>
  30. <send>
  31. <code/>
  32. <savelist>
  33. <save/>
  34. </savelist>
  35. </send>
  36. <init>
  37. <combo1>
  38. <codeinfo>
  39. <code/>
  40. <codename/>
  41. </codeinfo>
  42. </combo1>
  43. <combo2>
  44. <deptinfo>
  45. <deptcd/>
  46. <deptnm/>
  47. </deptinfo>
  48. </combo2>
  49. </init>
  50. <pop3data>
  51. <pumgubun/>
  52. <pumno/>
  53. <pumamt/>
  54. <taxlist/>
  55. <custcode/>
  56. <custname/>
  57. <kyymd/>
  58. <pumno2/>
  59. <naeyong/>
  60. <sekeumdate/>
  61. </pop3data>
  62. </root>
  63. </instance>
  64. <bind id="bind_totamt" ref="/root/hidden/totamt" calculate="(/root/main/orch_one/paytotamt) - (/root/main/orch_one/incmtax) -(/root/main/orch_one/resdntax)"/>
  65. <bind id="bind_amt" ref="/root/hidden/orchreturn/amt" calculate="sum(/root/main/list/orchlist/paytotamt)"/>
  66. <bind id="bind_incmtax" ref="/root/hidden/orchreturn/incmtax" calculate="sum(/root/main/list/orchlist/incmtax)"/>
  67. <bind id="bind_resdntax" ref="/root/hidden/orchreturn/resdntax" calculate="sum(/root/main/list/orchlist/resdntax)"/>
  68. <submission id="TRRAD01515" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/pop3data" resultref="/root/main/list"/>
  69. <submission id="TXRAD01503" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savelist" resultref="/root/hidden"/>
  70. </model>
  71. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  74. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  75. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  76. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  77. <script type="javascript" src="../../../mis/paybaseinfomngtweb/js/RWC001.js"/>
  78. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  79. <script type="javascript" ev:event="xforms-ready">
  80. <![CDATA[
  81. fInitialize();
  82. ]]>
  83. </script>
  84. <script type="javascript">
  85. <![CDATA[
  86. //opener의 값을 받기
  87. //window.opener.javaScript
  88. //var dd = opener.javascript.getParameter("aa");
  89. //참고
  90. //opener 로 값던지기
  91. //opener.javascript.setParameter("aa","");
  92. function fInitialize()
  93. {
  94. if(model.getValue("/root/pop3data/taxlist") == "1"){
  95. input5.visible = false;
  96. input1.visible = true;
  97. input2.visible = true;
  98. caption2.visible = true;
  99. }else{
  100. input5.visible = true;
  101. input1.visible = false;
  102. input2.visible = false;
  103. caption2.visible = false;
  104. }
  105. var pumamt = model.getValue("/root/pop3data/pumamt");
  106. var amt1 = 0;
  107. var amt2 = 0;
  108. var seamt3 = 0;
  109. //등록된 증빙서인지 조회
  110. submit("TRRAD01515");
  111. if(model.getValue("/root/main/list/pumlist/noseq") == ""){
  112. model.makeValue("/root/main/list/pumlist/kyymd", model.getValue("/root/pop3data/kyymd"));
  113. model.makeValue("/root/main/list/pumlist/custcode", model.getValue("/root/pop3data/custcode"));
  114. model.makeValue("/root/main/list/pumlist/custname", model.getValue("/root/pop3data/custname"));
  115. model.makeValue("/root/main/list/pumlist/pumamt", model.getValue("/root/pop3data/pumamt"));
  116. model.makeValue("/root/main/list/pumlist/naeyong", model.getValue("/root/pop3data/naeyong"));
  117. model.makeValue("/root/main/list/pumlist/pumno2", model.getValue("/root/pop3data/pumno").substr(8,4));
  118. model.makeValue("/root/main/list/pumlist/taxlist", model.getValue("/root/pop3data/taxlist"));
  119. model.makeValue("/root/main/list/pumlist/sekeumdate", model.getValue("/root/pop3data/sekeumdate"));
  120. model.makeValue("/root/main/list/pumlist/no", "");
  121. model.makeValue("/root/main/list/pumlist/status", "i");
  122. // 1: 세금계산서이면..
  123. if(model.getValue("/root/pop3data/taxlist") == "1"){
  124. amt1 = Math.round(parseFloat(pumamt) / 11.0 * 10);
  125. seamt3 = parseFloat(pumamt) - parseFloat(amt1);
  126. model.makeValue("/root/main/list/pumlist/amt1", amt1);
  127. model.makeValue("/root/main/list/pumlist/amt2", "0");
  128. model.makeValue("/root/main/list/pumlist/seamt3", seamt3);
  129. var dateflag = model.getValue("/root/pop3data/sekeumdate").substr(4,2);
  130. if(dateflag >= '01' && dateflag<= '03'){
  131. model.makeValue("/root/main/list/pumlist/dateflag", "1");
  132. }else if(dateflag >= '04' && dateflag<= '06'){
  133. model.makeValue("/root/main/list/pumlist/dateflag", "2");
  134. }else if(dateflag >= '07' && dateflag<= '09'){
  135. model.makeValue("/root/main/list/pumlist/dateflag", "3");
  136. }else if(dateflag >= '10' && dateflag<= '12'){
  137. model.makeValue("/root/main/list/pumlist/dateflag", "4");
  138. }
  139. }else{
  140. model.makeValue("/root/main/list/pumlist/amt1", "0");
  141. model.makeValue("/root/main/list/pumlist/amt2", model.getValue("/root/pop3data/pumamt"));
  142. model.makeValue("/root/main/list/pumlist/seamt3", "0");
  143. }
  144. }
  145. model.refresh();
  146. }
  147. function fOpenPopupHelp(pHelper, pControl, pInstance, pCdgrupid, pValueControl, pNodeName)
  148. {
  149. misfOpenPopUpList(pHelper, pControl, pCdgrupid, pInstance, pValueControl, pNodeName);
  150. model.refresh();
  151. }
  152. function fSaveDate()
  153. {
  154. var kyymd = model.getValue("/root/main/list/pumlist/kyymd");
  155. var custcode = model.getValue("/root/main/list/pumlist/custcode");
  156. var pumamt = model.getValue("/root/main/list/pumlist/pumamt");
  157. var amt1 = model.getValue("/root/main/list/pumlist/amt1");
  158. var amt2 = model.getValue("/root/main/list/pumlist/amt2");
  159. var seamt3 = model.getValue("/root/main/list/pumlist/seamt3");
  160. var noseq = model.getValue("/root/main/list/pumlist/noseq");
  161. var naeyong = model.getValue("/root/main/list/pumlist/naeyong");
  162. var pumno2 = model.getValue("/root/main/list/pumlist/pumno2");
  163. var taxlist = model.getValue("/root/main/list/pumlist/taxlist");
  164. var dateflag = model.getValue("/root/main/list/pumlist/dateflag");
  165. var status = model.getValue("/root/main/list/pumlist/status");
  166. var no = model.getValue("/root/main/list/pumlist/no");
  167. var sekeumdate = model.getValue("/root/main/list/pumlist/sekeumdate");
  168. //2011.07.08 CYW 거래처가 9000번일 경우(기타) Return
  169. if( custcode == "9000"){
  170. messageBox("거래처 정보를 다시 입력해 주십시오.( [ 9000 / 기타 ]는 입력불가능 )", "E000", "");
  171. return;
  172. }
  173. var save = "status" + "▦"
  174. + "kyymd" + "▦"
  175. + "custcode" + "▦"
  176. + "pumamt" + "▦"
  177. + "amt1" + "▦"
  178. + "amt2" + "▦"
  179. + "seamt3" + "▦"
  180. + "noseq" + "▦"
  181. + "naeyong" + "▦"
  182. + "pumno2" + "▦"
  183. + "taxlist" + "▦"
  184. + "no" + "▦"
  185. + "sekeumdate" + "▦"
  186. + "dateflag" + "▩"
  187. + status + "▦"
  188. + kyymd + "▦"
  189. + custcode + "▦"
  190. + pumamt + "▦"
  191. + amt1 + "▦"
  192. + amt2 + "▦"
  193. + seamt3 + "▦"
  194. + noseq + "▦"
  195. + naeyong + "▦"
  196. + pumno2 + "▦"
  197. + taxlist + "▦"
  198. + no + "▦"
  199. + sekeumdate + "▦"
  200. + dateflag + "▩" ;
  201. model.setValue("/root/send/savelist/save", save);
  202. if(submit("TXRAD01503")){
  203. if(model.getValue("/root/main/list/pumlist/status") == "i"){
  204. messageBox("저장되었습니다.", "I000");
  205. }else if(model.getValue("/root/main/list/pumlist/status") == "u"){
  206. messageBox("수정되었습니다.", "I000");
  207. }
  208. submit("TRRAD01515");
  209. }
  210. }
  211. ]]>
  212. </script>
  213. </xhtml:head>
  214. <xhtml:body pagewidth="650" pageheight="300" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  215. <group id="group1" style="left:0px; top:0px; width:580px; height:13px; ">
  216. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:190px; height:14px; ">증빙서유형</caption>
  217. </group>
  218. <group id="group2" scroll="auto" style="left:0px; top:16px; width:590px; height:199px; ">
  219. <input id="ipt_unsldd" ref="/root/main/list/pumlist/sekeumdate" class="input_s_essential" navindex="1" inputtype="date" style="left:120px; top:20px; width:120px; height:19px; text-align:center; ">
  220. <script type="javascript" ev:event="xforms-value-changed">
  221. <![CDATA[
  222. ]]>
  223. </script>
  224. </input>
  225. <caption id="caption5" class="search_name" style="left:15px; top:20px; width:100px; height:17px; ">거래발생일 :</caption>
  226. <button id="button2" class="icon_search" navindex="-1" style="left:219px; top:50px; width:16px; height:16px; ">
  227. <caption/>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. fOpenPopupHelp("56", ipt_custcd, "custcode,custname", "", "");
  231. ]]>
  232. </script>
  233. </button>
  234. <input id="ipt_custcd" ref="/root/main/list/pumlist/custcode" class="input_essential" navindex="8" maxlength="11" style="left:120px; top:50px; width:95px; height:19px; ">
  235. <script type="javascript" ev:event="xforms-value-changed">
  236. <![CDATA[
  237. ]]>
  238. </script>
  239. </input>
  240. <caption id="caption13" class="search_name" style="left:15px; top:50px; width:86px; height:17px; ">거 래 처 :</caption>
  241. <input id="input3" ref="/root/main/list/pumlist/custname" class="input_essential" disabled="true" style="left:239px; top:50px; width:184px; height:19px; ">
  242. <script type="javascript" ev:event="xforms-value-changed">
  243. <![CDATA[
  244. ]]>
  245. </script>
  246. </input>
  247. <input id="input10" ref="/root/main/list/pumlist/pumamt" disabled="true" format="(-)#,###" style="left:120px; top:80px; width:120px; height:19px; text-align:right; "/>
  248. <caption id="caption18" class="search_name" style="left:15px; top:80px; width:101px; height:17px; ">금 액 :</caption>
  249. <input id="input1" ref="/root/main/list/pumlist/amt1" format="(-)#,###" style="left:120px; top:110px; width:120px; height:19px; text-align:right; ">
  250. <script type="javascript" ev:event="xforms-value-changed">
  251. <![CDATA[
  252. // 1: 세금계산서이면..
  253. if(model.getValue("/root/pop3data/taxlist") == "1"){
  254. input10.value = parseInt(input1.value) + parseInt(input2.value); //금액 = 공급가액 + 세액
  255. }
  256. ]]>
  257. </script>
  258. </input>
  259. <caption id="caption1" class="search_name" style="left:15px; top:110px; width:101px; height:17px; ">공급가액 :</caption>
  260. <caption id="caption2" class="search_name" style="left:15px; top:140px; width:101px; height:17px; ">세 액 :</caption>
  261. <input id="input2" ref="/root/main/list/pumlist/seamt3" format="(-)#,###" style="left:120px; top:140px; width:120px; height:19px; text-align:right; ">
  262. <script type="javascript" ev:event="xforms-value-changed">
  263. <![CDATA[
  264. // 1: 세금계산서이면..
  265. if(model.getValue("/root/pop3data/taxlist") == "1"){
  266. input10.value = parseInt(input1.value) + parseInt(input2.value); //금액 = 공급가액 + 세액
  267. }
  268. ]]>
  269. </script>
  270. </input>
  271. <caption id="caption3" class="search_name" style="left:255px; top:20px; width:101px; height:17px; ">확인번호 :</caption>
  272. <input id="input4" ref="/root/main/list/pumlist/no" disabled="true" format="(-)#,###" appearance="input" style="left:350px; top:20px; width:120px; height:19px; text-align:center; "/>
  273. <input id="input5" ref="/root/main/list/pumlist/amt2" format="(-)#,###" style="left:120px; top:110px; width:120px; height:19px; text-align:right; ">
  274. <script type="javascript" ev:event="xforms-value-changed">
  275. <![CDATA[
  276. // 세금계산서가 아니면.
  277. if(model.getValue("/root/pop3data/taxlist") != "1"){
  278. input10.value = parseInt(input1.value) + parseInt(input5.value); //금액 = 공급가액
  279. }
  280. ]]>
  281. </script>
  282. </input>
  283. </group>
  284. <group id="grp_btn" scroll="auto" style="left:0px; top:213px; width:590px; height:27px; ">
  285. <button id="btn_close" class="btn4_letter2" navindex="6" style="left:530px; top:3px; width:56px; height:22px; ">
  286. <caption>닫기</caption>
  287. <script type="javascript" ev:event="DOMActivate">
  288. <![CDATA[
  289. window.close();
  290. ]]>
  291. </script>
  292. </button>
  293. <button id="button1" class="btn4_letter2" navindex="6" style="left:470px; top:3px; width:56px; height:22px; ">
  294. <caption>저장</caption>
  295. <script type="javascript" ev:event="DOMActivate">
  296. <![CDATA[
  297. fSaveDate();
  298. ]]>
  299. </script>
  300. </button>
  301. </group>
  302. </xhtml:body>
  303. </xhtml:html>