SMRAR02500_월별감가상각수정.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRAR02500" position="absolute 0 0 1200 761" titletext="월별감가상각수정" oninit="SMRAR02500_oninit" onload="SMRAR02500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="월별 감가상각 수정" class="tit_1" position="absolute 0 0 293 25"/>
  8. <Shape id="line2" class="line_6" position="absolute 0 40 1194 46" anchor="left top right"/>
  9. <Button id="btn_modify" taborder="1" text="수정" class="btn4" enable="false" position="absolute 1079 19 1135 41" anchor="top right" onclick="btn_modify_onclick"/>
  10. <Button id="btn_save" taborder="2" text="저장" class="btn4" enable="false" position="absolute 1138 19 1194 41" anchor="top right" onclick="btn_save_onclick"/>
  11. <Div id="grp_sea" anchor="left top right" taborder="3" class="div_SA2" position="absolute 0 44 1195 104">
  12. <Layouts>
  13. <Layout>
  14. <Shape id="line5" linetype="vertical" class="line_4" position="absolute 1022 10 1028 51" anchor="top right"/>
  15. <Button id="btn_search" taborder="11" text="조회" class="btn1" position="absolute 1090 21 1146 43" anchor="top right" onclick="grp_sea_btn_search_onclick"/>
  16. <Combo id="cmb_instcd_search" taborder="12" class="combo_s_essential" enable="false" position="absolute 95 8 275 27"/>
  17. <MaskEdit id="ipt_yyyymm" taborder="13" mask="####-##" class="input_s_essential" position="absolute 95 34 195 53" maskchar=" " type="string" trimtype="both" autoselect="true" autoskip="true" style="align:left middle;"/>
  18. <Edit id="ipt_fixasetcd_search" taborder="14" class="input_search" position="absolute 430 34 525 53"/>
  19. <Edit id="ipt_fixasetnm_search" taborder="15" class="input_search" enable="false" position="absolute 555 34 740 53"/>
  20. <Static id="caption2" text="대 분 류 :" class="search_name" position="absolute 705 8 794 25"/>
  21. <Button id="btn_fixasetcd" taborder="16" class="icon_search" position="absolute 530 34 546 50" onclick="grp_sea_btn_fixasetcd_onclick"/>
  22. <Static id="caption3" text="기관코드 :" class="search_name" position="absolute 6 8 95 25"/>
  23. <Combo id="cmb_lrgcd_search" taborder="17" position="absolute 786 7 980 26"/>
  24. <Static id="cap_codeflag" text="작업년월 :" class="search_name" position="absolute 5 36 95 53"/>
  25. <Static id="caption9" text="자산코드 :" class="search_name" position="absolute 340 36 450 53"/>
  26. <Static id="caption8" text="자산구분 :" class="search_name" position="absolute 340 8 430 25"/>
  27. <Combo id="cmb_goodflag_search" taborder="18" innerdataset="@ds_init_goodflag" codecolumn="value" datacolumn="label" position="absolute 430 7 630 26" onitemchanged="grp_sea_cmb_goodflag_search_onitemchanged"/>
  28. </Layout>
  29. </Layouts>
  30. </Div>
  31. <Shape id="line3" class="line_10" position="absolute 0 161 1195 167" anchor="left top right"/>
  32. <Button id="btn_excel" taborder="4" text="Excel 저장" class="btn5" position="absolute 1120 142 1195 161" anchor="top right" onclick="btn_excel_onclick"/>
  33. <Grid id="grd_main" taborder="5" binddataset="ds_main_maindatalist" useinputpanel="false" position="absolute 0 166 1194 751" autoenter="select" cellsizingtype="col" anchor="all">
  34. <Formats>
  35. <Format id="default">
  36. <Columns>
  37. <Column size="23"/>
  38. <Column size="100"/>
  39. <Column size="0"/>
  40. <Column size="112"/>
  41. <Column size="99"/>
  42. <Column size="180"/>
  43. <Column size="100"/>
  44. <Column size="60"/>
  45. <Column size="50"/>
  46. <Column size="80"/>
  47. <Column size="70"/>
  48. <Column size="70"/>
  49. <Column size="90"/>
  50. <Column size="80"/>
  51. <Column size="90"/>
  52. <Column size="80"/>
  53. </Columns>
  54. <Rows>
  55. <Row size="24" band="head"/>
  56. <Row size="24"/>
  57. </Rows>
  58. <Band id="head">
  59. <Cell/>
  60. <Cell col="1" text="기관코드"/>
  61. <Cell col="2" text="계정코드"/>
  62. <Cell col="3" text="계정명"/>
  63. <Cell col="4" text="자산코드"/>
  64. <Cell col="5" text="자산명"/>
  65. <Cell col="6" text="규격"/>
  66. <Cell col="7" text="단위"/>
  67. <Cell col="8" text="수량"/>
  68. <Cell col="9" text="취득금액"/>
  69. <Cell col="10" text="상각년월"/>
  70. <Cell col="11" text="상각수량"/>
  71. <Cell col="12" text="전기말누계액"/>
  72. <Cell col="13" text="당기상각액"/>
  73. <Cell col="14" text="감가누계"/>
  74. <Cell col="15" text="미상각잔액"/>
  75. </Band>
  76. <Band id="body">
  77. <Cell celltype="head"/>
  78. <Cell col="1" text="bind:instcd"/>
  79. <Cell col="2" text="bind:acntcd"/>
  80. <Cell col="3" text="bind:acntnm"/>
  81. <Cell col="4" text="bind:fixasetcd"/>
  82. <Cell col="5" displaytype="date" text="bind:goodflaghngnm" calendardisplaynulltype="nulltext"/>
  83. <Cell col="6" text="bind:goodspec"/>
  84. <Cell col="7" text="bind:fixasetunit"/>
  85. <Cell col="8" text="bind:qty"/>
  86. <Cell col="9" displaytype="number" text="bind:possnamt"/>
  87. <Cell col="10" text="bind:yyyymm"/>
  88. <Cell col="11" displaytype="text" edittype="text" class="input_s_essential" text="bind:basesu"/>
  89. <Cell col="12" displaytype="number" edittype="text" class="input_s_essential" text="bind:bbaseksckeum"/>
  90. <Cell col="13" displaytype="number" edittype="text" class="input_s_essential" text="bind:danggisangak"/>
  91. <Cell col="14" displaytype="number" class="input_s_essential" text="bind:baseksckeum"/>
  92. <Cell col="15" displaytype="number" class="input_s_essential" text="bind:janjonsak"/>
  93. </Band>
  94. </Format>
  95. </Formats>
  96. </Grid>
  97. <Static id="caption21" text="출력 목록" class="tit_2" position="absolute 0 145 131 166"/>
  98. <Button id="button1" taborder="7" text="계산" class="btn5" position="absolute 1075 142 1117 161" anchor="top right" onclick="button1_onclick"/>
  99. </Layout>
  100. </Layouts>
  101. <Objects>
  102. <Dataset id="ds_send_fixasetlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_fixasetlist_oncolumnchanged">
  103. <ColumnInfo>
  104. <Column id="instcd_search" type="STRING" size="256"/>
  105. <Column id="fixasetcd_search" type="STRING" size="256"/>
  106. <Column id="fixasetnm_search" type="STRING" size="256"/>
  107. <Column id="lrgcd_search" type="STRING" size="256"/>
  108. <Column id="excute_yyyymm" type="STRING" size="256"/>
  109. <Column id="goodflag_search" type="STRING" size="256"/>
  110. </ColumnInfo>
  111. <Rows>
  112. <Row>
  113. <Col id="instcd_search"/>
  114. <Col id="fixasetcd_search"/>
  115. <Col id="fixasetnm_search"/>
  116. <Col id="lrgcd_search"/>
  117. <Col id="excute_yyyymm"/>
  118. <Col id="goodflag_search"/>
  119. </Row>
  120. </Rows>
  121. </Dataset>
  122. <Dataset id="ds_main_maindatalist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  123. <ColumnInfo>
  124. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  125. <Column id="acntcd" type="STRING" size="256" sumtext="계정코드"/>
  126. <Column id="acntnm" type="STRING" size="256" sumtext="계정명"/>
  127. <Column id="fixasetcd" type="STRING" size="256" sumtext="자산번호"/>
  128. <Column id="goodflaghngnm" type="STRING" size="256" sumtext="자산명"/>
  129. <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
  130. <Column id="fixasetunit" type="STRING" size="256" sumtext="단위"/>
  131. <Column id="qty" type="STRING" size="256" sumtext="수량"/>
  132. <Column id="possnamt" type="STRING" size="256" sumtext="취득금액"/>
  133. <Column id="yyyymm" type="STRING" size="256" sumtext="상각년월"/>
  134. <Column id="bbaseksckeum" type="STRING" size="256" sumtext="전기말누계액"/>
  135. <Column id="danggisangak" type="STRING" size="256" sumtext="당기상각액"/>
  136. <Column id="baseksckeum" type="STRING" size="256" sumtext="감가누계"/>
  137. <Column id="janjonsak" type="STRING" size="256" sumtext="미상각잔액"/>
  138. <Column id="basesu" type="STRING" size="256" sumtext="기초수량"/>
  139. </ColumnInfo>
  140. </Dataset>
  141. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  142. <Dataset id="ds_init_fixmovelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  143. <Dataset id="ds_init_goodflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  144. </Objects>
  145. <Bind>
  146. <BindItem id="item0" compid="grp_sea.cmb_instcd_search" propid="value" datasetid="ds_send_fixasetlist" columnid="instcd_search"/>
  147. <BindItem id="item2" compid="grp_sea.cmb_lrgcd_search" propid="value" datasetid="ds_send_fixasetlist" columnid="lrgcd_search"/>
  148. <BindItem id="item3" compid="grp_sea.ipt_yyyymm" propid="value" datasetid="ds_send_fixasetlist" columnid="excute_yyyymm"/>
  149. <BindItem id="item4" compid="grp_sea.ipt_fixasetcd_search" propid="value" datasetid="ds_send_fixasetlist" columnid="fixasetcd_search"/>
  150. <BindItem id="item5" compid="grp_sea.ipt_fixasetnm_search" propid="value" datasetid="ds_send_fixasetlist" columnid="fixasetnm_search"/>
  151. <BindItem id="item1" compid="grp_sea.cmb_goodflag_search" propid="value" datasetid="ds_send_fixasetlist" columnid="goodflag_search"/>
  152. </Bind>
  153. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  154. * System Name :
  155. * Job Name :
  156. * Creator :
  157. * Make Date : 2017-06-19
  158. * Description :
  159. *---------------------------------------------------------------------------------------
  160. * Modify Date Modifier Modify Description
  161. *---------------------------------------------------------------------------------------
  162. * 2017-06-19 Live Converter TF->XP
  163. *
  164. *---------------------------------------------------------------------------------------
  165. ****************************************************************************************/
  166. include "com_commonxp::comm_main.xjs";
  167. include "mis_miscommonxp::MIS.xjs";
  168. include "mis_miscommonxp::RSZ001.xjs";
  169. function SMRAR02500_oninit(obj:Form, e:InitEventInfo)
  170. {
  171. frmf_initForm(obj);
  172. }
  173. function SMRAR02500_onload(obj:Form, e:LoadEventInfo)
  174. {
  175. grdf_initGrid(grd_main);
  176. grdf_setRowTypeIcon(grd_main, 0);
  177. fInitialize();
  178. }
  179. function fInitialize()
  180. {
  181. misfComboComCdList("Z0007", grp_sea.cmb_instcd_search, "N");
  182. grp_sea.cmb_instcd_search.value = sysf_getUserInfo("dutplceinstcd");
  183. rszfGoodFlagListByPgmGubn(grp_sea.cmb_goodflag_search,"2","N"); //유형자산구분
  184. grp_sea.cmb_goodflag_search.index = 0;
  185. rszfLMSComboList(grp_sea.cmb_goodflag_search.value, "", "", "grp_sea.cmb_lrgcd_search", "", "L");
  186. frmf_addComboItem("grp_sea.cmb_goodflag_search","--전체--","","above");
  187. frmf_addComboItem("grp_sea.cmb_lrgcd_search","--전체--","","above");
  188. grp_sea.cmb_goodflag_search.index = 0;
  189. grp_sea.cmb_lrgcd_search.index = 0;
  190. }
  191. function grp_sea_cmb_goodflag_search_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  192. {
  193. rszfLMSComboList(obj.value, "", "", "grp_sea.cmb_lrgcd_search", "", "L");
  194. frmf_addComboItem("grp_sea.cmb_lrgcd_search","--전체--","","above");
  195. grp_sea.cmb_lrgcd_search.index = 0;
  196. //frmf_inputEnterKey("grp_sea.cmb_lrgcd_search", "onitemchanged", new ItemChangeEventInfo );
  197. }
  198. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  199. {
  200. if( fGetMainDataList() )
  201. {
  202. var oParam = {};
  203. oParam.id = "TRRAR02501";
  204. oParam.service = "accountinginfoapp.AccountingInfo";
  205. oParam.method = "getMonthSanggakEditList";
  206. oParam.inds = "req=ds_send_fixasetlist";
  207. oParam.outds = "ds_main_maindatalist=maindatalist";
  208. oParam.async = false;
  209. //oParam.callback = "cf_TRRAR02501";
  210. tranf_submit(oParam);
  211. var basesu = ds_main_maindatalist.getColumn(0, "basesu");
  212. if(utlf_isNull(basesu))
  213. {
  214. ds_main_maindatalist.updatecontrol = false;
  215. ds_main_maindatalist.setColumn(0, "basesu","1");
  216. ds_main_maindatalist.updatecontrol = true;
  217. }
  218. var janjonsak = ds_main_maindatalist.getColumn(0, "janjonsak");
  219. if(utlf_isNull(janjonsak))
  220. {
  221. btn_save.enable = true;
  222. }
  223. else
  224. {
  225. btn_modify.enable = true;
  226. }
  227. }
  228. }
  229. function fGetMainDataList()
  230. {
  231. if (utlf_isNull(grp_sea.ipt_yyyymm.value))
  232. {
  233. sysf_messageBox("작업년월을 ","C001");
  234. return false;
  235. }
  236. if (String(grp_sea.ipt_yyyymm.value).length != 6 )
  237. {
  238. sysf_messageBox("작업년월을 6 자리로","C001");
  239. return false;
  240. }
  241. if (utlf_isNull(grp_sea.ipt_fixasetcd_search.value))
  242. {
  243. sysf_messageBox("자산코드를 ","C001");
  244. return false;
  245. }
  246. return true;
  247. }
  248. function ds_columnChange()
  249. {
  250. dsf_makeValue(ds_send, "instcd", "string", ds_send_fixasetlist.getColumn(0, "instcd_search"), 0);
  251. dsf_makeValue(ds_send, "yyyymm", "string", ds_send_fixasetlist.getColumn(0, "excute_yyyymm"), 0);
  252. dsf_makeValue(ds_send, "fixasetcd", "string", ds_send_fixasetlist.getColumn(0, "fixasetcd_search"), 0);
  253. }
  254. function ds_send_fixasetlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  255. {
  256. if(e.columnid == "fixasetcd_search")
  257. {
  258. grp_sea.ipt_fixasetcd_search.value = e.newvalue;
  259. grp_sea.ipt_fixasetcd_search.setFocus();
  260. if(!utlf_isNull(e.newvalue))
  261. {
  262. var yyyymm = obj.getColumn(0, "excute_yyyymm");
  263. if (utlf_isNull(yyyymm))
  264. {
  265. sysf_messageBox("작업년월을 ","C001");
  266. grp_sea.ipt_fixasetcd_search.value = "";
  267. }
  268. else
  269. {
  270. ds_columnChange();
  271. var oParam = {};
  272. oParam.id = "TRRAR02502";
  273. oParam.service = "accountinginfoapp.AccountingInfo";
  274. oParam.method = "getFixasetMoveFlag";
  275. oParam.inds = "req=ds_send";
  276. oParam.outds = "ds_init_fixmovelist=fixmovelist";
  277. oParam.async = false;
  278. //oParam.callback = "cf_TRRAR02502";
  279. tranf_submit(oParam);
  280. var cnt = ds_init_fixmovelist.getColumn(0, "cnt");
  281. if (cnt != "0")
  282. {
  283. sysf_messageBox("기관이동 자산만 수정","I006");
  284. grp_sea.ipt_fixasetcd_search.value = "";
  285. }
  286. else
  287. {
  288. rszfValidationCheck("TRRSD00241", "rfcmfacdlist", "instcd,requirementcd,requirementnm,goodflag", grp_sea.cmb_instcd_search.value +",fixasetcd," + e.newvalue +"," + grp_sea.cmb_goodflag_search.value,
  289. "", "fixasetcd_search,fixasetnm_search", grp_sea.ipt_fixasetcd_search, "SPRSD00240","instcd,goodflag","grp_sea.cmb_instcd_search,grp_sea.cmb_goodflag_search");
  290. }
  291. }
  292. }
  293. else
  294. {
  295. grp_sea.ipt_fixasetnm_search.value = "";
  296. }
  297. }
  298. }
  299. function grp_sea_btn_fixasetcd_onclick(obj:Button, e:ClickEventInfo)
  300. {
  301. rszfOpenPopUpListByWndName(grp_sea.ipt_fixasetcd_search, "", "fixasetcd_search,fixasetnm_search","SPRSD00240","instcd,goodflag","grp_sea.cmb_instcd_search,grp_sea.cmb_goodflag_search");
  302. }
  303. function button1_onclick(obj:Button, e:ClickEventInfo)
  304. {
  305. var bbaseksckeum = ds_main_maindatalist.getColumn(0, "bbaseksckeum");
  306. var danggisangak = ds_main_maindatalist.getColumn(0, "danggisangak");
  307. var possnamt = ds_main_maindatalist.getColumn(0, "possnamt");
  308. if(utlf_isNull(bbaseksckeum) || utlf_isNull(danggisangak))
  309. {
  310. sysf_messageBox("전기말누계액 과 당기상각액은","I003");
  311. }
  312. else
  313. {
  314. ds_main_maindatalist.setColumn(ds_main_maindatalist.rowposition, "baseksckeum", parseInt(bbaseksckeum) + parseInt(danggisangak));
  315. var baseksckeum = ds_main_maindatalist.getColumn(0, "baseksckeum");
  316. ds_main_maindatalist.setColumn(ds_main_maindatalist.rowposition, "janjonsak", parseInt(possnamt) - parseInt(baseksckeum));
  317. }
  318. }
  319. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  320. {
  321. }
  322. function btn_modify_onclick(obj:Button, e:ClickEventInfo)
  323. {
  324. if( fSetChackValue() )
  325. {
  326. rtn = sysf_messageBox("감가상각내역을 수정","Q002");
  327. if ( rtn == "6" )
  328. {
  329. var oParam = {};
  330. oParam.id = "TXRAR02501";
  331. oParam.service = "accountinginfoapp.AccountingInfo";
  332. oParam.method = "setRfrsDeprModify";
  333. oParam.inds = "req=ds_main_maindatalist:u";
  334. oParam.outds = "ds_=line";
  335. oParam.async = false;
  336. oParam.callback = "cf_TXRAR02501";
  337. tranf_submit(oParam);
  338. }
  339. }
  340. }
  341. function cf_TXRAR02501(sSvcId, nErrorCode, sErrorMsg)
  342. {
  343. if(nErrorCode < 0) return;
  344. else
  345. {
  346. grp_sea.btn_search.click();
  347. btn_save.enable = false;
  348. btn_modify.enable = true;
  349. }
  350. }
  351. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  352. {
  353. if( fSetChackValue() )
  354. {
  355. rtn = sysf_messageBox("감가상각내역을 수정","Q002");
  356. if ( rtn == "6" )
  357. {
  358. var oParam = {};
  359. oParam.id = "TXRAR02501";
  360. oParam.service = "accountinginfoapp.AccountingInfo";
  361. oParam.method = "setRfrsDeprModify";
  362. oParam.inds = "req=ds_main_maindatalist:u";
  363. oParam.outds = "ds_=line";
  364. oParam.async = false;
  365. oParam.callback = "cf_TXRAR02501";
  366. tranf_submit(oParam);
  367. }
  368. }
  369. }
  370. function fSetChackValue()
  371. {
  372. if (String(ds_main_maindatalist.getColumn(0, "bbaseksckeum")).length==0 )
  373. {
  374. sysf_messageBox("전기말누계액" ,"C001");
  375. ds_main_maindatalist.rowposition = 0;
  376. grd_main.setCellPos(grd_main.getBindCellIndex("body", "bbaseksckeum"));
  377. grd_main.showEditor(true);
  378. return false;
  379. }
  380. if (String(ds_main_maindatalist.getColumn(0, "danggisangak")).length==0 )
  381. {
  382. sysf_messageBox("당기상각액" ,"C001");
  383. ds_main_maindatalist.rowposition = 0;
  384. grd_main.setCellPos(grd_main.getBindCellIndex("body", "danggisangak"));
  385. grd_main.showEditor(true);
  386. return false;
  387. }
  388. if (String(ds_main_maindatalist.getColumn(0, "baseksckeum")).length==0 )
  389. {
  390. sysf_messageBox("감가누계" ,"I004");
  391. return false;
  392. }
  393. if (String(ds_main_maindatalist.getColumn(0, "janjonsak")).length==0 )
  394. {
  395. sysf_messageBox("미상각잔액" ,"I004");
  396. return false;
  397. }
  398. return true;
  399. } ]]></Script>
  400. </Form>
  401. </FDL>