SMRAT00900_사업소득조회및저장.xrw 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  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. <orchlist/>
  12. <priprofprntlist/>
  13. </list>
  14. <printlist>
  15. <fstpage/>
  16. <secpage/>
  17. </printlist>
  18. </main>
  19. <send>
  20. <retrparams>
  21. <instcd/>
  22. <payinst/>
  23. <frdd/>
  24. <todd/>
  25. <rrgstno/>
  26. <name/>
  27. <emplno/>
  28. <emplnm/>
  29. <profflag>B</profflag>
  30. <retrkind/>
  31. <dayflag/>
  32. <groupid/>
  33. </retrparams>
  34. <printparams>
  35. <payTotAmt/>
  36. <incmTax/>
  37. <resdnTax/>
  38. <isumAmt/>
  39. </printparams>
  40. <rertparams2>
  41. <instcd/>
  42. <name/>
  43. <rrgstno/>
  44. <retrflag/>
  45. </rertparams2>
  46. </send>
  47. <init/>
  48. <temp/>
  49. <hidden>
  50. <incmpsn>
  51. <name/>
  52. <rrgstno/>
  53. <entrregno/>
  54. <custnm/>
  55. <zipcd/>
  56. <zipcd1/>
  57. <zipcd2/>
  58. <zipcdseqno/>
  59. <supaddr/>
  60. <infaddr/>
  61. <cntctel/>
  62. <emailaddr/>
  63. <cmt/>
  64. <ionatiflag/>
  65. <incmflag/>
  66. </incmpsn>
  67. <prntlist>
  68. <priprofprntlist/>
  69. <flag/>
  70. </prntlist>
  71. <zipcd>
  72. <zipcd1/>
  73. <zipcd2/>
  74. <supaddr/>
  75. <zipcdseqno/>
  76. </zipcd>
  77. <incmpsntemp>
  78. <name/>
  79. <rrgstno/>
  80. <entrregno/>
  81. <custnm/>
  82. <zipcd/>
  83. <zipcd1/>
  84. <zipcd2/>
  85. <zipcdseqno/>
  86. <supaddr/>
  87. <infaddr/>
  88. <cntctel/>
  89. <emailaddr/>
  90. <cmt/>
  91. <ionatiflag/>
  92. <induflag/>
  93. <incmflag/>
  94. </incmpsntemp>
  95. <checkedcnt/>
  96. </hidden>
  97. <prt/>
  98. </root>
  99. </instance>
  100. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  101. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  102. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  103. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  104. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  105. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  106. <bind id="bindPayTotAmt" ref="/root/send/printparams/payTotAmt" calculate="sum(/root/main/list/orchlist/paytotamt)"/>
  107. <bind id="bindIncmTax" ref="/root/send/printparams/incmTax" calculate="sum(/root/main/list/orchlist/incmtax)"/>
  108. <bind id="bindResdnTax" ref="/root/send/printparams/resdnTax" calculate="sum(/root/main/list/orchlist/resdntax)"/>
  109. <submission id="TRRAC00611" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/rertparams2" resultref="/root/hidden/incmpsn"/>
  110. <submission id="TXRAT00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/list/orchlist" resultref="/root/temp"/>
  111. <submission id="TRRAT00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/list"/>
  112. <script type="javascript" ev:event="xforms-ready">
  113. <![CDATA[
  114. fInitialize();
  115. model.setValue("/root/send/retrparams/dayflag", "P");
  116. model.refresh();
  117. ]]>
  118. </script>
  119. <script type="javascript">
  120. <![CDATA[
  121. function fInitialize()
  122. {
  123. // 2011.09.26 cyw 해당실무자만이 메뉴접근 가능하도록 수정.
  124. misfComboComCdList("030R0018",cmb_gruptype);
  125. var cnt = getNodesetCount("/root/init/cmb_gruptype/comcodelist");
  126. var chk = 0;
  127. for(var i = 1; i <= cnt; i++ ){
  128. if( model.getValue("/root/init/cmb_gruptype/comcodelist[" + i + "]/cdid") == getUserId() ){
  129. chk++;
  130. }
  131. }
  132. if( chk > 0 ){
  133. group3.disabled = false;
  134. }else{
  135. group3.disabled = true;
  136. messageBox("해당 화면에 권한이 없습니다.", "C000");
  137. }
  138. model.removenode("/root/main/list/orchlist");
  139. misfMsterDetailSet(grd_orchlist, null, "TRRAT00601", "Y");
  140. // misfComboComCdListMulti("Z0007,R0278", "cmb_instcd,grd_orchlist.induflag");
  141. misfComboComCdListMulti("Z0007,", "cmb_instcd");
  142. model.setValue("/root/send/retrparams/instcd", getUserInfo("dutplceinstcd"));
  143. model.setValue("/root/send/retrparams/frdd", getCurrentDate());
  144. model.setValue("/root/send/retrparams/todd", getCurrentDate());
  145. model.setValue("/root/send/rertparams2/instcd", getUserInfo("dutplceinstcd"));
  146. model.setValue("/root/send/retrparams/retrkind", "all")
  147. model.refresh();
  148. grd_orchlist.rowHeight(0) = 30;
  149. //fRetrieve();
  150. }
  151. function fRetrieve()
  152. {
  153. submit("TRRAT00601");
  154. for(var i=1; i<grd_orchlist.rows; i++)
  155. {
  156. if(model.getValue(grd_orchlist.nodeset + "[" + i + "]/chkyn") == "Y")
  157. {
  158. model.setValue(grd_orchlist.nodeset + "[" + i + "]/chknm" , "확인");
  159. misfSetReadOnlyCol(grd_orchlist, "pumno,name,rrgstno,paydd,getdd,paytotamt",true,i);
  160. }else{
  161. misfSetReadOnlyCol(grd_orchlist, "pumno,name,rrgstno,paydd,getdd,paytotamt",false,i); //2011.10.11 cyw
  162. }
  163. // if(model.getValue(grd_orchlist.nodeset + "[" + i + "]/slipyn") == "Y")
  164. // {
  165. // grd_orchlist.rowStyle(i, "all", "background-color") = "#EAEAEA";
  166. // misfSetReadOnlyCol(grd_orchlist, "name,rrgstno,posyear,cmt,dayno,dypay,paytotamt,incmtax,resdntax,zipcd,supaddr,infaddr", true, i);
  167. // }
  168. // else
  169. // {
  170. // grd_orchlist.rowStyle(i, "all", "background-color") = "#ffffff";
  171. // misfSetReadOnlyCol(grd_orchlist, "name,rrgstno,posyear", true, i);
  172. // misfSetReadOnlyCol(grd_orchlist, "name,rrgstno,posyear,cmt,dayno,dypay,paytotamt,incmtax,resdntax,zipcd,supaddr,infaddr", false, i);
  173. // }
  174. }
  175. // var rows = grd_orchlist.rows - 1;
  176. // var st = grd_orchlist.colRef("paydd");
  177. // grd_orchlist.sort(1, st, rows, st) = "desc";
  178. // grd_orchlist.refresh();
  179. fSetPrintNodeList();
  180. model.recalculate();
  181. }
  182. function fSave()
  183. {
  184. for(var i=1; i<grd_orchlist.rows; i++)
  185. {
  186. var sRrgstno = grd_orchlist.valueMatrix(i, grd_orchlist.colRef("rrgstno"));
  187. //var sPosYear = grd_orchlist.valueMatrix(i, grd_orchlist.colRef("posyear"));
  188. var sPosYear = grd_orchlist.valueMatrix(i, grd_orchlist.colRef("posdd"));
  189. var sCmt = grd_orchlist.valueMatrix(i, grd_orchlist.colRef("cmt"));
  190. var sPaytotamt = grd_orchlist.valueMatrix(i, grd_orchlist.colRef("paytotamt"));
  191. var unslno = grd_orchlist.valueMatrix(i, grd_orchlist.colRef("unslno"));
  192. if (unslno != ""){
  193. messageBox("전표발의에서 생성된 자료는 삭제할 수 없습니다.", "E999", "");
  194. return;
  195. }
  196. if(sRrgstno == "") { messageBox("소득자를", "C001"); return; }
  197. // if(!isValidDateTime(sPosYear, "YYYYMMDD"))
  198. // { messageBox("귀속 일자가 유효하지 않습니다.", "I000"); return; }
  199. // if(sCmt == "") { messageBox("적요를", "C001"); return; }
  200. if(sPaytotamt == "") { messageBox("지급액을", "C001"); return; }
  201. }
  202. misfSave("TXRAT00601");
  203. fRetrieve();
  204. }
  205. function fPrint()
  206. {
  207. var iLength = instance1.selectNodes("/root/main/list/prtorchlist").length;
  208. model.removenode("/root/hidden/prntlist");
  209. model.makeNode("/root/hidden/prntlist");
  210. //2011.10.04 cyw 선택영역만 출력가능하게
  211. if(grd_orchlist.selectedRows >= 1 ){
  212. for( var a = 0 ; a < grd_orchlist.selectedRows ; a++ ){
  213. model.makeNode("/root/hidden/prntlist/priprofprntlist[" + (a+1) + "]");
  214. model.copyNode("/root/hidden/prntlist/priprofprntlist[" + (a+1) + "]","/root/main/list/orchlist[" + grd_orchlist.selectedRow(a) + "]");
  215. }
  216. }else{
  217. for(var i=1; i<=iLength; i++)
  218. {
  219. model.makeNode("/root/hidden/prntlist/priprofprntlist[" + i + "]");
  220. model.copyNode("/root/hidden/prntlist/priprofprntlist[" + i + "]", "/root/main/list/prtorchlist[" + i + "]");
  221. }
  222. }
  223. var lstcnt = getNodesetCount("/root/hidden/prntlist/priprofprntlist");
  224. // 소득자, 발행자 구분값
  225. model.makeValue("/root/hidden/prntlist/lstcnt", lstcnt );
  226. model.makeValue("/root/hidden/prntlist/flag", "1");
  227. //2011.07.27 cyw 가장 마지막 지급일자
  228. model.makeValue("/root/hidden/prntlist/gdate", model.getValue("/root/hidden/prntlist/priprofprntlist[1]/paydd"));
  229. exeReportPreview("RPRAT00900", "XMLSTR");
  230. model.setValue("/root/hidden/prntlist/flag", "2");
  231. exeReportPreview("RPRAT00900", "XMLSTR");
  232. // exeReportPreview("RPRAD00203", "XMLSTR");
  233. }
  234. function fSetPrintNodeList()
  235. {
  236. var iLength = instance1.selectNodes("/root/main/list/orchlist").length;
  237. model.removenode("/root/hidden/prntlist");
  238. model.makeNode("/root/hidden/prntlist");
  239. for(var i=1; i<=iLength; i++)
  240. {
  241. model.makeNode("/root/hidden/prntlist/priprofprntlist[" + i + "]");
  242. model.copyNode("/root/hidden/prntlist/priprofprntlist[" + i + "]", "/root/main/list/orchlist[" + i + "]");
  243. }
  244. }
  245. function fPayCalc()
  246. {
  247. var iPayTotAmt = parseInt(model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/paytotamt"), 10);
  248. var iIncmTax = parseInt((iPayTotAmt * 0.03) / 10,10) * 10;
  249. var iResdnTax = parseInt((iIncmTax * 0.1) / 10,10) * 10;
  250. if (iIncmTax < 1000)
  251. {
  252. iIncmTax = 0;
  253. iResdnTax = 0;
  254. }
  255. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/incmtax", iIncmTax);
  256. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/resdntax", iResdnTax);
  257. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/sumamt", iIncmTax + iResdnTax);
  258. model.recalculate();
  259. model.refresh();
  260. }
  261. ]]>
  262. </script>
  263. <bind id="bindChkCnt" ref="/root/hidden/checkedcnt" calculate="count(/root/main/list/orchlist[chk = 'Y']/chk)"/>
  264. <bind id="bindSumAmt" ref="/root/send/printparams/isumAmt" calculate="sum(/root/main/list/orchlist/sumamt)"/>
  265. </model>
  266. </xhtml:head>
  267. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1192;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  268. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  269. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">사업소득 조회/수정</caption>
  270. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  271. </group>
  272. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:762px; ">
  273. <group id="grp_sea" style="left:0px; top:35px; width:1195px; height:35px; vertical-align:top; ">
  274. <select1 id="rdo_retrkind" ref="/root/send/retrparams/retrkind" visibility="hidden" appearance="full" cellspacing="0" cols="3" overflow="visible" style="left:971px; top:9px; width:90px; height:16px; border-style:none; ">
  275. <choices>
  276. <item>
  277. <label>전체</label>
  278. <value>all</value>
  279. </item>
  280. <item>
  281. <label>집합</label>
  282. <value>sum</value>
  283. </item>
  284. </choices>
  285. <script type="javascript" ev:event="xforms-value-changed">
  286. <![CDATA[
  287. //fRetrieve();
  288. //
  289. // fSetControlAttr();
  290. ]]>
  291. </script>
  292. </select1>
  293. <caption id="caption9" class="search_name" visibility="hidden" style="left:901px; top:9px; width:97px; height:17px; ">조회구분 :</caption>
  294. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  295. <line id="line5" class="line_4" style="x1:1107px; y1:6px; x2:1107px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  296. <input id="ipt_frym" ref="/root/send/retrparams/frdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:490px; top:8px; width:100px; height:19px; text-align:center; ">
  297. <script type="javascript" ev:event="xforms-value-changed">
  298. <![CDATA[
  299. //fRetrieve();
  300. ]]>
  301. </script>
  302. </input>
  303. <caption id="caption2" style="left:592px; top:11px; width:15px; height:20px; ">~</caption>
  304. <select1 id="cmb_instcd" ref="/root/send/retrparams/instcd" class="combo_s_essential" disabled="true" navindex="-1" appearance="minimal" style="left:99px; top:8px; width:176px; height:19px; ">
  305. <choices>
  306. <itemset>
  307. <label/>
  308. <value/>
  309. </itemset>
  310. </choices>
  311. <script type="javascript" ev:event="xforms-value-changed">
  312. <![CDATA[
  313. model.setValue("/root/send/rertparams2/instcd", "/root/send/retrparams/instcd");
  314. fRetrieve();
  315. ]]>
  316. </script>
  317. </select1>
  318. <caption id="caption3" class="search_name" style="left:9px; top:9px; width:90px; height:17px; ">기관구분 :</caption>
  319. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; text-align:left; ">
  320. <caption>조회</caption>
  321. <script type="javascript" ev:event="DOMActivate">
  322. <![CDATA[
  323. fRetrieve();
  324. ]]>
  325. </script>
  326. </button>
  327. <input id="ipt_toym" ref="/root/send/retrparams/todd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:605px; top:8px; width:100px; height:19px; text-align:center; ">
  328. <script type="javascript" ev:event="xforms-value-changed">
  329. <![CDATA[
  330. //fRetrieve();
  331. ]]>
  332. </script>
  333. </input>
  334. <caption id="caption8" class="search_name" style="left:730px; top:9px; width:90px; height:17px; ">소 득 자 :</caption>
  335. <button id="btn_entregnohelp" class="icon_search" style="left:924px; top:9px; width:16px; height:16px; ">
  336. <caption/>
  337. <script type="javascript" ev:event="DOMActivate">
  338. <![CDATA[
  339. misfOpenPopUpList("31", ipt_rrgstno, "", "rrgstno,name");
  340. model.refresh();
  341. ]]>
  342. </script>
  343. </button>
  344. <input id="ipt_rrgstno" ref="/root/send/retrparams/rrgstno" class="input_search" navindex="5" format="999999-9999999" style="left:820px; top:8px; width:100px; height:19px; text-align:center; ">
  345. <script type="javascript" ev:event="onkeypress">
  346. <![CDATA[
  347. if(event.keyCode == 13)
  348. {
  349. model.setFocus("ipt_name");
  350. }
  351. ]]>
  352. </script>
  353. <script type="javascript" ev:event="xforms-value-changed">
  354. <![CDATA[
  355. if(ipt_rrgstno.currentText == "")
  356. {
  357. model.setValue("/root/send/retrparams/rrgstno", "");
  358. model.setValue("/root/send/retrparams/name", "");
  359. ipt_rrgstno.refresh();
  360. ipt_name.refresh();
  361. return;
  362. }
  363. model.setValue("/root/send/rertparams2/name", "");
  364. model.setValue("/root/send/rertparams2/rrgstno", model.getValue("/root/send/retrparams/rrgstno"));
  365. model.setValue("/root/send/rertparams2/retrflag", "code");
  366. if (submit("TRRAC00611"))
  367. {
  368. if (instance1.selectNodes("/root/hidden/incmpsn").length > 0)
  369. {
  370. model.setValue("/root/send/retrparams/name", model.getValue("/root/hidden/incmpsn/name"));
  371. model.setValue("/root/send/retrparams/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  372. }
  373. else
  374. {
  375. model.setValue("/root/send/retrparams/name", "");
  376. model.setValue("/root/send/retrparams/rrgstno", "");
  377. }
  378. }
  379. model.refresh();
  380. fRetrieve();
  381. ]]>
  382. </script>
  383. </input>
  384. <input id="ipt_name" ref="/root/send/retrparams/name" class="input_search" navindex="6" imemode="hangul" style="left:944px; top:8px; width:101px; height:19px; ">
  385. <script type="javascript" ev:event="onkeypress">
  386. <![CDATA[
  387. if(event.keyCode == 13)
  388. {
  389. model.setFocus("btn_search");
  390. }
  391. ]]>
  392. </script>
  393. <script type="javascript" ev:event="xforms-value-changed">
  394. <![CDATA[
  395. if(ipt_name.currentText == "")
  396. {
  397. model.setValue("/root/send/retrparams/rrgstno", "");
  398. model.setValue("/root/send/retrparams/name", "");
  399. ipt_rrgstno.refresh();
  400. ipt_name.refresh();
  401. return;
  402. }
  403. model.setValue("/root/send/rertparams2/name", model.getValue("/root/send/retrparams/name"));
  404. model.setValue("/root/send/rertparams2/rrgstno", "");
  405. model.setValue("/root/send/rertparams2/retrflag", "name");
  406. if (submit("TRRAC00611"))
  407. {
  408. if (instance1.selectNodes("/root/hidden/incmpsn").length > 0)
  409. {
  410. model.setValue("/root/send/retrparams/name", model.getValue("/root/hidden/incmpsn/name"));
  411. model.setValue("/root/send/retrparams/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  412. }
  413. else
  414. {
  415. model.setValue("/root/send/retrparams/name", "");
  416. model.setValue("/root/send/retrparams/rrgstno", "");
  417. }
  418. }
  419. model.refresh();
  420. fRetrieve();
  421. ]]>
  422. </script>
  423. </input>
  424. <select1 id="cmb_day" ref="/root/send/retrparams/dayflag" class="combo_s_essential" navindex="-1" appearance="minimal" style="left:370px; top:8px; width:100px; height:19px; ">
  425. <choices>
  426. <item>
  427. <label>지급일자</label>
  428. <value>P</value>
  429. </item>
  430. <item>
  431. <label>귀속년월</label>
  432. <value>G</value>
  433. </item>
  434. </choices>
  435. <script type="javascript" ev:event="xforms-value-changed">
  436. <![CDATA[
  437. if ( cmb_day.value == "G" ) {
  438. ipt_frym.attribute("format") = "yyyy-mm";
  439. ipt_toym.attribute("format") = "yyyy-mm";
  440. model.refresh();
  441. }
  442. if ( cmb_day.value == "P" ) {
  443. ipt_frym.attribute("format") = "yyyy-mm-dd";
  444. ipt_toym.attribute("format") = "yyyy-mm-dd";
  445. model.refresh();
  446. }
  447. ]]>
  448. </script>
  449. </select1>
  450. <caption id="caption1" class="search_name" style="left:280px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  451. </group>
  452. <line id="line3" class="line_1" style="x1:0px; y1:93px; x2:1195px; y2:93px; "/>
  453. <caption id="caption21" class="tit_2" style="left:5px; top:78px; width:139px; height:14px; ">사업소득자 목록</caption>
  454. <group id="group2" scroll="auto" style="left:0px; top:0px; width:1195px; height:27px; ">
  455. <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  456. <button id="btn_save" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
  457. <caption>저장</caption>
  458. <script type="javascript" ev:event="DOMActivate">
  459. <![CDATA[
  460. fSave();
  461. ]]>
  462. </script>
  463. </button>
  464. <button id="btn_print" class="btn4_letter2" style="left:1080px; top:3px; width:56px; height:22px; ">
  465. <caption>출력</caption>
  466. <script type="javascript" ev:event="DOMActivate">
  467. <![CDATA[
  468. // 2011.07.13 CYW
  469. // * 조회기준이 소득자가 포함되어있는 경우에만 출력 가능함.
  470. var flag = true;
  471. var orchCnt = getNodesetCount("/root/main/list/orchlist");
  472. for( var i = 1 ; i <= orchCnt ; i++ ){
  473. if( model.getValue("/root/main/list/orchlist[1]/name") != model.getValue("/root/main/list/orchlist[" + i + "]/name") ){
  474. flag = false;
  475. }
  476. }
  477. if( flag == true ){
  478. fPrint();
  479. }else{
  480. messageBox("소득자 기준으로 조회해야 출력 가능합니다. 소득자를 조회해주십시오.", "E000", "");
  481. }
  482. model.refresh();
  483. ]]>
  484. </script>
  485. </button>
  486. </group>
  487. <button id="btn_addrow" class="btn2_letter3" style="left:1017px; top:73px; width:53px; height:19px; text-align:left; ">
  488. <caption>행추가</caption>
  489. <script type="javascript" ev:event="DOMActivate">
  490. <![CDATA[
  491. misfGridIUD(grd_orchlist, "A");
  492. var dayno = getCurrentDate();
  493. grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("chrgflag")) = "B";
  494. grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("taxrate")) = "3";
  495. grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("paydd")) = dayno;
  496. grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("getdd")) = dayno.substr(0, 6);
  497. // misfSetReadOnlyCol(grd_orchlist, "ionatiflag", true, grd_orchlist.row);
  498. ]]>
  499. </script>
  500. </button>
  501. <button id="btn_delrow" class="btn2_letter3" style="left:1072px; top:73px; width:53px; height:19px; text-align:left; ">
  502. <caption>행삭제</caption>
  503. <script type="javascript" ev:event="DOMActivate">
  504. <![CDATA[
  505. // var iLength = grd_orchlist.selectedCells.length;
  506. var iLength = grd_orchlist.selectedRows;
  507. for(var i=0; i<iLength; i++)
  508. {
  509. var iRowIdx = grd_orchlist.selectedCells.item(i).row;
  510. if(model.getValue(grd_orchlist.nodeset + "[" + iRowIdx + "]/slipyn") != "Y")
  511. {
  512. if(grd_orchlist.rowStatus(iRowIdx) == 4)
  513. {
  514. grd_orchlist.rowStatus(iRowIdx) = 0;
  515. }
  516. else if(grd_orchlist.rowStatus(iRowIdx) == 1 && grd_orchlist.rowStatus(iRowIdx) == 3)
  517. {
  518. grd_orchlist.deleteRow(iRowIdx, false);
  519. }
  520. else
  521. {
  522. grd_orchlist.addStatus(iRowIdx, "delete");
  523. }
  524. }
  525. }
  526. ]]>
  527. </script>
  528. </button>
  529. <output id="opt_temp" ref="/root/hidden/incmpsn/name" visibility="hidden" style="left:914px; top:73px; width:20px; height:19px; "/>
  530. <caption id="caption10" style="left:180px; top:77px; width:15px; height:15px; background-color:#c0c0c0; "/>
  531. <caption id="caption11" style="left:198px; top:78px; width:202px; height:14px; ">전표 사업소득 삭제 및 수정 불가</caption>
  532. <button id="btn_excel" class="btn2_letter4" style="left:1127px; top:73px; width:64px; height:19px; text-align:left; ">
  533. <caption>엑셀저장</caption>
  534. <script type="javascript" ev:event="DOMActivate">
  535. <![CDATA[
  536. var sTitle = "사업소득 " + model.getValue("/root/send/retrparams/frdd").substr(2, 2) + "-" + model.getValue("/root/send/retrparams/frdd").substr(4, 2) + "-" + model.getValue("/root/send/retrparams/frdd").substr(6, 2) + " ~ " + model.getValue("/root/send/retrparams/todd").substr(2, 2) + "-" + model.getValue("/root/send/retrparams/todd").substr(4, 2) + "-" + model.getValue("/root/send/retrparams/todd").substr(6, 2);
  537. misfSaveExcel(grd_excel, sTitle);
  538. ]]>
  539. </script>
  540. </button>
  541. <datagrid id="grd_orchlist" nodeset="/root/main/list/orchlist" backcoloralternate="#ffffff" caption="확인^품의번호^기관코드^일련번호^세부일련번호^징수구분^사원번호^성명^주민등록번호^귀속년도^귀속일자^지급일자^귀속년월^사업자등록번호^상호^적 요^지급액^세율^소득세^주민세^계^우편번호^우편번호^우편번호^우편번호일련번호^주소^상위주소^상세주소^업종구분^소득구분" colwidth="45, 150, 0, 0, 0, 0, 0, 99, 110, 0, 0, 90, 90, 0, 0, 0, 150, 40, 90, 80, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0" dataheight="25" ellipsis="true" explorerbar="sortshow" frozencols="9" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:142px; width:1193px; height:617px; ">
  542. <col disabled="true" ref="chknm" type="input" style="text-align:center; "/>
  543. <col ref="pumno" type="input" format="99999999-99999999" style="text-align:center; "/>
  544. <col ref="instcd" visibility="hidden"/>
  545. <col ref="seqno" visibility="hidden"/>
  546. <col ref="detlseqno" visibility="hidden"/>
  547. <col ref="chrgflag" visibility="hidden"/>
  548. <col ref="emplno" visibility="hidden"/>
  549. <col ref="name" type="inputbutton"/>
  550. <col ref="rrgstno" type="input" format="999999-9999999" style="text-align:center; "/>
  551. <col ref="posyear" visibility="hidden" style="text-align:center; "/>
  552. <col ref="posdd" type="inputdate" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
  553. <col ref="paydd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  554. <col ref="getdd" type="inputdate" format="yyyy-mm" style="text-align:center; "/>
  555. <col ref="entrregno" visibility="hidden" format="999-99-99999"/>
  556. <col ref="custnm" visibility="hidden"/>
  557. <col ref="cmt" type="input" visibility="hidden" style="text-align:left; "/>
  558. <col ref="paytotamt" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  559. <col disabled="true" ref="taxrate" format="## %" style="text-align:right; padding-right:1; "/>
  560. <col disabled="true" ref="incmtax" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  561. <col disabled="true" ref="resdntax" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  562. <col disabled="true" ref="sumamt" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  563. <col ref="zipcd" type="inputbutton" visibility="hidden" style="text-align:center; "/>
  564. <col ref="zipcd1" visibility="hidden"/>
  565. <col ref="zipcd2" visibility="hidden"/>
  566. <col ref="zipcdseqno" visibility="hidden"/>
  567. <col ref="address" visibility="hidden"/>
  568. <col ref="supaddr" type="input" visibility="hidden" style="text-align:left; "/>
  569. <col ref="infaddr" type="input" visibility="hidden" style="text-align:left; "/>
  570. <col ref="induflag" type="combo" visibility="hidden">
  571. <choices>
  572. <itemset nodeset="/root/init/R0278list/R0278">
  573. <label ref="cdnm"/>
  574. <value ref="cdid"/>
  575. </itemset>
  576. </choices>
  577. </col>
  578. <col ref="incmflag" type="combo" visibility="hidden">
  579. <choices>
  580. <itemset nodeset="/root/init/R0279list/R0279">
  581. <label ref="cdnm"/>
  582. <value ref="cdid"/>
  583. </itemset>
  584. </choices>
  585. </col>
  586. <script type="javascript" ev:event="onclick">
  587. <![CDATA[
  588. ]]>
  589. </script>
  590. <script type="javascript" ev:event="onbuttonclick">
  591. <![CDATA[
  592. if(grd_orchlist.col == grd_orchlist.colRef("name"))
  593. {
  594. model.removenode("/root/hidden/incmpsn");
  595. model.makeNode("/root/hidden/incmpsn");
  596. model.copyNode("/root/hidden/incmpsn", "/root/hidden/incmpsntemp");
  597. misfOpenPopUpList("31", opt_temp, "", "rrgstno,name,entrregno,custnm,zipcd,zipcd1,zipcd2,zipcdseqno,supaddr,infaddr,cntctel,emailaddr,cmt,ionatiflag,incmflag", "");
  598. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  599. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  600. // model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/ionatiflag", model.getValue("/root/hidden/incmpsn/ionatiflag"));
  601. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posdd", getCurrentDate());
  602. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posyear", getCurrentDate().substr(0, 4));
  603. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", (model.getValue("/root/hidden/incmpsn/zipcd1") == "" ? "" : model.getValue("/root/hidden/incmpsn/zipcd1") + "-" + model.getValue("/root/hidden/incmpsn/zipcd1")));
  604. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd1", model.getValue("/root/hidden/incmpsn/zipcd1"));
  605. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd2", model.getValue("/root/hidden/incmpsn/zipcd2"));
  606. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcdseqno", model.getValue("/root/hidden/incmpsn/zipcdseqno"));
  607. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/incmpsn/supaddr"));
  608. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/infaddr", model.getValue("/root/hidden/incmpsn/infaddr"));
  609. }
  610. else if(grd_orchlist.col == grd_orchlist.colRef("zipcd"))
  611. {
  612. misfOpenPopUpList("04", opt_zipcd, "", "zipcd1,zipcd2,supaddr,zipcdseqno");
  613. var sZipcd = model.getValue("/root/hidden/zipcd/zipcd1") + '-' + model.getValue("/root/hidden/zipcd/zipcd2");
  614. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", sZipcd);
  615. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/zipcd/supaddr"));
  616. }
  617. model.refresh();
  618. ]]>
  619. </script>
  620. <script type="javascript" ev:event="xforms-value-changed">
  621. <![CDATA[
  622. if(grd_orchlist.col == grd_orchlist.colRef("name") || grd_orchlist.col == grd_orchlist.colRef("rrgstno"))
  623. {
  624. model.setValue("/root/send/rertparams2/instcd", model.getValue("/root/send/retrparams/instcd"));
  625. if(grd_orchlist.col == grd_orchlist.colRef("name"))
  626. {
  627. model.setValue("/root/send/rertparams2/name", grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("name")));
  628. model.setValue("/root/send/rertparams2/rrgstno", "");
  629. model.setValue("/root/send/rertparams2/retrflag", "name");
  630. }
  631. else if(grd_orchlist.col == grd_orchlist.colRef("rrgstno"))
  632. {
  633. model.setValue("/root/send/rertparams2/name", "");
  634. model.setValue("/root/send/rertparams2/rrgstno", grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("rrgstno")));
  635. model.setValue("/root/send/rertparams2/retrflag", "code");
  636. }
  637. if (submit("TRRAC00611"))
  638. {
  639. if (instance1.selectNodes("/root/hidden/incmpsn").length > 0)
  640. {
  641. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  642. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  643. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posyear", getCurrentDate());
  644. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", (model.getValue("/root/hidden/incmpsn/zipcd1") == "" ? "" : model.getValue("/root/hidden/incmpsn/zipcd1") + "-" + model.getValue("/root/hidden/incmpsn/zipcd1")));
  645. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd1", model.getValue("/root/hidden/incmpsn/zipcd1"));
  646. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd2", model.getValue("/root/hidden/incmpsn/zipcd2"));
  647. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcdseqno", model.getValue("/root/hidden/incmpsn/zipcdseqno"));
  648. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/incmpsn/supaddr"));
  649. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/infaddr", model.getValue("/root/hidden/incmpsn/infaddr"));
  650. }
  651. }
  652. }
  653. else if(grd_orchlist.col == grd_orchlist.colRef("paytotamt"))
  654. {
  655. fPayCalc();
  656. }
  657. else if(grd_orchlist.col == grd_orchlist.colRef("incmtax") || grd_orchlist.col == grd_orchlist.colRef("resdntax"))
  658. {
  659. var iIncmTax = parseInt(model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/incmtax") == "" ? 0 : model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/incmtax"), 10);
  660. var iResdnTax = parseInt(model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/resdntax") == "" ? 0 : model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/resdntax"), 10);
  661. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/sumamt", iIncmTax + iResdnTax);
  662. }
  663. ]]>
  664. </script>
  665. <script type="javascript" ev:event="onaftersort">
  666. <![CDATA[
  667. grd_orchlist.gridToInstance();
  668. ]]>
  669. </script>
  670. </datagrid>
  671. <output id="output5" ref="/root/send/printparams/incmTax" format="(-)#,###" style="left:797px; top:122px; width:86px; height:19px; text-align:right; margin-right:1; "/>
  672. <output id="output8" ref="/root/send/printparams/payTotAmt" format="(-)#,###" style="left:646px; top:122px; width:107px; height:19px; text-align:right; margin-right:1; "/>
  673. <line id="line11" class="line_3" style="x1:644px; y1:98px; x2:644px; y2:142px; "/>
  674. <line id="line13" class="line_3" style="x1:754px; y1:98px; x2:754px; y2:142px; "/>
  675. <caption id="cap_item" class="cell_1" style="left:886px; top:98px; width:77px; height:23px; text-align:center; vertical-align:middle; ">주민세</caption>
  676. <caption id="caption15" class="cell_1" style="left:797px; top:98px; width:86px; height:23px; text-align:center; vertical-align:middle; ">소득세</caption>
  677. <output id="output1" ref="/root/send/printparams/resdnTax" format="(-)#,###" style="left:886px; top:122px; width:77px; height:19px; text-align:right; margin-right:1; "/>
  678. <caption id="caption18" class="cell_1" style="left:646px; top:98px; width:107px; height:23px; text-align:center; vertical-align:middle; ">총지급액</caption>
  679. <line id="line6" class="line_3" style="x1:964px; y1:98px; x2:964px; y2:142px; "/>
  680. <caption id="caption19" class="cell_1" style="left:556px; top:120px; width:87px; height:21px; text-align:center; vertical-align:middle; ">계</caption>
  681. <line id="line7" class="line_3" style="x1:884px; y1:98px; x2:884px; y2:142px; "/>
  682. <output id="opt_zipcd" ref="/root/hidden/zipcd/zipcd1" navindex="-1" visibility="hidden" style="left:895px; top:73px; width:20px; height:19px; text-align:left; "/>
  683. <button id="btn_openpsn" class="btn2_letter5" style="left:938px; top:73px; width:75px; height:19px; ">
  684. <caption>소득자등록</caption>
  685. <script type="javascript" ev:event="DOMActivate">
  686. <![CDATA[
  687. model.makeValue("/root/source/receiveref", "/root/hidden/incmpsntemp");
  688. model.refresh();
  689. modal("SPRAC00611","","","","","/root/source", "/root/target" );
  690. model.refresh();
  691. ]]>
  692. </script>
  693. </button>
  694. <output id="output2" ref="/root/hidden/checkedcnt" visibility="hidden" style="left:105px; top:110px; width:25px; height:20px; "/>
  695. <datagrid id="grd_excel" nodeset="/root/main/list/orchlist" visibility="hidden" backcoloralternate="#ffffff" caption="확인^품의번호^성명^주민등록번호^지급일자^귀속년월^지급액^세율^소득세^주민세^계" dataheight="25" ellipsis="true" frozencols="9" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:65px; top:575px; width:83px; height:74px; ">
  696. <col disabled="true" ref="chknm" type="input" style="text-align:center; "/>
  697. <col ref="pumno" type="input" format="99999999-99999999" style="text-align:center; "/>
  698. <col ref="name" type="inputbutton"/>
  699. <col ref="rrgstno" type="input" format="999999-9999999" style="text-align:center; "/>
  700. <col ref="paydd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  701. <col ref="getdd" type="inputdate" format="yyyy-mm" style="text-align:center; "/>
  702. <col ref="paytotamt" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  703. <col disabled="true" ref="taxrate" format="## %" style="text-align:right; padding-right:1; "/>
  704. <col disabled="true" ref="incmtax" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  705. <col disabled="true" ref="resdntax" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  706. <col disabled="true" ref="sumamt" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  707. <script type="javascript" ev:event="onclick">
  708. <![CDATA[
  709. ]]>
  710. </script>
  711. <script type="javascript" ev:event="onbuttonclick">
  712. <![CDATA[
  713. if(grd_orchlist.col == grd_orchlist.colRef("name"))
  714. {
  715. model.removenode("/root/hidden/incmpsn");
  716. model.makeNode("/root/hidden/incmpsn");
  717. model.copyNode("/root/hidden/incmpsn", "/root/hidden/incmpsntemp");
  718. misfOpenPopUpList("31", opt_temp, "", "rrgstno,name,entrregno,custnm,zipcd,zipcd1,zipcd2,zipcdseqno,supaddr,infaddr,cntctel,emailaddr,cmt,ionatiflag,incmflag", "");
  719. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  720. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  721. // model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/ionatiflag", model.getValue("/root/hidden/incmpsn/ionatiflag"));
  722. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posyear", getCurrentDate());
  723. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", (model.getValue("/root/hidden/incmpsn/zipcd1") == "" ? "" : model.getValue("/root/hidden/incmpsn/zipcd1") + "-" + model.getValue("/root/hidden/incmpsn/zipcd1")));
  724. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd1", model.getValue("/root/hidden/incmpsn/zipcd1"));
  725. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd2", model.getValue("/root/hidden/incmpsn/zipcd2"));
  726. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcdseqno", model.getValue("/root/hidden/incmpsn/zipcdseqno"));
  727. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/incmpsn/supaddr"));
  728. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/infaddr", model.getValue("/root/hidden/incmpsn/infaddr"));
  729. }
  730. else if(grd_orchlist.col == grd_orchlist.colRef("zipcd"))
  731. {
  732. misfOpenPopUpList("04", opt_zipcd, "", "zipcd1,zipcd2,supaddr,zipcdseqno");
  733. var sZipcd = model.getValue("/root/hidden/zipcd/zipcd1") + '-' + model.getValue("/root/hidden/zipcd/zipcd2");
  734. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", sZipcd);
  735. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/zipcd/supaddr"));
  736. }
  737. model.refresh();
  738. ]]>
  739. </script>
  740. <script type="javascript" ev:event="xforms-value-changed">
  741. <![CDATA[
  742. if(grd_orchlist.col == grd_orchlist.colRef("name") || grd_orchlist.col == grd_orchlist.colRef("rrgstno"))
  743. {
  744. model.setValue("/root/send/rertparams2/instcd", model.getValue("/root/send/retrparams/instcd"));
  745. if(grd_orchlist.col == grd_orchlist.colRef("name"))
  746. {
  747. model.setValue("/root/send/rertparams2/name", grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("name")));
  748. model.setValue("/root/send/rertparams2/rrgstno", "");
  749. model.setValue("/root/send/rertparams2/retrflag", "name");
  750. }
  751. else if(grd_orchlist.col == grd_orchlist.colRef("rrgstno"))
  752. {
  753. model.setValue("/root/send/rertparams2/name", "");
  754. model.setValue("/root/send/rertparams2/rrgstno", grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("rrgstno")));
  755. model.setValue("/root/send/rertparams2/retrflag", "code");
  756. }
  757. if (submit("TRRAC00611"))
  758. {
  759. if (instance1.selectNodes("/root/hidden/incmpsn").length > 0)
  760. {
  761. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  762. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  763. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posyear", getCurrentDate());
  764. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", (model.getValue("/root/hidden/incmpsn/zipcd1") == "" ? "" : model.getValue("/root/hidden/incmpsn/zipcd1") + "-" + model.getValue("/root/hidden/incmpsn/zipcd1")));
  765. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd1", model.getValue("/root/hidden/incmpsn/zipcd1"));
  766. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd2", model.getValue("/root/hidden/incmpsn/zipcd2"));
  767. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcdseqno", model.getValue("/root/hidden/incmpsn/zipcdseqno"));
  768. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/incmpsn/supaddr"));
  769. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/infaddr", model.getValue("/root/hidden/incmpsn/infaddr"));
  770. }
  771. }
  772. }
  773. else if(grd_orchlist.col == grd_orchlist.colRef("dayno") || grd_orchlist.col == grd_orchlist.colRef("dypay"))
  774. {
  775. fPayCalc();
  776. }
  777. ]]>
  778. </script>
  779. </datagrid>
  780. <line id="line2" class="line_3" style="x1:795px; y1:98px; x2:795px; y2:142px; "/>
  781. <datagrid id="prt_orchlist" nodeset="/root/main/list/prtorchlist" visibility="hidden" backcoloralternate="#ffffff" caption="확인^품의번호^기관코드^일련번호^세부일련번호^징수구분^사원번호^성명^주민등록번호^귀속년도^귀속일자^지급일자^귀속년월^사업자등록번호^상호^적 요^지급액^세율^소득세^주민세^계^우편번호^우편번호^우편번호^우편번호일련번호^주소^상위주소^상세주소^업종구분^소득구분" colwidth="45, 150, 0, 0, 0, 0, 0, 99, 110, 0, 0, 90, 90, 0, 0, 0, 150, 40, 90, 80, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0" dataheight="25" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:120px; top:340px; width:375px; height:180px; ">
  782. <col disabled="true" ref="chknm" type="input" style="text-align:center; "/>
  783. <col ref="pumno" type="input" format="99999999-99999999" style="text-align:center; "/>
  784. <col ref="instcd" visibility="hidden"/>
  785. <col ref="seqno" visibility="hidden"/>
  786. <col ref="detlseqno" visibility="hidden"/>
  787. <col ref="chrgflag" visibility="hidden"/>
  788. <col ref="emplno" visibility="hidden"/>
  789. <col ref="name" type="inputbutton"/>
  790. <col ref="rrgstno" type="input" format="999999-9999999" style="text-align:center; "/>
  791. <col ref="posyear" visibility="hidden" style="text-align:center; "/>
  792. <col ref="posdd" type="inputdate" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
  793. <col ref="paydd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  794. <col ref="getdd" type="inputdate" format="yyyy-mm" style="text-align:center; "/>
  795. <col ref="entrregno" visibility="hidden" format="999-99-99999"/>
  796. <col ref="custnm" visibility="hidden"/>
  797. <col ref="cmt" type="input" visibility="hidden" style="text-align:left; "/>
  798. <col ref="paytotamt" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  799. <col disabled="true" ref="taxrate" format="## %" style="text-align:right; padding-right:1; "/>
  800. <col disabled="true" ref="incmtax" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  801. <col disabled="true" ref="resdntax" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  802. <col disabled="true" ref="sumamt" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  803. <col ref="zipcd" type="inputbutton" visibility="hidden" style="text-align:center; "/>
  804. <col ref="zipcd1" visibility="hidden"/>
  805. <col ref="zipcd2" visibility="hidden"/>
  806. <col ref="zipcdseqno" visibility="hidden"/>
  807. <col ref="address" visibility="hidden"/>
  808. <col ref="supaddr" type="input" visibility="hidden" style="text-align:left; "/>
  809. <col ref="infaddr" type="input" visibility="hidden" style="text-align:left; "/>
  810. <col ref="induflag" type="combo" visibility="hidden">
  811. <choices>
  812. <itemset nodeset="/root/init/R0278list/R0278">
  813. <label ref="cdnm"/>
  814. <value ref="cdid"/>
  815. </itemset>
  816. </choices>
  817. </col>
  818. <col ref="incmflag" type="combo" visibility="hidden">
  819. <choices>
  820. <itemset nodeset="/root/init/R0279list/R0279">
  821. <label ref="cdnm"/>
  822. <value ref="cdid"/>
  823. </itemset>
  824. </choices>
  825. </col>
  826. <script type="javascript" ev:event="onclick">
  827. <![CDATA[
  828. ]]>
  829. </script>
  830. <script type="javascript" ev:event="onbuttonclick">
  831. <![CDATA[
  832. if(grd_orchlist.col == grd_orchlist.colRef("name"))
  833. {
  834. model.removenode("/root/hidden/incmpsn");
  835. model.makeNode("/root/hidden/incmpsn");
  836. model.copyNode("/root/hidden/incmpsn", "/root/hidden/incmpsntemp");
  837. misfOpenPopUpList("31", opt_temp, "", "rrgstno,name,entrregno,custnm,zipcd,zipcd1,zipcd2,zipcdseqno,supaddr,infaddr,cntctel,emailaddr,cmt,ionatiflag,incmflag", "");
  838. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  839. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  840. // model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/ionatiflag", model.getValue("/root/hidden/incmpsn/ionatiflag"));
  841. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posdd", getCurrentDate());
  842. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posyear", getCurrentDate().substr(0, 4));
  843. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", (model.getValue("/root/hidden/incmpsn/zipcd1") == "" ? "" : model.getValue("/root/hidden/incmpsn/zipcd1") + "-" + model.getValue("/root/hidden/incmpsn/zipcd1")));
  844. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd1", model.getValue("/root/hidden/incmpsn/zipcd1"));
  845. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd2", model.getValue("/root/hidden/incmpsn/zipcd2"));
  846. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcdseqno", model.getValue("/root/hidden/incmpsn/zipcdseqno"));
  847. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/incmpsn/supaddr"));
  848. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/infaddr", model.getValue("/root/hidden/incmpsn/infaddr"));
  849. }
  850. else if(grd_orchlist.col == grd_orchlist.colRef("zipcd"))
  851. {
  852. misfOpenPopUpList("04", opt_zipcd, "", "zipcd1,zipcd2,supaddr,zipcdseqno");
  853. var sZipcd = model.getValue("/root/hidden/zipcd/zipcd1") + '-' + model.getValue("/root/hidden/zipcd/zipcd2");
  854. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", sZipcd);
  855. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/zipcd/supaddr"));
  856. }
  857. model.refresh();
  858. ]]>
  859. </script>
  860. <script type="javascript" ev:event="xforms-value-changed">
  861. <![CDATA[
  862. if(grd_orchlist.col == grd_orchlist.colRef("name") || grd_orchlist.col == grd_orchlist.colRef("rrgstno"))
  863. {
  864. model.setValue("/root/send/rertparams2/instcd", model.getValue("/root/send/retrparams/instcd"));
  865. if(grd_orchlist.col == grd_orchlist.colRef("name"))
  866. {
  867. model.setValue("/root/send/rertparams2/name", grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("name")));
  868. model.setValue("/root/send/rertparams2/rrgstno", "");
  869. model.setValue("/root/send/rertparams2/retrflag", "name");
  870. }
  871. else if(grd_orchlist.col == grd_orchlist.colRef("rrgstno"))
  872. {
  873. model.setValue("/root/send/rertparams2/name", "");
  874. model.setValue("/root/send/rertparams2/rrgstno", grd_orchlist.valueMatrix(grd_orchlist.row, grd_orchlist.colRef("rrgstno")));
  875. model.setValue("/root/send/rertparams2/retrflag", "code");
  876. }
  877. if (submit("TRRAC00611"))
  878. {
  879. if (instance1.selectNodes("/root/hidden/incmpsn").length > 0)
  880. {
  881. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  882. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  883. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/posyear", getCurrentDate());
  884. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd", (model.getValue("/root/hidden/incmpsn/zipcd1") == "" ? "" : model.getValue("/root/hidden/incmpsn/zipcd1") + "-" + model.getValue("/root/hidden/incmpsn/zipcd1")));
  885. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd1", model.getValue("/root/hidden/incmpsn/zipcd1"));
  886. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcd2", model.getValue("/root/hidden/incmpsn/zipcd2"));
  887. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/zipcdseqno", model.getValue("/root/hidden/incmpsn/zipcdseqno"));
  888. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/supaddr", model.getValue("/root/hidden/incmpsn/supaddr"));
  889. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/infaddr", model.getValue("/root/hidden/incmpsn/infaddr"));
  890. }
  891. }
  892. }
  893. else if(grd_orchlist.col == grd_orchlist.colRef("paytotamt"))
  894. {
  895. fPayCalc();
  896. }
  897. else if(grd_orchlist.col == grd_orchlist.colRef("incmtax") || grd_orchlist.col == grd_orchlist.colRef("resdntax"))
  898. {
  899. var iIncmTax = parseInt(model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/incmtax") == "" ? 0 : model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/incmtax"), 10);
  900. var iResdnTax = parseInt(model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/resdntax") == "" ? 0 : model.getValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/resdntax"), 10);
  901. model.setValue(grd_orchlist.nodeset + "[" + grd_orchlist.row + "]/sumamt", iIncmTax + iResdnTax);
  902. }
  903. ]]>
  904. </script>
  905. </datagrid>
  906. <select1 id="cmb_gruptype" ref="/root/send/retrparams/groupid" class="combo_s_essential" navindex="-1" visibility="hidden" appearance="minimal" style="left:99px; top:8px; width:66px; height:19px; ">
  907. <choices>
  908. <itemset nodeset="/root/init/cmb_gruptype/comcodelist">
  909. <label ref="cdnm"/>
  910. <value ref="cdid"/>
  911. </itemset>
  912. </choices>
  913. </select1>
  914. </group>
  915. <caption id="caption5" class="cell_1" style="left:966px; top:111px; width:87px; height:23px; text-align:center; vertical-align:middle; ">계</caption>
  916. <output id="output3" ref="/root/send/printparams/isumAmt" format="(-)#,###" style="left:966px; top:135px; width:87px; height:19px; text-align:right; margin-right:1; "/>
  917. <line id="line4" class="line_3" style="x1:1054px; y1:111px; x2:1054px; y2:155px; "/>
  918. </xhtml:body>
  919. </xhtml:html>