SMRAT00500_기타소득소득자별연간집계표.xrw 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <etcproflist/>
  12. <prntetcproflist/>
  13. </list>
  14. <printlist>
  15. <fstpage/>
  16. <secpage/>
  17. </printlist>
  18. <cadl>
  19. <cadllist/>
  20. </cadl>
  21. </main>
  22. <send>
  23. <retrparams>
  24. <instcd/>
  25. <frdd/>
  26. <todd/>
  27. <incmflag/>
  28. <ionatiflag/>
  29. <residentflag/>
  30. <rrgstno/>
  31. <name/>
  32. <retrkind>all</retrkind>
  33. <needpay/>
  34. <dayflag/>
  35. <groupid/>
  36. </retrparams>
  37. <rertparams2>
  38. <instcd/>
  39. <name/>
  40. <rrgstno/>
  41. <retrflag/>
  42. </rertparams2>
  43. <printparams>
  44. <secPageCnt/>
  45. <allEtcProf/>
  46. <allCount/>
  47. <payTotAmt/>
  48. <payAmt/>
  49. <profTax/>
  50. <incmTax/>
  51. <resdnTax/>
  52. <sumAmt/>
  53. <lawTax>0</lawTax>
  54. <nhTax>0</nhTax>
  55. </printparams>
  56. <data1>
  57. <instcd/>
  58. <rrgstno/>
  59. </data1>
  60. <emplcheck>
  61. <instcd/>
  62. <emplno/>
  63. </emplcheck>
  64. <incmpsn>
  65. <incmpsnlist/>
  66. </incmpsn>
  67. <list>
  68. <etcproflist/>
  69. </list>
  70. </send>
  71. <init/>
  72. <temp/>
  73. <hidden>
  74. <incmpsn>
  75. <name/>
  76. <rrgstno/>
  77. <entrregno/>
  78. <custnm/>
  79. <zipcd/>
  80. <zipcd1/>
  81. <zipcd2/>
  82. <zipcdseqno/>
  83. <supaddr/>
  84. <infaddr/>
  85. <cntctel/>
  86. <emailaddr/>
  87. <cmt/>
  88. <ionatiflag/>
  89. <incmflag/>
  90. <passport/>
  91. </incmpsn>
  92. <prntlist>
  93. <etcprofprntlist/>
  94. </prntlist>
  95. <incmpsntemp>
  96. <name/>
  97. <rrgstno/>
  98. <entrregno/>
  99. <custnm/>
  100. <zipcd/>
  101. <zipcd1/>
  102. <zipcd2/>
  103. <zipcdseqno/>
  104. <supaddr/>
  105. <infaddr/>
  106. <cntctel/>
  107. <emailaddr/>
  108. <cmt/>
  109. <ionatiflag/>
  110. <induflag/>
  111. <incmflag/>
  112. </incmpsntemp>
  113. <checkedcnt/>
  114. <excelupload>
  115. <exceluploadlist/>
  116. </excelupload>
  117. <emplcntcheck/>
  118. <name/>
  119. <rrgstno/>
  120. <zipcd1/>
  121. <zipcd2/>
  122. <supaddr/>
  123. <infaddr/>
  124. <incmpsnlist>
  125. <instcd/>
  126. <rrgstno/>
  127. <name/>
  128. <zipcd1/>
  129. <zipcd2/>
  130. <supaddr/>
  131. <infaddr/>
  132. <ionatiflag/>
  133. </incmpsnlist>
  134. <prntetclist/>
  135. </hidden>
  136. </root>
  137. </instance>
  138. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  139. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  140. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  141. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  142. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  143. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  144. <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
  145. <script type="javascript" ev:event="xforms-ready">
  146. <![CDATA[
  147. fInitialize();
  148. model.setValue("/root/send/retrparams/needpay", "80");
  149. model.setValue("/root/send/retrparams/dayflag", "P");
  150. model.refresh();
  151. ]]>
  152. </script>
  153. <script type="javascript">
  154. <![CDATA[
  155. function fInitialize()
  156. {
  157. // 2011.09.26 cyw 해당실무자만이 메뉴접근 가능하도록 수정.
  158. misfComboComCdList("030R0018",cmb_gruptype);
  159. var cnt = getNodesetCount("/root/init/cmb_gruptype/comcodelist");
  160. var chk = 0;
  161. for(var i = 1; i <= cnt; i++ ){
  162. if( model.getValue("/root/init/cmb_gruptype/comcodelist[" + i + "]/cdid") == getUserId() ){
  163. chk++;
  164. }
  165. }
  166. if( chk > 0 ){
  167. group3.disabled = false;
  168. }else{
  169. group3.disabled = true;
  170. messageBox("해당 화면에 권한이 없습니다.", "C000");
  171. }
  172. model.removenode("/root/main/list/etcproflist");
  173. //2012.05.21 박준범 - grid multi select를 위해 misfMsterDetailSet 사용안함
  174. //misfMsterDetailSet(grd_etcproflist, null, "TRRAT00501", "Y");
  175. misfComboComCdList("R0279", cmb_incmflag1, "Y");
  176. misfComboComCdList("R0347", cmb_incmflag2, "Y");
  177. misfComboComCdListMulti("Z0007", "cmb_instcd");
  178. // misfComboComCdListMulti("Z0007,R0279", "cmb_instcd,grd_etcproflist.incmflag");
  179. model.setValue("/root/send/retrparams/instcd", getUserInfo("dutplceinstcd"));
  180. model.setValue("/root/send/retrparams/frdd", getCurrentDate());
  181. model.setValue("/root/send/retrparams/todd", getCurrentDate());
  182. model.setValue("/root/send/rertparams2/instcd", getUserInfo("dutplceinstcd"));
  183. fSetResidentflag();
  184. model.refresh();
  185. //fRetrieve();
  186. grd_etcproflist.rowHeight(0) = 35;
  187. }
  188. function fRetrieve()
  189. {
  190. //2012.05.21 박준범 - misfGridInit 추가
  191. //misfGridInit : model.removeNodeset(grd_etcproflist.nodeset); grid.refresh();
  192. misfGridInit(grd_etcproflist);
  193. submit("TRRAT00501");
  194. for(var i=1; i<grd_etcproflist.rows; i++)
  195. {
  196. if(model.getValue(grd_etcproflist.nodeset + "[" + i + "]/chkyn") == "Y")
  197. {
  198. model.setValue(grd_etcproflist.nodeset + "[" + i + "]/chknm" , "확인");
  199. misfSetReadOnlyCol(grd_etcproflist, "pumno,incmflag,name,rrgstno,paydd,getdd,paytotamt",true,i);
  200. }else{
  201. misfSetReadOnlyCol(grd_etcproflist, "pumno,incmflag,name,rrgstno,paydd,getdd,paytotamt",false,i); //2011.10.11 cyw
  202. }
  203. // if(model.getValue(grd_etcproflist.nodeset + "[" + i + "]/slipyn") == "Y" && model.getValue("/root/send/retrparams/retrkind") == "all")
  204. // {
  205. // grd_etcproflist.rowStyle(i, "all", "background-color") = "#EAEAEA";
  206. // misfSetReadOnlyCol(grd_etcproflist, "incmflag,name,rrgstno,paytotamt,payamt,proftax,cmt", true, i);
  207. // }
  208. // else
  209. // {
  210. // grd_etcproflist.rowStyle(i, "all", "background-color") = "#FFFFFF";
  211. // }
  212. }
  213. // var rows = grd_etcproflist.rows - 1;
  214. // var st = grd_etcproflist.colRef("paydd");
  215. // grd_etcproflist.sort(1, st, rows, st) = "desc";
  216. // grd_etcproflist.refresh();
  217. fSetControlAttr();
  218. model.recalculate();
  219. }
  220. function fSave()
  221. {
  222. for(var i=1; i<grd_etcproflist.rows; i++)
  223. {
  224. var sRrgstno = grd_etcproflist.valueMatrix(i, grd_etcproflist.colRef("rrgstno"));
  225. var sPosYear = grd_etcproflist.valueMatrix(i, grd_etcproflist.colRef("posyear"));
  226. var sIncmFlag = grd_etcproflist.valueMatrix(i, grd_etcproflist.colRef("incmflag"));
  227. var sCmt = grd_etcproflist.valueMatrix(i, grd_etcproflist.colRef("cmt"));
  228. if(sRrgstno == "")
  229. {
  230. messageBox("소득자를", "C001");
  231. return;
  232. }
  233. // if(!isValidDateTime(sPosYear, "YYYYMMDD"))
  234. // {
  235. // messageBox("귀속 일자가 유효하지 않습니다.", "I000");
  236. // return;
  237. // }
  238. if(sIncmFlag == "")
  239. {
  240. messageBox("소득 구분코드를", "C001");
  241. return;
  242. }
  243. // if(sCmt == "")
  244. // {
  245. // messageBox("비고를", "C001");
  246. // return;
  247. // }
  248. }
  249. //2012.05.21 박준범 - grid multi select를 위해 misfSave 대신 submit 사용
  250. //misfSave("TXRAT00501");
  251. model.setValue("/root/send/list/etcproflist", grd_etcproflist.getUpdateData());
  252. submit("TXRAT00501");
  253. if(grd_icpn.rows > 1)
  254. {
  255. model.setValue("/root/send/incmpsn/incmpsnlist", grd_icpn.getUpdateData());
  256. submit("TXRAC00612");
  257. model.refresh();
  258. model.removeNodeset(grd_excelupload.nodeset);
  259. model.removeNodeset(grd_icpn.nodeset);
  260. }
  261. fRetrieve();
  262. }
  263. function fPrint()
  264. {
  265. /*
  266. fSetPrintNodeList();
  267. if(model.getValue(rdo_retrkind.attribute("ref")) == "all") // 전체
  268. {
  269. var iChkCnt = parseInt(model.getValue("/root/hidden/checkedcnt"), 10);
  270. var dlgRslt = 0;
  271. if(iChkCnt > 0)
  272. {
  273. dlgRslt = messageBox("선택된 소득만 출력하시겠습니까\n\nYes(선택자료) / No(전체)", "Q000");
  274. }
  275. if(dlgRslt == 6)
  276. {
  277. var iSelectedCnt = grd_etcproflist.selectedCells.length;
  278. var iCnt = 0;
  279. var iRowIdx = -1;
  280. var sRowIdxes = "";
  281. model.removenode("/root/hidden/prntlist");
  282. model.makeNode("/root/hidden/prntlist");
  283. for(var i=0; i<iSelectedCnt; i++)
  284. {
  285. iRowIdx = grd_etcproflist.selectedCells.item(i).row;
  286. if(!misfGetRowIdxExists(sRowIdxes, iRowIdx)) continue;
  287. sRowIdxes = sRowIdxes + iRowIdx + ",";
  288. iCnt = instance1.selectNodes("/root/hidden/prntlist/etcprofprntlist").length;
  289. model.makeNode("/root/hidden/prntlist/etcprofprntlist[" + (iCnt + 1) + "]");
  290. model.copyNode("/root/hidden/prntlist/etcprofprntlist[" + (iCnt + 1) + "]", "/root/main/list/etcproflist[" + iRowIdx + "]");
  291. }
  292. }
  293. else // 집합
  294. {
  295. var iLength = instance1.selectNodes("/root/main/list/etcproflist").length;
  296. model.removenode("/root/hidden/prntlist");
  297. model.makeNode("/root/hidden/prntlist");
  298. for(var i=1; i<=iLength; i++)
  299. {
  300. model.makeNode("/root/hidden/prntlist/etcprofprntlist[" + i + "]");
  301. model.copyNode("/root/hidden/prntlist/etcprofprntlist[" + i + "]", "/root/main/list/etcproflist[" + i + "]");
  302. }
  303. }
  304. exeReportPreview("RPRAD00201", "XMLSTR", "/root/send/printparams");
  305. }
  306. else
  307. {
  308. // exeReportPreview("RPRAT00501", "XMLSTR", "/root/send/printparams");
  309. // exeReportPreview("RPRAD00201", "XMLSTR", "/root/send/printparams");
  310. // 2011.08.08 cyw 기타소득 서식 수정.
  311. exeReportPreview("RPRAD00216", "XMLSTR");
  312. }
  313. */
  314. var iLength = instance1.selectNodes("/root/main/list/prntetcproflist").length;
  315. model.removenode("/root/hidden/prntetclist");
  316. model.makeNode("/root/hidden/prntetclist");
  317. //2011.10.04 cyw 선택영역만 출력가능하게
  318. if(grd_etcproflist.selectedRows >= 1 ){
  319. for( var a = 0 ; a < grd_etcproflist.selectedRows ; a++ ){
  320. model.makeNode("/root/hidden/prntetclist/etcproflist[" + (a+1) + "]");
  321. model.copyNode("/root/hidden/prntetclist/etcproflist[" + (a+1) + "]", "/root/main/list/etcproflist[" + grd_etcproflist.selectedRow(a) + "]");
  322. model.setValue("/root/hidden/prntetclist/etcproflist[" + (a+1) + "]/incmflag", grd_etcproflist.labelMatrix( grd_etcproflist.selectedRow(a), grd_etcproflist.colRef("incmflag")) + "(" + model.getValue("/root/main/list/etcproflist[" + grd_etcproflist.selectedRow(a) + "]/incmflag") + ")" );
  323. }
  324. }else{
  325. for(var i=1; i<=iLength; i++)
  326. {
  327. model.makeNode("/root/hidden/prntetclist/etcproflist[" + i + "]");
  328. model.copyNode("/root/hidden/prntetclist/etcproflist[" + i + "]", "/root/main/list/prntetcproflist[" + i + "]");
  329. model.setValue("/root/hidden/prntetclist/etcproflist[" + i + "]/incmflag", grd_prntetcproflist.labelMatrix( i, grd_prntetcproflist.colRef("incmflag")) + "(" + model.getValue("/root/main/list/prntetcproflist[" + i + "]/incmflag") + ")" );
  330. }
  331. }
  332. var lstcnt = getNodesetCount("/root/hidden/prntetclist");
  333. // 소득자, 발행자 구분값
  334. model.makeValue("/root/hidden/prntetclist/lstpaydd", model.getValue("/root/hidden/prntetclist/etcproflist[" + lstcnt + "]/paydd" ));
  335. model.makeValue("/root/hidden/prntetclist/flag", "1");
  336. exeReportPreview("RPRAD00216", "XMLSTR");
  337. model.makeValue("/root/hidden/prntetclist/flag", "2");
  338. exeReportPreview("RPRAD00216", "XMLSTR");
  339. model.refresh();
  340. }
  341. function fSetPrintNodeList()
  342. {
  343. //if(model.getValue("/root/send/retrparams/rrgstno") != "" && model.getValue("/root/send/retrparams/name") != "")
  344. if(model.getValue(rdo_retrkind.attribute("ref")) == "sum")
  345. {
  346. var iLength = instance1.selectNodes("/root/main/list/etcproflist").length;
  347. model.removenode("/root/hidden/prntlist");
  348. model.makeNode("/root/hidden/prntlist");
  349. for(var i=1; i<=iLength; i++)
  350. {
  351. model.makeNode("/root/hidden/prntlist/etcprofprntlist[" + i + "]");
  352. model.copyNode("/root/hidden/prntlist/etcprofprntlist[" + i + "]", "/root/main/list/etcproflist[" + i + "]");
  353. }
  354. }
  355. else
  356. {
  357. var iLength = instance1.selectNodes("/root/main/list/etcproflist").length;
  358. model.removenode("/root/main/printlist");
  359. model.makeNode("/root/main/printlist");
  360. for(var i=1; i<=iLength; i++)
  361. {
  362. if(i <= 10)
  363. {
  364. model.makeNode("/root/main/printlist/fstpage[" + i + "]");
  365. model.copyNode("/root/main/printlist/fstpage[" + i + "]", "/root/main/list/etcproflist[" + i + "]");
  366. }
  367. else
  368. {
  369. model.makeNode("/root/main/printlist/secpage[" + (i - 10) + "]");
  370. model.copyNode("/root/main/printlist/secpage[" + (i - 10) + "]", "/root/main/list/etcproflist[" + i + "]");
  371. }
  372. }
  373. }
  374. }
  375. function fSetControlAttr()
  376. {
  377. if(model.getValue("/root/send/retrparams/retrkind") == "sum")
  378. {
  379. btn_save.disabled = true;
  380. btn_addrow.disabled = true;
  381. btn_delrow.disabled = true;
  382. btn_print.disabled = false;
  383. misfSetReadOnlyCol(grd_etcproflist, "incmflag,name,rrgstno,posyear,paytotamt,payamt,proftax", true);
  384. grd_etcproflist.colDisabled(grd_etcproflist.colRef("chk")) = true;
  385. grd_etcproflist.colAttribute(grd_etcproflist.colRef("posyear"), "format") = "yyyy";
  386. }
  387. else
  388. {
  389. //btn_print.disabled = true;
  390. btn_save.disabled = false;
  391. btn_addrow.disabled = false;
  392. btn_delrow.disabled = false;
  393. if(model.getValue("/root/send/retrparams/rrgstno") != "" && model.getValue("/root/send/retrparams/name") != "")
  394. {
  395. grd_etcproflist.colDisabled(grd_etcproflist.colRef("chk")) = false;
  396. }
  397. else
  398. {
  399. grd_etcproflist.colDisabled(grd_etcproflist.colRef("chk")) = true;
  400. }
  401. grd_etcproflist.colAttribute(grd_etcproflist.colRef("posyear"), "format") = "yyyy-mm-dd";
  402. }
  403. }
  404. function fGridStatusCheck()
  405. {
  406. var grd_rows = grd_etcproflist.rows;
  407. var grd_fixedRows = grd_etcproflist.fixedRows;
  408. for(var i = grd_fixedRows ; i <= grd_rows ; i++)
  409. {
  410. if(grd_etcproflist.rowStatus(i) != 0)
  411. {
  412. messageBox("작업중인 데이터가 있습니다. \n 작업완료 후 작업하세요", "");
  413. return false;
  414. }
  415. }
  416. return true;
  417. }
  418. //========================================================================================
  419. //엑셀입력(excel file을 그리드에 입력)
  420. //========================================================================================
  421. function fInputExcel(pGrid) {
  422. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  423. if(fileName != "") {
  424. pGrid.loadExcel(fileName, 1, true);
  425. pGrid.deleteRow(1);
  426. //
  427. // for(i = 1; i < pGrid.rows; i++) {
  428. // pGrid.rowStatus(i) = 1;
  429. // }
  430. pGrid.rebuild();
  431. return true;
  432. }
  433. return false;
  434. }
  435. //========================================================================================
  436. //내외국인 구분에 따른 소득구분 setting
  437. //========================================================================================
  438. function fSetResidentflag()
  439. {
  440. if(model.getValue(cmb_residentflag.attribute("ref")) == "1")
  441. {
  442. cmb_incmflag1.visible = true;
  443. cmb_incmflag2.visible = false;
  444. model.setValue(cmb_incmflag1.attribute("ref"), "61");
  445. cmb_incmflag1.refresh();
  446. }
  447. else if(model.getValue(cmb_residentflag.attribute("ref")) == "2")
  448. {
  449. cmb_incmflag1.visible = false;
  450. cmb_incmflag2.visible = true;
  451. model.setValue(cmb_incmflag2.attribute("ref"), "42");
  452. cmb_incmflag2.refresh();
  453. }
  454. model.refresh();
  455. }
  456. ]]>
  457. </script>
  458. <submission id="TRRAT00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/list"/>
  459. <submission id="TRRAC00611" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/rertparams2" resultref="/root/hidden/incmpsn"/>
  460. <!-- 2012.05.21 박준범 - TXRAT00501 의 ref를 변경함 -->
  461. <!--submission id="TXRAT00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/list/etcproflist" resultref="/root/temp"/-->
  462. <submission id="TXRAT00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list/etcproflist" resultref="/root/temp"/>
  463. <bind id="bindSecPageCnt" ref="/root/send/printparams/secPageCnt" calculate="count(/root/main/printlist/secpage)"/>
  464. <bind id="bindAllEtcProf" ref="/root/send/printparams/allEtcProf" calculate="count(/root/main/list/etcproflist)"/>
  465. <bind id="bindAllCount" ref="/root/send/printparams/allCount" calculate="sum(/root/main/list/etcproflist/cnt)"/>
  466. <bind id="bindPayTotAmt" ref="/root/send/printparams/payTotAmt" calculate="sum(/root/main/list/etcproflist/paytotamt)"/>
  467. <bind id="bindProfTax" ref="/root/send/printparams/profTax" calculate="sum(/root/main/list/etcproflist/proftax)"/>
  468. <bind id="bindIncmTax" ref="/root/send/printparams/incmTax" calculate="sum(/root/main/list/etcproflist/incmtax)"/>
  469. <bind id="bindResdnTax" ref="/root/send/printparams/resdnTax" calculate="sum(/root/main/list/etcproflist/resdntax)"/>
  470. <bind id="bindSumAmt" ref="/root/send/printparams/sumAmt" calculate="sum(/root/main/list/etcproflist/sumamt)"/>
  471. <bind id="bindPayAmt" ref="/root/send/printparams/payAmt" calculate="sum(/root/main/list/etcproflist/payamt)"/>
  472. <bind id="bindChkCnt" ref="/root/hidden/checkedcnt" calculate="count(/root/main/list/etcproflist[chk='Y']/chk)"/>
  473. <submission id="TRRAZ00008" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/hidden/name"/>
  474. <submission id="TRRAZ00006" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/emplcheck" resultref="/root/hidden/emplcntcheck"/>
  475. <submission id="TXRAC00612" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/incmpsn" resultref="/root/temp"/>
  476. </model>
  477. </xhtml:head>
  478. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  479. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  480. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">기타소득 조회/수정</caption>
  481. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  482. </group>
  483. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:762px; ">
  484. <group id="grp_sea" style="left:0px; top:35px; width:1195px; height:60px; vertical-align:top; ">
  485. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  486. <caption id="caption7" class="search_name" style="left:9px; top:35px; width:92px; height:17px; ">소득구분 :</caption>
  487. <line id="line5" class="line_4" style="x1:1107px; y1:6px; x2:1107px; y2:54px; border-color:#ffe4bb; border-left-style:solid; "/>
  488. <caption id="caption1" class="search_name" visibility="hidden" style="left:310px; top:9px; width:90px; height:17px; ">지급년월 :</caption>
  489. <input id="ipt_frym" ref="/root/send/retrparams/frdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:520px; top:8px; width:100px; height:19px; text-align:center; ">
  490. <script type="javascript" ev:event="xforms-value-changed">
  491. <![CDATA[
  492. //fRetrieve();
  493. ]]>
  494. </script>
  495. </input>
  496. <caption id="caption2" style="left:622px; top:11px; width:15px; height:20px; ">~</caption>
  497. <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; ">
  498. <choices>
  499. <itemset>
  500. <label/>
  501. <value/>
  502. </itemset>
  503. </choices>
  504. <script type="javascript" ev:event="xforms-value-changed">
  505. <![CDATA[
  506. model.setValue("/root/send/rertparams2/instcd", "/root/send/retrparams/instcd");
  507. fRetrieve();
  508. ]]>
  509. </script>
  510. </select1>
  511. <caption id="caption3" class="search_name" style="left:9px; top:9px; width:90px; height:17px; ">기관구분 :</caption>
  512. <caption id="caption5" class="search_name" style="left:755px; top:9px; width:124px; height:17px; ">내/외국인구분 :</caption>
  513. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1123px; top:19px; width:56px; height:22px; text-align:left; ">
  514. <caption>조회</caption>
  515. <script type="javascript" ev:event="DOMActivate">
  516. <![CDATA[
  517. fRetrieve();
  518. ]]>
  519. </script>
  520. </button>
  521. <select1 id="cmb_incmflag1" ref="/root/send/retrparams/incmflag" class="combo_s_essential" visibility="hidden" appearance="minimal" showvalue="true" style="left:99px; top:34px; width:176px; height:19px; margin-left:2; ">
  522. <choices>
  523. <itemset>
  524. <label/>
  525. <value/>
  526. </itemset>
  527. </choices>
  528. </select1>
  529. <select1 id="cmb_incmflag2" ref="/root/send/retrparams/incmflag" class="combo_s_essential" visibility="hidden" appearance="minimal" showvalue="true" style="left:99px; top:34px; width:176px; height:19px; margin-left:2; ">
  530. <choices>
  531. <itemset>
  532. <label/>
  533. <value/>
  534. </itemset>
  535. </choices>
  536. </select1>
  537. <input id="ipt_toym" ref="/root/send/retrparams/todd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:635px; top:8px; width:100px; height:19px; text-align:center; ">
  538. <script type="javascript" ev:event="xforms-value-changed">
  539. <![CDATA[
  540. //fRetrieve();
  541. ]]>
  542. </script>
  543. </input>
  544. <caption id="caption8" class="search_name" style="left:545px; top:35px; width:90px; height:17px; ">소 득 자 :</caption>
  545. <button id="btn_entregnohelp" class="icon_search" style="left:739px; top:35px; width:16px; height:16px; ">
  546. <caption/>
  547. <script type="javascript" ev:event="DOMActivate">
  548. <![CDATA[
  549. misfOpenPopUpList("31", ipt_rrgstno, "", "rrgstno,name");
  550. model.refresh();
  551. ]]>
  552. </script>
  553. </button>
  554. <input id="ipt_rrgstno" ref="/root/send/retrparams/rrgstno" class="input_search" navindex="5" format="999999-9999999" style="left:635px; top:34px; width:100px; height:19px; text-align:center; ">
  555. <script type="javascript" ev:event="onkeypress">
  556. <![CDATA[
  557. if(event.keyCode == 13)
  558. {
  559. model.setFocus("ipt_name");
  560. }
  561. ]]>
  562. </script>
  563. <script type="javascript" ev:event="xforms-value-changed">
  564. <![CDATA[
  565. if(ipt_rrgstno.currentText == "")
  566. {
  567. model.setValue("/root/send/retrparams/rrgstno", "");
  568. model.setValue("/root/send/retrparams/name", "");
  569. ipt_rrgstno.refresh();
  570. ipt_name.refresh();
  571. return;
  572. }
  573. model.setValue("/root/send/rertparams2/name", "");
  574. model.setValue("/root/send/rertparams2/rrgstno", model.getValue("/root/send/retrparams/rrgstno"));
  575. model.setValue("/root/send/rertparams2/retrflag", "code");
  576. if (submit("TRRAC00611"))
  577. {
  578. if (instance1.selectNodes("/root/hidden/incmpsn").length > 0)
  579. {
  580. model.setValue("/root/send/retrparams/name", model.getValue("/root/hidden/incmpsn/name"));
  581. model.setValue("/root/send/retrparams/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  582. }
  583. else
  584. {
  585. model.setValue("/root/send/retrparams/name", "");
  586. model.setValue("/root/send/retrparams/rrgstno", "");
  587. }
  588. }
  589. model.refresh();
  590. fRetrieve();
  591. ]]>
  592. </script>
  593. </input>
  594. <input id="ipt_name" ref="/root/send/retrparams/name" class="input_search" navindex="6" imemode="hangul" style="left:759px; top:34px; width:126px; height:19px; ">
  595. <script type="javascript" ev:event="onkeypress">
  596. <![CDATA[
  597. if(event.keyCode == 13)
  598. {
  599. model.setFocus("btn_search");
  600. }
  601. ]]>
  602. </script>
  603. <script type="javascript" ev:event="xforms-value-changed">
  604. <![CDATA[
  605. if(ipt_name.currentText == "")
  606. {
  607. model.setValue("/root/send/retrparams/rrgstno", "");
  608. model.setValue("/root/send/retrparams/name", "");
  609. ipt_rrgstno.refresh();
  610. ipt_name.refresh();
  611. return;
  612. }
  613. model.setValue("/root/send/rertparams2/name", model.getValue("/root/send/retrparams/name"));
  614. model.setValue("/root/send/rertparams2/rrgstno", "");
  615. model.setValue("/root/send/rertparams2/retrflag", "name");
  616. if (submit("TRRAC00611"))
  617. {
  618. if (instance1.selectNodes("/root/hidden/incmpsn").length > 0)
  619. {
  620. model.setValue("/root/send/retrparams/name", model.getValue("/root/hidden/incmpsn/name"));
  621. model.setValue("/root/send/retrparams/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  622. }
  623. else
  624. {
  625. model.setValue("/root/send/retrparams/name", "");
  626. model.setValue("/root/send/retrparams/rrgstno", "");
  627. }
  628. }
  629. model.refresh();
  630. fRetrieve();
  631. ]]>
  632. </script>
  633. </input>
  634. <caption id="caption9" class="search_name" visibility="hidden" style="left:885px; top:35px; width:97px; height:17px; ">조회구분 :</caption>
  635. <select1 id="rdo_retrkind" ref="/root/send/retrparams/retrkind" visibility="hidden" appearance="full" cellspacing="15" cols="3" overflow="visible" style="left:975px; top:35px; width:125px; height:16px; border-style:none; ">
  636. <choices>
  637. <item>
  638. <label>전체</label>
  639. <value>all</value>
  640. </item>
  641. <item>
  642. <label>집합</label>
  643. <value>sum</value>
  644. </item>
  645. </choices>
  646. <script type="javascript" ev:event="xforms-value-changed">
  647. <![CDATA[
  648. //fRetrieve();
  649. //
  650. // fSetControlAttr();
  651. ]]>
  652. </script>
  653. </select1>
  654. <select1 id="cmb_ionatiflag" ref="/root/send/retrparams/ionatiflag" class="combo_s_essential" appearance="minimal" style="left:875px; top:8px; width:95px; height:19px; margin-left:2; ">
  655. <choices>
  656. <item>
  657. <label>전체</label>
  658. <value/>
  659. </item>
  660. <item>
  661. <label>내국인</label>
  662. <value>1</value>
  663. </item>
  664. <item>
  665. <label>외국인</label>
  666. <value>9</value>
  667. </item>
  668. </choices>
  669. </select1>
  670. <caption id="caption20" class="search_name" style="left:900px; top:34px; width:105px; height:17px; ">거주자구분 :</caption>
  671. <select1 id="cmb_residentflag" ref="/root/send/retrparams/residentflag" class="combo_s_essential" appearance="minimal" style="left:1000px; top:34px; width:95px; height:19px; margin-left:2; ">
  672. <choices>
  673. <item>
  674. <label>전체</label>
  675. <value/>
  676. </item>
  677. <item>
  678. <label>거주자</label>
  679. <value>1</value>
  680. </item>
  681. <item>
  682. <label>비거주자</label>
  683. <value>2</value>
  684. </item>
  685. </choices>
  686. <script type="javascript" ev:event="xforms-value-changed">
  687. <![CDATA[
  688. fSetResidentflag();
  689. if(model.getValue(cmb_residentflag.attribute("ref")) == "")
  690. {
  691. cmb_incmflag1.visible = false;
  692. cmb_incmflag2.visible = false;
  693. model.setValue("/root/send/retrparams/incmflag", "");
  694. }
  695. ]]>
  696. </script>
  697. </select1>
  698. <caption id="caption22" class="search_name" style="left:284px; top:35px; width:92px; height:17px; ">필요경비 :</caption>
  699. <select1 id="chk_needpay" ref="/root/send/retrparams/needpay" appearance="full" cols="4" overflow="visible" style="left:375px; top:35px; width:170px; height:20px; border-style:none; ">
  700. <choices>
  701. <item>
  702. <label>0%</label>
  703. <value>0</value>
  704. </item>
  705. <item>
  706. <label>75%</label>
  707. <value>75</value>
  708. </item>
  709. <item>
  710. <label>80%</label>
  711. <value>80</value>
  712. </item>
  713. <item>
  714. <label>100%</label>
  715. <value>100</value>
  716. </item>
  717. </choices>
  718. </select1>
  719. <select1 id="cmb_day" ref="/root/send/retrparams/dayflag" class="combo_s_essential" navindex="-1" appearance="minimal" style="left:410px; top:8px; width:100px; height:19px; ">
  720. <choices>
  721. <item>
  722. <label>지급일자</label>
  723. <value>P</value>
  724. </item>
  725. <item>
  726. <label>귀속년월</label>
  727. <value>G</value>
  728. </item>
  729. </choices>
  730. <script type="javascript" ev:event="xforms-value-changed">
  731. <![CDATA[
  732. if ( cmb_day.value == "G" ) {
  733. ipt_frym.attribute("format") = "yyyy-mm";
  734. ipt_toym.attribute("format") = "yyyy-mm";
  735. model.refresh();
  736. }
  737. if ( cmb_day.value == "P" ) {
  738. ipt_frym.attribute("format") = "yyyy-mm-dd";
  739. ipt_toym.attribute("format") = "yyyy-mm-dd";
  740. model.refresh();
  741. }
  742. ]]>
  743. </script>
  744. </select1>
  745. <caption id="caption23" class="search_name" style="left:320px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  746. </group>
  747. <line id="line3" class="line_1" style="x1:0px; y1:118px; x2:1195px; y2:118px; "/>
  748. <datagrid id="grd_etcproflist" nodeset="/root/main/list/etcproflist" backcoloralternate="#ffffff" caption="기관코드^일련번호^세부일련번호^지급처사업자등록번호^지급처거래처명^지급처대표자명^지급처사업자(주민)번호^상위주소^하위주소^증빙구분^확인^품의번호^소득&#xA;구분코드^소득자성명&#xA;(상호)^주민(사업자)&#xA;등록번호^주소^내/외국인^거주자구분^귀속일자^지급&#xA;년도^지급&#xA;건수^지급일자^귀속년월^지급총액^필요경비^소득금액^세율^소득세^주민세^법인세^농특세^계^미결전표일자^미결전표번호^미결전표일련번호^전표여부^비고" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 133, 55, 80, 110, 0, 60, 0, 0, 0, 0, 90, 90, 90, 80, 75, 39, 75, 70, 70, 70, 80, 0, 0, 0, 0, 200, 100, 100, 100" explorerbar="sortshow" frozencols="21" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:0px; top:168px; width:1195px; height:593px; ">
  749. <col ref="instcd" visibility="hidden"/>
  750. <col ref="seqno" visibility="hidden"/>
  751. <col ref="detlseqno" visibility="hidden"/>
  752. <col ref="deployeeentrregno" visibility="hidden"/>
  753. <col ref="deployeecustnm" visibility="hidden"/>
  754. <col ref="deployeeprsdnm" visibility="hidden"/>
  755. <col ref="deployeerrgstno" visibility="hidden"/>
  756. <col ref="deployeesupaddr" visibility="hidden"/>
  757. <col ref="deployeeinfaddr" visibility="hidden"/>
  758. <col ref="chrgflag"/>
  759. <col disabled="true" ref="chknm" type="input" style="text-align:center; "/>
  760. <col ref="pumno" type="input" format="99999999-99999999" style="text-align:center; "/>
  761. <col ref="incmflag" type="combo" format="##" style="text-align:center; ">
  762. <choices>
  763. <itemset nodeset="/root/init/cmb_incmflag1/comcodelist">
  764. <label ref="cdnm"/>
  765. <value ref="cdid"/>
  766. </itemset>
  767. </choices>
  768. </col>
  769. <col imemode="hangul" ref="name" type="inputbutton" style="text-align:center; "/>
  770. <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
  771. <col ref="address" style="text-align:left; padding-left:1; "/>
  772. <col disabled="true" ref="ionatiflag" type="combo" style="text-align:center; ">
  773. <choices>
  774. <item>
  775. <label>내국인</label>
  776. <value>1</value>
  777. </item>
  778. <item>
  779. <label>외국인</label>
  780. <value>9</value>
  781. </item>
  782. </choices>
  783. </col>
  784. <col ref="residentflag" visibility="hidden"/>
  785. <col ref="posyear" type="inputdate" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
  786. <col ref="getyear" visibility="hidden" format="yyyy" style="text-align:center; "/>
  787. <col ref="cnt" visibility="hidden" style="text-align:center; "/>
  788. <col ref="paydd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  789. <col ref="getdd" type="inputdate" format="yyyy-mm" style="text-align:center; "/>
  790. <col ref="paytotamt" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  791. <col disabled="true" ref="payamt" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  792. <col disabled="true" ref="proftax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  793. <col disabled="true" ref="taxrate" format="## %" style="text-align:right; "/>
  794. <col disabled="true" ref="incmtax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  795. <col disabled="true" ref="resdntax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  796. <col disabled="true" ref="lawtax" visibility="hidden" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  797. <col disabled="true" ref="nhtax" visibility="hidden" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  798. <col disabled="true" ref="sumamt" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  799. <col ref="unsldd"/>
  800. <col ref="unslno" visibility="hidden"/>
  801. <col ref="unslseqno"/>
  802. <col ref="slipyn"/>
  803. <col ref="cmt" type="input" visibility="hidden"/>
  804. <col ref="rrgstnovalidyn" visibility="hidden"/>
  805. <col ref="emplno" visibility="hidden"/>
  806. <col ref="chkyn" type="input" visibility="hidden"/>
  807. <script type="javascript" ev:event="onbuttonclick">
  808. <![CDATA[
  809. if(grd_etcproflist.col == grd_etcproflist.colRef("name"))
  810. {
  811. model.setValue("/root/hidden/incmpsn/name", model.getValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/name"));
  812. misfOpenPopUpList("31", opt_temp, "", "rrgstno,name,entrregno,custnm,zipcd,zipcd1,zipcd2,zipcdseqno,supaddr,infaddr,cntctel,emailaddr,passport,cmt,ionatiflag,incmflag", "");
  813. // 팝업화면의 그리드 순서가 바뀌면 틀어지기 때문에 적절치 않은 사용이다.
  814. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  815. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  816. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/incmflag", model.getValue("/root/hidden/incmpsn/incmflag"));
  817. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/ionatiflag", model.getValue("/root/hidden/incmpsn/ionatiflag"));
  818. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/posyear", "");
  819. //model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/getyear", getCurrentDate().substr(0, 4));
  820. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/cnt", "1");
  821. }
  822. model.refresh();
  823. ]]>
  824. </script>
  825. <script type="javascript" ev:event="xforms-value-changed">
  826. <![CDATA[
  827. if(grd_etcproflist.col == grd_etcproflist.colRef("name") || grd_etcproflist.col == grd_etcproflist.colRef("rrgstno"))
  828. {
  829. model.setValue("/root/send/rertparams2/instcd", model.getValue("/root/send/retrparams/instcd"));
  830. if(grd_etcproflist.col == grd_etcproflist.colRef("name"))
  831. {
  832. model.setValue("/root/send/rertparams2/name", grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("name")));
  833. model.setValue("/root/send/rertparams2/rrgstno", "");
  834. model.setValue("/root/send/rertparams2/retrflag", "name");
  835. }
  836. else if(grd_etcproflist.col == grd_etcproflist.colRef("rrgstno"))
  837. {
  838. model.setValue("/root/send/rertparams2/name", "");
  839. model.setValue("/root/send/rertparams2/rrgstno", grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("rrgstno")));
  840. model.setValue("/root/send/rertparams2/retrflag", "code");
  841. }
  842. if (submit("TRRAC00611"))
  843. {
  844. if (instance1.selectNodes("/root/hidden/incmpsn").length == 0)
  845. {
  846. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  847. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  848. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/incmflag", model.getValue("/root/hidden/incmpsn/incmflag"));
  849. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/ionatiflag", model.getValue("/root/hidden/incmpsn/ionatiflag"));
  850. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/posyear", "");
  851. //model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/getyear", getCurrentDate().substr(0, 4));
  852. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/cnt", "1");
  853. }
  854. else
  855. {
  856. }
  857. }
  858. }
  859. else if(grd_etcproflist.col == grd_etcproflist.colRef("paytotamt") || grd_etcproflist.col == grd_etcproflist.colRef("taxrate"))
  860. {
  861. var sPayTotAmt = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("paytotamt"));
  862. var sTaxRate = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("taxrate"));
  863. var sIncmFlag = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmflag"));
  864. if(sPayTotAmt.getTrim() != "" && sTaxRate.getTrim() != "")
  865. {
  866. var iPayTotAmt = parseInt(sPayTotAmt, 10);
  867. var iPayAmt = 0;
  868. var iProfTax = 0;
  869. var fTaxRate = parseFloat(sTaxRate);
  870. var fNeedPay = chk_needpay.value;
  871. // iPayAmt = iPayTotAmt - ((iPayTotAmt * fTaxRate) / 100);
  872. //필요경비
  873. //iPayAmt = ((iPayTotAmt * fNeedPay) / 100);
  874. //2012.02.29 박준범 : 필요경비를 반올림 처리함(오성호 샘과 협의 결과 반영)
  875. iPayAmt = Math.round((iPayTotAmt * fNeedPay) / 100);
  876. // iProfTax = iPayTotAmt * (fTaxRate / 100);
  877. // 소득금액
  878. iProfTax = iPayTotAmt - iPayAmt;
  879. if(sIncmFlag == "42")
  880. {
  881. iPayAmt = 0;
  882. }
  883. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("payamt")) = iPayAmt;
  884. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("proftax")) = iProfTax;
  885. }
  886. if(grd_etcproflist.col == grd_etcproflist.colRef("paytotamt") && sPayTotAmt.getTrim() != "")
  887. {
  888. var iPayTotAmt = parseInt(sPayTotAmt, 10);
  889. var sIncmFlag = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmflag"));
  890. var iIncmTax = 0;
  891. var iResdnTax = 0;
  892. if(sIncmFlag == "42")
  893. {
  894. if (fNeedPay != "100") {
  895. iIncmTax = ((iPayTotAmt * 0.22) / 11) * 10;
  896. iResdnTax = (iPayTotAmt * 0.22) / 11;
  897. } else if (fNeedPay == "100" ) {
  898. iIncmTax = 0;
  899. iResdnTax = 0;
  900. }
  901. }
  902. else
  903. {
  904. iIncmTax = (iPayTotAmt <= 250000) ? 0 : parseInt((iProfTax * fTaxRate /100) / 10, 10) * 10;
  905. iResdnTax = (iPayTotAmt <= 250000) ? 0 : parseInt((iIncmTax * 0.1) / 10, 10) * 10;
  906. if (iIncmTax < 1000 || fNeedPay == "100")
  907. {
  908. iIncmTax = 0;
  909. iResdnTax = 0;
  910. }
  911. }
  912. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmtax")) = iIncmTax;
  913. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("resdntax")) = iResdnTax;
  914. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("sumamt")) = iIncmTax + iResdnTax;
  915. }
  916. }
  917. else if(grd_etcproflist.col == grd_etcproflist.colRef("incmflag"))
  918. {
  919. // var sIncmFlag = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmflag"));
  920. //
  921. // if(sIncmFlag == "42")
  922. // {
  923. // grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("taxrate")) = "30";
  924. // }
  925. }
  926. else if(grd_etcproflist.col == grd_etcproflist.colRef("posyear"))
  927. {
  928. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/getyear", grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("posyear")).substr(0, 4));
  929. }
  930. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/lawtax", "0");
  931. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/nhtax", "0");
  932. model.recalculate();
  933. ]]>
  934. </script>
  935. <script type="javascript" ev:event="onaftersort">
  936. <![CDATA[
  937. grd_etcproflist.gridToInstance();
  938. ]]>
  939. </script>
  940. <script type="javascript" ev:event="ondblclick">
  941. <![CDATA[
  942. if (grd_etcproflist.isCell(event.target) && grd_etcproflist.row > 0 && grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("slipyn")) == "Y" && model.getValue("/root/send/retrparams/retrkind") == "all")
  943. {
  944. model.makeValue("/root/source/slipinfo/instcd", cmb_instcd.value);
  945. model.makeValue("/root/source/slipinfo/slipdt", model.getValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/unsldd"));
  946. model.makeValue("/root/source/slipinfo/slipno", model.getValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/unslno").substr(0, 4));
  947. model.refresh();
  948. modal("SMRAD00100","","","","","/root/source", "/root/target" );
  949. }
  950. ]]>
  951. </script>
  952. </datagrid>
  953. <caption id="caption21" class="tit_2" style="left:5px; top:103px; width:96px; height:13px; ">소득자 목록</caption>
  954. <group id="group2" scroll="auto" style="left:0px; top:0px; width:1195px; height:27px; ">
  955. <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  956. <button id="btn_save" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
  957. <caption>저장</caption>
  958. <script type="javascript" ev:event="DOMActivate">
  959. <![CDATA[
  960. fSave();
  961. ]]>
  962. </script>
  963. </button>
  964. <button id="btn_print" class="btn4_letter2" style="left:1075px; top:3px; width:56px; height:22px; ">
  965. <caption>출력</caption>
  966. <script type="javascript" ev:event="DOMActivate">
  967. <![CDATA[
  968. // 2011.08.08 CYW
  969. // * 조회기준이 소득자가 포함되어있는 경우에만 출력 가능함.
  970. var flag = true;
  971. var etcCnt = getNodesetCount("/root/main/list/prntetcproflist");
  972. if( model.getValue("/root/send/retrparams/rrgstno") == "" ) {
  973. flag = false;
  974. }
  975. // for( var i = 1 ; i <= etcCnt ; i++ ){
  976. // if( model.getValue("/root/main/list/etcproflist[1]/name") != model.getValue("/root/main/list/etcproflist[" + i + "]/name") ){
  977. // flag = false;
  978. // }
  979. // }
  980. if( flag == true ){
  981. fPrint();
  982. }else{
  983. messageBox("소득자 기준으로 조회해야 출력 가능합니다. 소득자를 조회해주십시오.", "E000", "");
  984. }
  985. model.refresh();
  986. ]]>
  987. </script>
  988. </button>
  989. <button id="button2" class="btn4_letter9" visibility="hidden" style="left:915px; top:3px; width:140px; height:22px; ">
  990. <caption>비거주자 파일생성</caption>
  991. <script type="javascript" ev:event="DOMActivate">
  992. <![CDATA[
  993. var instcd = model.getValue("/root/send/retrparams/instcd");
  994. model.makeValue("/root/source/reportfile/instcd", instcd);
  995. model.makeValue("/root/source/reportfile/frdd", ipt_frym.value);
  996. model.makeValue("/root/source/reportfile/todd", ipt_toym.value);
  997. model.makeValue("/root/source/reportfile/jobflag", "etc2");
  998. model.refresh();
  999. modal("SPRAT01000","","","","","/root/source", "/root/target" );
  1000. model.refresh();
  1001. ]]>
  1002. </script>
  1003. </button>
  1004. <button id="button3" class="btn4_letter8" visibility="hidden" style="left:780px; top:3px; width:128px; height:22px; ">
  1005. <caption>거주자 파일생성</caption>
  1006. <script type="javascript" ev:event="DOMActivate">
  1007. <![CDATA[
  1008. var instcd = model.getValue("/root/send/retrparams/instcd");
  1009. model.makeValue("/root/source/reportfile/instcd", instcd);
  1010. model.makeValue("/root/source/reportfile/frdd", ipt_frym.value);
  1011. model.makeValue("/root/source/reportfile/todd", ipt_toym.value);
  1012. model.makeValue("/root/source/reportfile/jobflag", "etc1");
  1013. model.refresh();
  1014. modal("SPRAT01000","","","","","/root/source", "/root/target" );
  1015. model.refresh();
  1016. ]]>
  1017. </script>
  1018. </button>
  1019. </group>
  1020. <button id="btn_addrow" class="btn2_letter3" style="left:1007px; top:98px; width:53px; height:19px; text-align:left; ">
  1021. <caption>행추가</caption>
  1022. <script type="javascript" ev:event="DOMActivate">
  1023. <![CDATA[
  1024. misfGridIUD(grd_etcproflist, "A");
  1025. var dayno = getCurrentDate();
  1026. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("chrgflag")) = "C";
  1027. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("taxrate")) = "20";
  1028. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("paydd")) = dayno;
  1029. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("getdd")) = dayno.substr(0, 6);
  1030. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmflag")) = "61";
  1031. misfSetReadOnlyCol(grd_etcproflist, "ionatiflag", true, grd_etcproflist.row);
  1032. //2012.05.21 박준범 - instcd 추가
  1033. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("instcd")) = cmb_instcd.value;
  1034. ]]>
  1035. </script>
  1036. </button>
  1037. <button id="btn_delrow" class="btn2_letter3" style="left:1064px; top:98px; width:53px; height:19px; text-align:left; ">
  1038. <caption>행삭제</caption>
  1039. <script type="javascript" ev:event="DOMActivate">
  1040. <![CDATA[
  1041. // var iLength = grd_etcproflist.selectedCells.length;
  1042. var iLength = grd_etcproflist.selectedRows;
  1043. for(var i=0; i<iLength; i++)
  1044. {
  1045. var iRowIdx = grd_etcproflist.selectedCells.item(i).row;
  1046. if(model.getValue(grd_etcproflist.nodeset + "[" + iRowIdx + "]/slipyn") != "Y" && model.getValue("/root/send/retrparams/retrkind") == "all")
  1047. {
  1048. if(grd_etcproflist.rowStatus(iRowIdx) == 4)
  1049. {
  1050. grd_etcproflist.rowStatus(iRowIdx) = 0;
  1051. }
  1052. else if(grd_etcproflist.rowStatus(iRowIdx) == 1 && grd_etcproflist.rowStatus(iRowIdx) == 3)
  1053. {
  1054. grd_etcproflist.deleteRow(iRowIdx, false);
  1055. }
  1056. else
  1057. {
  1058. grd_etcproflist.addStatus(iRowIdx, "delete");
  1059. }
  1060. }
  1061. }
  1062. ]]>
  1063. </script>
  1064. </button>
  1065. <output id="opt_temp" ref="/root/hidden/incmpsn/name" visibility="hidden" style="left:633px; top:98px; width:20px; height:19px; "/>
  1066. <caption id="caption10" style="left:120px; top:102px; width:15px; height:15px; background-color:#eaeaea; "/>
  1067. <caption id="caption11" style="left:138px; top:103px; width:182px; height:14px; ">전표기타소득 삭제 및 수정 불가</caption>
  1068. <output id="output1" ref="/root/send/printparams/resdnTax" format="(-)#,###.##" style="left:1044px; top:148px; width:67px; height:19px; text-align:right; margin-right:1; "/>
  1069. <caption id="cap_item" class="cell_1" style="left:1044px; top:123px; width:67px; height:23px; text-align:center; vertical-align:middle; ">주민세</caption>
  1070. <caption id="caption14" class="cell_1" style="left:1114px; top:123px; width:77px; height:23px; text-align:center; vertical-align:middle; ">계</caption>
  1071. <output id="output4" ref="/root/send/printparams/sumAmt" format="(-)#,###.##" style="left:1114px; top:148px; width:77px; height:19px; text-align:right; margin-right:1; "/>
  1072. <output id="output5" ref="/root/send/printparams/incmTax" format="(-)#,###.##" style="left:968px; top:148px; width:73px; height:19px; text-align:right; margin-right:1; "/>
  1073. <caption id="caption15" class="cell_1" style="left:968px; top:123px; width:73px; height:23px; text-align:center; vertical-align:middle; ">소득세</caption>
  1074. <output id="output6" ref="/root/send/printparams/profTax" format="(-)#,###.##" style="left:855px; top:148px; width:72px; height:19px; text-align:right; margin-right:1; "/>
  1075. <caption id="caption16" class="cell_1" style="left:855px; top:123px; width:72px; height:23px; text-align:center; vertical-align:middle; ">소득금액</caption>
  1076. <output id="output7" ref="/root/send/printparams/payAmt" format="(-)#,###.##" style="left:775px; top:148px; width:77px; height:19px; text-align:right; margin-right:1; "/>
  1077. <caption id="caption17" class="cell_1" style="left:775px; top:123px; width:77px; height:23px; text-align:center; vertical-align:middle; ">필요경비</caption>
  1078. <output id="output8" ref="/root/send/printparams/payTotAmt" format="(-)#,###.##" style="left:685px; top:148px; width:87px; height:19px; text-align:right; margin-right:1; "/>
  1079. <caption id="caption18" class="cell_1" style="left:685px; top:123px; width:87px; height:23px; text-align:center; vertical-align:middle; ">총지급액</caption>
  1080. <line id="line10" class="line_3" style="x1:1112px; y1:123px; x2:1112px; y2:167px; "/>
  1081. <line id="line6" class="line_3" style="x1:1112px; y1:123px; x2:1112px; y2:167px; "/>
  1082. <line id="line7" class="line_3" style="x1:1042px; y1:123px; x2:1042px; y2:167px; "/>
  1083. <line id="line8" class="line_3" style="x1:853px; y1:123px; x2:853px; y2:167px; "/>
  1084. <line id="line9" class="line_3" style="x1:773px; y1:123px; x2:773px; y2:167px; "/>
  1085. <line id="line11" class="line_3" style="x1:683px; y1:123px; x2:683px; y2:167px; "/>
  1086. <line id="line12" class="line_3" style="x1:928px; y1:123px; x2:928px; y2:167px; "/>
  1087. <line id="line13" class="line_3" style="x1:966px; y1:123px; x2:966px; y2:167px; "/>
  1088. <line id="line14" class="line_3" style="x1:1192px; y1:123px; x2:1192px; y2:167px; "/>
  1089. <caption id="caption19" class="cell_1" style="left:595px; top:146px; width:87px; height:21px; text-align:center; vertical-align:middle; ">계</caption>
  1090. <button id="btn_excel" class="btn2_letter4" style="left:1124px; top:98px; width:64px; height:19px; text-align:left; ">
  1091. <caption>엑셀출력</caption>
  1092. <script type="javascript" ev:event="DOMActivate">
  1093. <![CDATA[
  1094. if(fGridStatusCheck())
  1095. {
  1096. 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);
  1097. // grd_excel.rebuild();
  1098. misfSaveExcel(grd_excel, sTitle);
  1099. }
  1100. ]]>
  1101. </script>
  1102. </button>
  1103. <button id="btn_openpsn" class="btn2_letter5" style="left:928px; top:98px; width:75px; height:19px; ">
  1104. <caption>소득자등록</caption>
  1105. <script type="javascript" ev:event="DOMActivate">
  1106. <![CDATA[
  1107. model.makeValue("/root/source/receiveref", "/root/hidden/incmpsntemp");
  1108. model.refresh();
  1109. modal("SPRAC00611","","","","","/root/source", "/root/target" );
  1110. model.refresh();
  1111. ]]>
  1112. </script>
  1113. </button>
  1114. <output id="output9" ref="/root/hidden/checkedcnt" visibility="hidden" style="left:70px; top:140px; width:25px; height:20px; "/>
  1115. <button id="btn_excelupload" class="btn2_letter4" visibility="hidden" style="left:543px; top:95px; width:64px; height:19px; text-align:left; ">
  1116. <caption>엑셀입력</caption>
  1117. <script type="javascript" ev:event="DOMActivate">
  1118. <![CDATA[
  1119. dlgRslt = messageBox("소득구분은 80% 필요경비 발생(61)만 입력가능합니다.\n계속하시겠습니까?\n", "Q000");
  1120. if(dlgRslt != 6) return;
  1121. if(fGridStatusCheck() && fInputExcel(grd_excelupload))
  1122. {
  1123. var grd_fixedRows = grd_excelupload.fixedRows;
  1124. var grd_rows = grd_excelupload.rows;
  1125. var incmflag = '';
  1126. var name = '';
  1127. var rrgstno = '';
  1128. var emplno = '';
  1129. var residentflag = '';
  1130. var ionatiflag = '';
  1131. var posyear = '';
  1132. var paytotamt = '';
  1133. var payamt = '';
  1134. var proftax = '';
  1135. var taxrate = '';
  1136. var incmtax = '';
  1137. var resdntax = '';
  1138. var vIonatiflag = '';
  1139. var vResidentflag = '';
  1140. var icpncmt = '';
  1141. var cmt = '';
  1142. var icpnpsnCount = 0;
  1143. var nZipcd1 = "/root/hidden/zipcd1";
  1144. var nZipcd2 = "/root/hidden/zipcd2";
  1145. var nSupaddr = "/root/hidden/supaddr";
  1146. var nInfaddr = "/root/hidden/infaddr";
  1147. radfgetAcntYY(cmb_instcd.value, ipt_frym.value + "01", nZipcd1, nZipcd2, nSupaddr, nInfaddr);
  1148. var vZipcd1 = model.getValue(nZipcd1);
  1149. var vZipcd2 = model.getValue(nZipcd2);
  1150. var vSupaddr = model.getValue(nSupaddr);
  1151. var vInfaddr = model.getValue(nInfaddr);
  1152. model.removenode("/root/hidden/incmpsnlist");
  1153. grd_icpn.refresh();
  1154. for(var i = grd_fixedRows; i < grd_rows ; i++)
  1155. {
  1156. incmflag = model.getValue(grd_excelupload.nodeset + "[" + i + "]/incmflag");
  1157. name = model.getValue(grd_excelupload.nodeset + "[" + i + "]/name");
  1158. rrgstno = model.getValue(grd_excelupload.nodeset + "[" + i + "]/rrgstno");
  1159. emplno = model.getValue(grd_excelupload.nodeset + "[" + i + "]/emplno");
  1160. residentflag = model.getValue(grd_excelupload.nodeset + "[" + i + "]/residentflag");
  1161. ionatiflag = model.getValue(grd_excelupload.nodeset + "[" + i + "]/ionatiflag");
  1162. posyear = model.getValue(grd_excelupload.nodeset + "[" + i + "]/posyear");
  1163. paytotamt = model.getValue(grd_excelupload.nodeset + "[" + i + "]/paytotamt");
  1164. payamt = model.getValue(grd_excelupload.nodeset + "[" + i + "]/payamt");
  1165. proftax = model.getValue(grd_excelupload.nodeset + "[" + i + "]/proftax");
  1166. taxrate = model.getValue(grd_excelupload.nodeset + "[" + i + "]/taxrate");
  1167. incmtax = model.getValue(grd_excelupload.nodeset + "[" + i + "]/incmtax");
  1168. resdntax = model.getValue(grd_excelupload.nodeset + "[" + i + "]/resdntax");
  1169. icpncmt = model.getValue(grd_excelupload.nodeset + "[" + i + "]/cmt");
  1170. cmt = model.getValue(grd_excelupload.nodeset + "[" + i + "]/cmt");
  1171. if(incmflag != '61') {messageBox(i + " 번째줄 " + "소득구분이 잘못되었습니다." ,"I000");return;}
  1172. if(ionatiflag == "내국인" || ionatiflag == "1") {vIonatiflag = "1";}
  1173. else if(ionatiflag == "외국인" || ionatiflag == "9") {vIonatiflag = "9";}
  1174. else {messageBox(i + " 번째줄 " + "내/외국인구분이 잘못 되었습니다." ,"I000");return;}
  1175. model.setValue(grd_excelupload.nodeset + "[" + i + "]/ionatiflag", vIonatiflag);
  1176. if(residentflag == "거주자" || residentflag == "1") {vResidentflag = "1";}
  1177. else if(residentflag == "비거주자" || residentflag == "2") {vResidentflag = "2";}
  1178. else {messageBox(i + " 번째줄 " + "거주자 구분이 잘못 되었습니다." ,"I000");return;}
  1179. model.setValue(grd_excelupload.nodeset + "[" + i + "]/residentflag", vResidentflag);
  1180. if(!isValidDateTime(posyear, "YYYYMMDD"))
  1181. {
  1182. messageBox(i + "번째줄 일자가 유효하지 않습니다.", "I000");
  1183. return false;
  1184. }
  1185. if(rrgstno == "") // 주민번호가 없을 시 사번으로 조회한다.
  1186. {
  1187. vNode = "/root/hidden/rrgstno";
  1188. name = radfcheckEmplExist(emplno,vNode);
  1189. if(name == "")
  1190. {
  1191. messageBox("사원번호 [ " + vEmplNo + " ] 는 잘못된 데이터 입니다.", "I000");
  1192. return false;
  1193. }
  1194. else
  1195. {
  1196. rrgstno = model.getValue(vNode);
  1197. model.setValue(grd_excelupload.nodeset + "[" + i + "]/rrgstno", rrgstno);
  1198. }
  1199. }
  1200. else
  1201. {
  1202. rrgstno = rrgstno.replace("-","");
  1203. if(rrgstno.length > 13)
  1204. {
  1205. messageBox(i +"번째줄 주민등록번호 자릿수가 맞지 않습니다.", "I000");
  1206. return false;
  1207. }
  1208. }
  1209. if(radfGetIcpncd(cmb_instcd.value,rrgstno) == "")
  1210. {
  1211. if(name == ""){messageBox(i +"번째줄 이름이 없어 소득자 정보에 저장하지 못했습니다.", "I000"); return false}
  1212. var bNoDuplFlag = 'Y';
  1213. for(var j = grd_icpn.fixedRows ; j < grd_icpn.rows ; j++)
  1214. {
  1215. if(grd_icpn.valueMatrix(j, grd_icpn.colRef("rrgstno")) == rrgstno)
  1216. {
  1217. bNoDuplFlag = 'N';
  1218. }
  1219. }
  1220. if(bNoDuplFlag == 'Y')
  1221. {
  1222. icpnpsnCount++;
  1223. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/instcd", cmb_instcd.value);
  1224. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/rrgstno", rrgstno);
  1225. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/name", name);
  1226. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/zipcd1", vZipcd1);
  1227. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/zipcd2", vZipcd2);
  1228. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/supaddr", vSupaddr);
  1229. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/infaddr", vInfaddr);
  1230. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/residentflag", vResidentflag);
  1231. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/ionatiflag", vIonatiflag);
  1232. model.makeValue("/root/hidden/incmpsnlist[" + icpnpsnCount + "]/cmt", icpncmt);
  1233. }
  1234. }
  1235. }
  1236. var grd_rows = grd_excelupload.rows;
  1237. var grd_fixedRows = grd_excelupload.fixedRows;
  1238. var Instance_row = grd_etcproflist.rows - grd_etcproflist.fixedRows + 1;
  1239. var status_row = grd_etcproflist.rows - grd_etcproflist.fixedRows + 1;
  1240. for(var i = grd_fixedRows ; i < grd_rows ; i++)
  1241. {
  1242. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/instcd", cmb_instcd.value);
  1243. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/chrgflag", "C");
  1244. //model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/instcd", cmb_instcd.value);
  1245. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/incmflag", model.getValue(grd_excelupload.nodeset + "[" + i + "]/incmflag"));
  1246. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/name", model.getValue(grd_excelupload.nodeset + "[" + i + "]/name"));
  1247. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/rrgstno", model.getValue(grd_excelupload.nodeset + "[" + i + "]/rrgstno").replace("-",""));
  1248. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/emplno", model.getValue(grd_excelupload.nodeset + "[" + i + "]/emplno"));
  1249. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/ionatiflag", model.getValue(grd_excelupload.nodeset + "[" + i + "]/ionatiflag"));
  1250. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/posyear", model.getValue(grd_excelupload.nodeset + "[" + i + "]/posyear"));
  1251. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/paytotamt", model.getValue(grd_excelupload.nodeset + "[" + i + "]/paytotamt"));
  1252. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/payamt", model.getValue(grd_excelupload.nodeset + "[" + i + "]/payamt"));
  1253. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/proftax", model.getValue(grd_excelupload.nodeset + "[" + i + "]/proftax"));
  1254. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/taxrate", model.getValue(grd_excelupload.nodeset + "[" + i + "]/taxrate"));
  1255. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/incmtax", model.getValue(grd_excelupload.nodeset + "[" + i + "]/incmtax"));
  1256. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/resdntax", model.getValue(grd_excelupload.nodeset + "[" + i + "]/resdntax"));
  1257. model.makeValue(grd_etcproflist.nodeset + "[" + Instance_row + "]/cmt", model.getValue(grd_excelupload.nodeset + "[" + i + "]/cmt"));
  1258. Instance_row++;
  1259. }
  1260. model.refresh(); // 그리드 반영
  1261. for(var i = grd_fixedRows ; i < grd_rows ; i++)
  1262. {
  1263. grd_etcproflist.rowStatus(status_row) = 1;
  1264. status_row++;
  1265. }
  1266. for(var i = grd_icpn.fixedRows ; i < grd_icpn.rows ; i++)
  1267. {
  1268. grd_icpn.rowStatus(i) = 1;
  1269. status_row++;
  1270. }
  1271. //fInitialize();
  1272. }
  1273. ]]>
  1274. </script>
  1275. </button>
  1276. <datagrid id="grd_excelupload" nodeset="/root/hidden/excelupload/exceluploadlist" visibility="hidden" backcoloralternate="#ffffff" caption="소득구분코드^소득자성명(상호)^주민(사업자)등록번호^사번^거주자구분^내/외국인^귀속일자^(연간)지급총액^필요경비^소득금액^세율^소득세^주민세^비고" colsep="^" colwidth="106, 105, 105, 81, 80, 60, 79, 92, 60, 60, 60, 60, 60, 160" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:0px; top:335px; width:1178px; height:193px; ">
  1277. <col ref="incmflag"/>
  1278. <col ref="name" style="text-align:center; "/>
  1279. <col ref="rrgstno"/>
  1280. <col ref="emplno" style="text-align:center; "/>
  1281. <col ref="residentflag"/>
  1282. <col ref="ionatiflag" style="text-align:center; "/>
  1283. <col ref="posyear" format="yyyy-mm-dd" style="text-align:center; "/>
  1284. <col ref="paytotamt" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1285. <col ref="payamt" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1286. <col ref="proftax" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1287. <col ref="taxrate" format="## %" style="text-align:right; "/>
  1288. <col ref="incmtax" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1289. <col ref="resdntax" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1290. <col ref="cmt" style="text-align:right; padding-right:1; "/>
  1291. </datagrid>
  1292. <datagrid id="grd_icpn" nodeset="/root/hidden/incmpsnlist" visibility="hidden" backcoloralternate="#ffffff" caption="기관코드^주민등록번호^이름^우편번호1^우편번호2^상위주소^하위주소^거주자구분^내외국인^비고" colsep="^" colwidth="106, 105, 138, 81, 60, 79, 92, 60, 60, 60, 60, 60, 60, 60, 60" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:180px; top:530px; width:865px; height:190px; ">
  1293. <col ref="instcd"/>
  1294. <col ref="rrgstno"/>
  1295. <col ref="name"/>
  1296. <col ref="zipcd1"/>
  1297. <col ref="zipcd2"/>
  1298. <col ref="supaddr"/>
  1299. <col ref="infaddr"/>
  1300. <col ref="residentflag"/>
  1301. <col ref="ionatiflag"/>
  1302. <col ref="cmt"/>
  1303. </datagrid>
  1304. <datagrid id="grd_excel" nodeset="/root/main/list/etcproflist" visibility="hidden" backcoloralternate="#ffffff" caption="확인^품의번호^소득&#xA;구분코드^소득자성명&#xA;(상호)^주민(사업자)&#xA;등록번호^주소^내/외국인^거주자구분^지급일자^귀속년월^지급총액^필요경비^소득금액^세율^소득세^주민세^법인세^농특세^계" colsep="^" explorerbar="sort" frozencols="21" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:0px; top:585px; width:1000px; height:97px; ">
  1305. <col disabled="true" ref="chknm" type="input" style="text-align:center; "/>
  1306. <col ref="pumno" type="input" format="99999999-99999999" style="text-align:center; "/>
  1307. <col ref="incmflag" type="input" format="##" style="text-align:center; ">
  1308. <choices>
  1309. <itemset>
  1310. <label/>
  1311. <value/>
  1312. </itemset>
  1313. </choices>
  1314. </col>
  1315. <col imemode="hangul" ref="name" type="inputbutton" style="text-align:center; "/>
  1316. <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
  1317. <col ref="address" style="text-align:left; padding-left:1; "/>
  1318. <col disabled="true" ref="ionatiflag" type="combo" style="text-align:center; ">
  1319. <choices>
  1320. <item>
  1321. <label>내국인</label>
  1322. <value>1</value>
  1323. </item>
  1324. <item>
  1325. <label>외국인</label>
  1326. <value>9</value>
  1327. </item>
  1328. </choices>
  1329. </col>
  1330. <col ref="residentflag" visibility="hidden"/>
  1331. <col ref="paydd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  1332. <col ref="getdd" type="inputdate" format="yyyy-mm" style="text-align:center; "/>
  1333. <col ref="paytotamt" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  1334. <col disabled="true" ref="payamt" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1335. <col disabled="true" ref="proftax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1336. <col disabled="true" ref="taxrate" format="## %" style="text-align:right; "/>
  1337. <col disabled="true" ref="incmtax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1338. <col disabled="true" ref="resdntax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1339. <col disabled="true" ref="lawtax" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1340. <col disabled="true" ref="nhtax" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1341. <col disabled="true" ref="sumamt" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1342. </datagrid>
  1343. <button id="button1" class="btn2_letter8" style="left:815px; top:98px; width:108px; height:19px; ">
  1344. <caption>주민등록번호검사</caption>
  1345. <script type="javascript" ev:event="DOMActivate">
  1346. <![CDATA[
  1347. // //chkresno("6007262041524");
  1348. //
  1349. //
  1350. //
  1351. // if (!radfJuminCheck("810314-1032411"))
  1352. // {
  1353. // alert("잘못된 주민등록번호입니다."); return;
  1354. // }
  1355. //
  1356. // alert("정상적인 주민등록번호입니다.");
  1357. openLoadingBar("작업중");
  1358. for(var i = grd_etcproflist.fixedRows ; i < grd_etcproflist.rows ; i++)
  1359. {
  1360. sRrgstno = grd_etcproflist.valueMatrix(i, grd_etcproflist.colRef("rrgstno"));
  1361. if(!radfJuminCheck(sRrgstno) && grd_etcproflist.valueMatrix(i, grd_etcproflist.colRef("ionatiflag")) == "1" || !radfFgnJuminCheck(sRrgstno) && grd_etcproflist.valueMatrix(i, grd_etcproflist.colRef("ionatiflag")) == "9")
  1362. {
  1363. grd_etcproflist.rowStyle(i, "data", "background-color") = "#ff99cc";
  1364. model.setValue(grd_etcproflist.nodeset + "[" + i + "]/rrgstnovalidyn", "N");
  1365. // alert(model.getValue(grd_etcproflist.nodeset + "[" + (i-1) + "]/rrgstnovalidyn"));
  1366. // alert(model.getValue(grd_etcproflist.nodeset + "[" + i + "]/rrgstnovalidyn"));
  1367. // alert(model.getValue(grd_etcproflist.nodeset + "[" + (i+1) + "]/rrgstnovalidyn"));
  1368. }
  1369. }
  1370. grd_etcproflist.refresh();
  1371. closeLoadingBar();
  1372. ]]>
  1373. </script>
  1374. </button>
  1375. <button id="button4" class="btn2_letter4" visibility="hidden" style="left:475px; top:95px; width:64px; height:19px; text-align:left; ">
  1376. <caption>엑셀양식</caption>
  1377. <script type="javascript" ev:event="DOMActivate">
  1378. <![CDATA[
  1379. var sTitle = "기타소득 입력 양식";
  1380. grd_excelupload.rebuild();
  1381. misfSaveExcel(grd_excelupload, sTitle);
  1382. ]]>
  1383. </script>
  1384. </button>
  1385. <datagrid id="grd_prntetcproflist" nodeset="/root/main/list/prntetcproflist" visibility="hidden" backcoloralternate="#ffffff" caption="기관코드^일련번호^세부일련번호^지급처사업자등록번호^지급처거래처명^지급처대표자명^지급처사업자(주민)번호^상위주소^하위주소^증빙구분^확인^품의번호^소득&#xA;구분코드^소득자성명&#xA;(상호)^주민(사업자)&#xA;등록번호^주소^내/외국인^거주자구분^귀속일자^지급&#xA;년도^지급&#xA;건수^지급일자^귀속년월^지급총액^필요경비^소득금액^세율^소득세^주민세^법인세^농특세^계^미결전표일자^미결전표번호^미결전표일련번호^전표여부^비고" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 133, 55, 80, 110, 0, 60, 0, 0, 0, 0, 90, 90, 90, 80, 75, 39, 75, 70, 70, 70, 80, 0, 0, 0, 0, 200, 100, 100, 100" explorerbar="sort" frozencols="21" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:65px; top:410px; width:345px; height:90px; ">
  1386. <col ref="instcd" visibility="hidden"/>
  1387. <col ref="seqno" visibility="hidden"/>
  1388. <col ref="detlseqno" visibility="hidden"/>
  1389. <col ref="deployeeentrregno" visibility="hidden"/>
  1390. <col ref="deployeecustnm" visibility="hidden"/>
  1391. <col ref="deployeeprsdnm" visibility="hidden"/>
  1392. <col ref="deployeerrgstno" visibility="hidden"/>
  1393. <col ref="deployeesupaddr" visibility="hidden"/>
  1394. <col ref="deployeeinfaddr" visibility="hidden"/>
  1395. <col ref="chrgflag"/>
  1396. <col disabled="true" ref="chknm" type="input" style="text-align:center; "/>
  1397. <col ref="pumno" type="input" format="99999999-99999999" style="text-align:center; "/>
  1398. <col ref="incmflag" type="combo" format="##" style="text-align:center; ">
  1399. <choices>
  1400. <itemset nodeset="/root/init/cmb_incmflag1/comcodelist">
  1401. <label ref="cdnm"/>
  1402. <value ref="cdid"/>
  1403. </itemset>
  1404. </choices>
  1405. </col>
  1406. <col imemode="hangul" ref="name" type="inputbutton" style="text-align:center; "/>
  1407. <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
  1408. <col ref="address" style="text-align:left; padding-left:1; "/>
  1409. <col disabled="true" ref="ionatiflag" type="combo" style="text-align:center; ">
  1410. <choices>
  1411. <item>
  1412. <label>내국인</label>
  1413. <value>1</value>
  1414. </item>
  1415. <item>
  1416. <label>외국인</label>
  1417. <value>9</value>
  1418. </item>
  1419. </choices>
  1420. </col>
  1421. <col ref="residentflag" visibility="hidden"/>
  1422. <col ref="posyear" type="inputdate" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
  1423. <col ref="getyear" visibility="hidden" format="yyyy" style="text-align:center; "/>
  1424. <col ref="cnt" visibility="hidden" style="text-align:center; "/>
  1425. <col ref="paydd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  1426. <col ref="getdd" type="inputdate" format="yyyy-mm" style="text-align:center; "/>
  1427. <col ref="paytotamt" type="input" format="(-)#,###" style="text-align:right; padding-right:1; "/>
  1428. <col disabled="true" ref="payamt" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1429. <col disabled="true" ref="proftax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1430. <col disabled="true" ref="taxrate" format="## %" style="text-align:right; "/>
  1431. <col disabled="true" ref="incmtax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1432. <col disabled="true" ref="resdntax" type="input" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1433. <col disabled="true" ref="lawtax" visibility="hidden" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1434. <col disabled="true" ref="nhtax" visibility="hidden" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1435. <col disabled="true" ref="sumamt" format="(-)#,###.##" style="text-align:right; padding-right:1; "/>
  1436. <col ref="unsldd"/>
  1437. <col ref="unslno" visibility="hidden"/>
  1438. <col ref="unslseqno"/>
  1439. <col ref="slipyn"/>
  1440. <col ref="cmt" type="input" visibility="hidden"/>
  1441. <col ref="rrgstnovalidyn" visibility="hidden"/>
  1442. <col ref="emplno" visibility="hidden"/>
  1443. <col ref="chkyn" type="input" visibility="hidden"/>
  1444. <script type="javascript" ev:event="onbuttonclick">
  1445. <![CDATA[
  1446. if(grd_etcproflist.col == grd_etcproflist.colRef("name"))
  1447. {
  1448. model.setValue("/root/hidden/incmpsn/name", model.getValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/name"));
  1449. misfOpenPopUpList("31", opt_temp, "", "rrgstno,name,entrregno,custnm,zipcd,zipcd1,zipcd2,zipcdseqno,supaddr,infaddr,cntctel,emailaddr,passport,cmt,ionatiflag,incmflag", "");
  1450. // 팝업화면의 그리드 순서가 바뀌면 틀어지기 때문에 적절치 않은 사용이다.
  1451. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  1452. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  1453. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/incmflag", model.getValue("/root/hidden/incmpsn/incmflag"));
  1454. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/ionatiflag", model.getValue("/root/hidden/incmpsn/ionatiflag"));
  1455. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/posyear", "");
  1456. //model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/getyear", getCurrentDate().substr(0, 4));
  1457. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/cnt", "1");
  1458. }
  1459. model.refresh();
  1460. ]]>
  1461. </script>
  1462. <script type="javascript" ev:event="xforms-value-changed">
  1463. <![CDATA[
  1464. if(grd_etcproflist.col == grd_etcproflist.colRef("name") || grd_etcproflist.col == grd_etcproflist.colRef("rrgstno"))
  1465. {
  1466. model.setValue("/root/send/rertparams2/instcd", model.getValue("/root/send/retrparams/instcd"));
  1467. if(grd_etcproflist.col == grd_etcproflist.colRef("name"))
  1468. {
  1469. model.setValue("/root/send/rertparams2/name", grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("name")));
  1470. model.setValue("/root/send/rertparams2/rrgstno", "");
  1471. model.setValue("/root/send/rertparams2/retrflag", "name");
  1472. }
  1473. else if(grd_etcproflist.col == grd_etcproflist.colRef("rrgstno"))
  1474. {
  1475. model.setValue("/root/send/rertparams2/name", "");
  1476. model.setValue("/root/send/rertparams2/rrgstno", grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("rrgstno")));
  1477. model.setValue("/root/send/rertparams2/retrflag", "code");
  1478. }
  1479. if (submit("TRRAC00611"))
  1480. {
  1481. if (instance1.selectNodes("/root/hidden/incmpsn").length == 0)
  1482. {
  1483. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/name", model.getValue("/root/hidden/incmpsn/name"));
  1484. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/rrgstno", model.getValue("/root/hidden/incmpsn/rrgstno"));
  1485. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/incmflag", model.getValue("/root/hidden/incmpsn/incmflag"));
  1486. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/ionatiflag", model.getValue("/root/hidden/incmpsn/ionatiflag"));
  1487. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/posyear", "");
  1488. //model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/getyear", getCurrentDate().substr(0, 4));
  1489. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/cnt", "1");
  1490. }
  1491. else
  1492. {
  1493. }
  1494. }
  1495. }
  1496. else if(grd_etcproflist.col == grd_etcproflist.colRef("paytotamt") || grd_etcproflist.col == grd_etcproflist.colRef("taxrate"))
  1497. {
  1498. var sPayTotAmt = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("paytotamt"));
  1499. var sTaxRate = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("taxrate"));
  1500. var sIncmFlag = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmflag"));
  1501. if(sPayTotAmt.getTrim() != "" && sTaxRate.getTrim() != "")
  1502. {
  1503. var iPayTotAmt = parseInt(sPayTotAmt, 10);
  1504. var iPayAmt = 0;
  1505. var iProfTax = 0;
  1506. var fTaxRate = parseFloat(sTaxRate);
  1507. var fNeedPay = chk_needpay.value;
  1508. // iPayAmt = iPayTotAmt - ((iPayTotAmt * fTaxRate) / 100);
  1509. //필요경비
  1510. //iPayAmt = ((iPayTotAmt * fNeedPay) / 100);
  1511. //2012.02.29 박준범 : 필요경비에 반올림 처리
  1512. iPayAmt = Math.round((iPayTotAmt * fNeedPay) / 100);
  1513. // iProfTax = iPayTotAmt * (fTaxRate / 100);
  1514. // 소득금액
  1515. iProfTax = iPayTotAmt - iPayAmt;
  1516. if(sIncmFlag == "42")
  1517. {
  1518. iPayAmt = 0;
  1519. }
  1520. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("payamt")) = iPayAmt;
  1521. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("proftax")) = iProfTax;
  1522. }
  1523. if(grd_etcproflist.col == grd_etcproflist.colRef("paytotamt") && sPayTotAmt.getTrim() != "")
  1524. {
  1525. var iPayTotAmt = parseInt(sPayTotAmt, 10);
  1526. var sIncmFlag = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmflag"));
  1527. var iIncmTax = 0;
  1528. var iResdnTax = 0;
  1529. if(sIncmFlag == "42")
  1530. {
  1531. if (fNeedPay != "100") {
  1532. iIncmTax = ((iPayTotAmt * 0.22) / 11) * 10;
  1533. iResdnTax = (iPayTotAmt * 0.22) / 11;
  1534. } else if (fNeedPay == "100" ) {
  1535. iIncmTax = 0;
  1536. iResdnTax = 0;
  1537. }
  1538. }
  1539. else
  1540. {
  1541. iIncmTax = (iPayTotAmt <= 250000) ? 0 : parseInt((iProfTax * fTaxRate /100) / 10, 10) * 10;
  1542. iResdnTax = (iPayTotAmt <= 250000) ? 0 : parseInt((iIncmTax * 0.1) / 10, 10) * 10;
  1543. if (iIncmTax < 1000 || fNeedPay == "100")
  1544. {
  1545. iIncmTax = 0;
  1546. iResdnTax = 0;
  1547. }
  1548. }
  1549. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmtax")) = iIncmTax;
  1550. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("resdntax")) = iResdnTax;
  1551. grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("sumamt")) = iIncmTax + iResdnTax;
  1552. }
  1553. }
  1554. else if(grd_etcproflist.col == grd_etcproflist.colRef("incmflag"))
  1555. {
  1556. // var sIncmFlag = grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("incmflag"));
  1557. //
  1558. // if(sIncmFlag == "42")
  1559. // {
  1560. // grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("taxrate")) = "30";
  1561. // }
  1562. }
  1563. else if(grd_etcproflist.col == grd_etcproflist.colRef("posyear"))
  1564. {
  1565. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/getyear", grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("posyear")).substr(0, 4));
  1566. }
  1567. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/lawtax", "0");
  1568. model.setValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/nhtax", "0");
  1569. model.recalculate();
  1570. ]]>
  1571. </script>
  1572. <script type="javascript" ev:event="onaftersort">
  1573. <![CDATA[
  1574. grd_etcproflist.gridToInstance();
  1575. ]]>
  1576. </script>
  1577. <script type="javascript" ev:event="ondblclick">
  1578. <![CDATA[
  1579. if (grd_etcproflist.isCell(event.target) && grd_etcproflist.row > 0 && grd_etcproflist.valueMatrix(grd_etcproflist.row, grd_etcproflist.colRef("slipyn")) == "Y" && model.getValue("/root/send/retrparams/retrkind") == "all")
  1580. {
  1581. model.makeValue("/root/source/slipinfo/instcd", cmb_instcd.value);
  1582. model.makeValue("/root/source/slipinfo/slipdt", model.getValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/unsldd"));
  1583. model.makeValue("/root/source/slipinfo/slipno", model.getValue(grd_etcproflist.nodeset + "[" + grd_etcproflist.row + "]/unslno").substr(0, 4));
  1584. model.refresh();
  1585. modal("SMRAD00100","","","","","/root/source", "/root/target" );
  1586. }
  1587. ]]>
  1588. </script>
  1589. </datagrid>
  1590. <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; ">
  1591. <choices>
  1592. <itemset nodeset="/root/init/cmb_gruptype/comcodelist">
  1593. <label ref="cdnm"/>
  1594. <value ref="cdid"/>
  1595. </itemset>
  1596. </choices>
  1597. </select1>
  1598. </group>
  1599. </xhtml:body>
  1600. </xhtml:html>