123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRAR02500" position="absolute 0 0 1200 761" titletext="월별감가상각수정" oninit="SMRAR02500_oninit" onload="SMRAR02500_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="월별 감가상각 수정" class="tit_1" position="absolute 0 0 293 25"/>
- <Shape id="line2" class="line_6" position="absolute 0 40 1194 46" anchor="left top right"/>
- <Button id="btn_modify" taborder="1" text="수정" class="btn4" enable="false" position="absolute 1079 19 1135 41" anchor="top right" onclick="btn_modify_onclick"/>
- <Button id="btn_save" taborder="2" text="저장" class="btn4" enable="false" position="absolute 1138 19 1194 41" anchor="top right" onclick="btn_save_onclick"/>
- <Div id="grp_sea" anchor="left top right" taborder="3" class="div_SA2" position="absolute 0 44 1195 104">
- <Layouts>
- <Layout>
- <Shape id="line5" linetype="vertical" class="line_4" position="absolute 1022 10 1028 51" anchor="top right"/>
- <Button id="btn_search" taborder="11" text="조회" class="btn1" position="absolute 1090 21 1146 43" anchor="top right" onclick="grp_sea_btn_search_onclick"/>
- <Combo id="cmb_instcd_search" taborder="12" class="combo_s_essential" enable="false" position="absolute 95 8 275 27"/>
- <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;"/>
- <Edit id="ipt_fixasetcd_search" taborder="14" class="input_search" position="absolute 430 34 525 53"/>
- <Edit id="ipt_fixasetnm_search" taborder="15" class="input_search" enable="false" position="absolute 555 34 740 53"/>
- <Static id="caption2" text="대 분 류 :" class="search_name" position="absolute 705 8 794 25"/>
- <Button id="btn_fixasetcd" taborder="16" class="icon_search" position="absolute 530 34 546 50" onclick="grp_sea_btn_fixasetcd_onclick"/>
- <Static id="caption3" text="기관코드 :" class="search_name" position="absolute 6 8 95 25"/>
- <Combo id="cmb_lrgcd_search" taborder="17" position="absolute 786 7 980 26"/>
- <Static id="cap_codeflag" text="작업년월 :" class="search_name" position="absolute 5 36 95 53"/>
- <Static id="caption9" text="자산코드 :" class="search_name" position="absolute 340 36 450 53"/>
- <Static id="caption8" text="자산구분 :" class="search_name" position="absolute 340 8 430 25"/>
- <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"/>
- </Layout>
- </Layouts>
- </Div>
- <Shape id="line3" class="line_10" position="absolute 0 161 1195 167" anchor="left top right"/>
- <Button id="btn_excel" taborder="4" text="Excel 저장" class="btn5" position="absolute 1120 142 1195 161" anchor="top right" onclick="btn_excel_onclick"/>
- <Grid id="grd_main" taborder="5" binddataset="ds_main_maindatalist" useinputpanel="false" position="absolute 0 166 1194 751" autoenter="select" cellsizingtype="col" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="23"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="112"/>
- <Column size="99"/>
- <Column size="180"/>
- <Column size="100"/>
- <Column size="60"/>
- <Column size="50"/>
- <Column size="80"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="90"/>
- <Column size="80"/>
- <Column size="90"/>
- <Column size="80"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="기관코드"/>
- <Cell col="2" text="계정코드"/>
- <Cell col="3" text="계정명"/>
- <Cell col="4" text="자산코드"/>
- <Cell col="5" text="자산명"/>
- <Cell col="6" text="규격"/>
- <Cell col="7" text="단위"/>
- <Cell col="8" text="수량"/>
- <Cell col="9" text="취득금액"/>
- <Cell col="10" text="상각년월"/>
- <Cell col="11" text="상각수량"/>
- <Cell col="12" text="전기말누계액"/>
- <Cell col="13" text="당기상각액"/>
- <Cell col="14" text="감가누계"/>
- <Cell col="15" text="미상각잔액"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:instcd"/>
- <Cell col="2" text="bind:acntcd"/>
- <Cell col="3" text="bind:acntnm"/>
- <Cell col="4" text="bind:fixasetcd"/>
- <Cell col="5" displaytype="date" text="bind:goodflaghngnm" calendardisplaynulltype="nulltext"/>
- <Cell col="6" text="bind:goodspec"/>
- <Cell col="7" text="bind:fixasetunit"/>
- <Cell col="8" text="bind:qty"/>
- <Cell col="9" displaytype="number" text="bind:possnamt"/>
- <Cell col="10" text="bind:yyyymm"/>
- <Cell col="11" displaytype="text" edittype="text" class="input_s_essential" text="bind:basesu"/>
- <Cell col="12" displaytype="number" edittype="text" class="input_s_essential" text="bind:bbaseksckeum"/>
- <Cell col="13" displaytype="number" edittype="text" class="input_s_essential" text="bind:danggisangak"/>
- <Cell col="14" displaytype="number" class="input_s_essential" text="bind:baseksckeum"/>
- <Cell col="15" displaytype="number" class="input_s_essential" text="bind:janjonsak"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption21" text="출력 목록" class="tit_2" position="absolute 0 145 131 166"/>
- <Button id="button1" taborder="7" text="계산" class="btn5" position="absolute 1075 142 1117 161" anchor="top right" onclick="button1_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <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">
- <ColumnInfo>
- <Column id="instcd_search" type="STRING" size="256"/>
- <Column id="fixasetcd_search" type="STRING" size="256"/>
- <Column id="fixasetnm_search" type="STRING" size="256"/>
- <Column id="lrgcd_search" type="STRING" size="256"/>
- <Column id="excute_yyyymm" type="STRING" size="256"/>
- <Column id="goodflag_search" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd_search"/>
- <Col id="fixasetcd_search"/>
- <Col id="fixasetnm_search"/>
- <Col id="lrgcd_search"/>
- <Col id="excute_yyyymm"/>
- <Col id="goodflag_search"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_maindatalist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="acntcd" type="STRING" size="256" sumtext="계정코드"/>
- <Column id="acntnm" type="STRING" size="256" sumtext="계정명"/>
- <Column id="fixasetcd" type="STRING" size="256" sumtext="자산번호"/>
- <Column id="goodflaghngnm" type="STRING" size="256" sumtext="자산명"/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
- <Column id="fixasetunit" type="STRING" size="256" sumtext="단위"/>
- <Column id="qty" type="STRING" size="256" sumtext="수량"/>
- <Column id="possnamt" type="STRING" size="256" sumtext="취득금액"/>
- <Column id="yyyymm" type="STRING" size="256" sumtext="상각년월"/>
- <Column id="bbaseksckeum" type="STRING" size="256" sumtext="전기말누계액"/>
- <Column id="danggisangak" type="STRING" size="256" sumtext="당기상각액"/>
- <Column id="baseksckeum" type="STRING" size="256" sumtext="감가누계"/>
- <Column id="janjonsak" type="STRING" size="256" sumtext="미상각잔액"/>
- <Column id="basesu" type="STRING" size="256" sumtext="기초수량"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_fixmovelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_goodflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.cmb_instcd_search" propid="value" datasetid="ds_send_fixasetlist" columnid="instcd_search"/>
- <BindItem id="item2" compid="grp_sea.cmb_lrgcd_search" propid="value" datasetid="ds_send_fixasetlist" columnid="lrgcd_search"/>
- <BindItem id="item3" compid="grp_sea.ipt_yyyymm" propid="value" datasetid="ds_send_fixasetlist" columnid="excute_yyyymm"/>
- <BindItem id="item4" compid="grp_sea.ipt_fixasetcd_search" propid="value" datasetid="ds_send_fixasetlist" columnid="fixasetcd_search"/>
- <BindItem id="item5" compid="grp_sea.ipt_fixasetnm_search" propid="value" datasetid="ds_send_fixasetlist" columnid="fixasetnm_search"/>
- <BindItem id="item1" compid="grp_sea.cmb_goodflag_search" propid="value" datasetid="ds_send_fixasetlist" columnid="goodflag_search"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-06-19
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-06-19 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- include "mis_miscommonxp::RSZ001.xjs";
- function SMRAR02500_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRAR02500_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_main);
- grdf_setRowTypeIcon(grd_main, 0);
-
- fInitialize();
- }
- function fInitialize()
- {
- misfComboComCdList("Z0007", grp_sea.cmb_instcd_search, "N");
- grp_sea.cmb_instcd_search.value = sysf_getUserInfo("dutplceinstcd");
- rszfGoodFlagListByPgmGubn(grp_sea.cmb_goodflag_search,"2","N"); //유형자산구분
- grp_sea.cmb_goodflag_search.index = 0;
-
- rszfLMSComboList(grp_sea.cmb_goodflag_search.value, "", "", "grp_sea.cmb_lrgcd_search", "", "L");
-
- frmf_addComboItem("grp_sea.cmb_goodflag_search","--전체--","","above");
- frmf_addComboItem("grp_sea.cmb_lrgcd_search","--전체--","","above");
- grp_sea.cmb_goodflag_search.index = 0;
- grp_sea.cmb_lrgcd_search.index = 0;
- }
- function grp_sea_cmb_goodflag_search_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- rszfLMSComboList(obj.value, "", "", "grp_sea.cmb_lrgcd_search", "", "L");
- frmf_addComboItem("grp_sea.cmb_lrgcd_search","--전체--","","above");
- grp_sea.cmb_lrgcd_search.index = 0;
-
- //frmf_inputEnterKey("grp_sea.cmb_lrgcd_search", "onitemchanged", new ItemChangeEventInfo );
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- if( fGetMainDataList() )
- {
- var oParam = {};
- oParam.id = "TRRAR02501";
- oParam.service = "accountinginfoapp.AccountingInfo";
- oParam.method = "getMonthSanggakEditList";
- oParam.inds = "req=ds_send_fixasetlist";
- oParam.outds = "ds_main_maindatalist=maindatalist";
- oParam.async = false;
- //oParam.callback = "cf_TRRAR02501";
- tranf_submit(oParam);
-
- var basesu = ds_main_maindatalist.getColumn(0, "basesu");
- if(utlf_isNull(basesu))
- {
- ds_main_maindatalist.updatecontrol = false;
- ds_main_maindatalist.setColumn(0, "basesu","1");
- ds_main_maindatalist.updatecontrol = true;
- }
-
- var janjonsak = ds_main_maindatalist.getColumn(0, "janjonsak");
- if(utlf_isNull(janjonsak))
- {
- btn_save.enable = true;
- }
- else
- {
- btn_modify.enable = true;
- }
- }
- }
- function fGetMainDataList()
- {
- if (utlf_isNull(grp_sea.ipt_yyyymm.value))
- {
- sysf_messageBox("작업년월을 ","C001");
- return false;
- }
- if (String(grp_sea.ipt_yyyymm.value).length != 6 )
- {
- sysf_messageBox("작업년월을 6 자리로","C001");
- return false;
- }
- if (utlf_isNull(grp_sea.ipt_fixasetcd_search.value))
- {
- sysf_messageBox("자산코드를 ","C001");
- return false;
- }
- return true;
- }
- function ds_columnChange()
- {
- dsf_makeValue(ds_send, "instcd", "string", ds_send_fixasetlist.getColumn(0, "instcd_search"), 0);
- dsf_makeValue(ds_send, "yyyymm", "string", ds_send_fixasetlist.getColumn(0, "excute_yyyymm"), 0);
- dsf_makeValue(ds_send, "fixasetcd", "string", ds_send_fixasetlist.getColumn(0, "fixasetcd_search"), 0);
- }
- function ds_send_fixasetlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "fixasetcd_search")
- {
- grp_sea.ipt_fixasetcd_search.value = e.newvalue;
- grp_sea.ipt_fixasetcd_search.setFocus();
-
- if(!utlf_isNull(e.newvalue))
- {
- var yyyymm = obj.getColumn(0, "excute_yyyymm");
- if (utlf_isNull(yyyymm))
- {
- sysf_messageBox("작업년월을 ","C001");
- grp_sea.ipt_fixasetcd_search.value = "";
- }
- else
- {
- ds_columnChange();
-
- var oParam = {};
- oParam.id = "TRRAR02502";
- oParam.service = "accountinginfoapp.AccountingInfo";
- oParam.method = "getFixasetMoveFlag";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_init_fixmovelist=fixmovelist";
- oParam.async = false;
- //oParam.callback = "cf_TRRAR02502";
- tranf_submit(oParam);
-
- var cnt = ds_init_fixmovelist.getColumn(0, "cnt");
- if (cnt != "0")
- {
- sysf_messageBox("기관이동 자산만 수정","I006");
- grp_sea.ipt_fixasetcd_search.value = "";
- }
- else
- {
- rszfValidationCheck("TRRSD00241", "rfcmfacdlist", "instcd,requirementcd,requirementnm,goodflag", grp_sea.cmb_instcd_search.value +",fixasetcd," + e.newvalue +"," + grp_sea.cmb_goodflag_search.value,
- "", "fixasetcd_search,fixasetnm_search", grp_sea.ipt_fixasetcd_search, "SPRSD00240","instcd,goodflag","grp_sea.cmb_instcd_search,grp_sea.cmb_goodflag_search");
- }
- }
- }
- else
- {
- grp_sea.ipt_fixasetnm_search.value = "";
- }
- }
- }
- function grp_sea_btn_fixasetcd_onclick(obj:Button, e:ClickEventInfo)
- {
- rszfOpenPopUpListByWndName(grp_sea.ipt_fixasetcd_search, "", "fixasetcd_search,fixasetnm_search","SPRSD00240","instcd,goodflag","grp_sea.cmb_instcd_search,grp_sea.cmb_goodflag_search");
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- var bbaseksckeum = ds_main_maindatalist.getColumn(0, "bbaseksckeum");
- var danggisangak = ds_main_maindatalist.getColumn(0, "danggisangak");
- var possnamt = ds_main_maindatalist.getColumn(0, "possnamt");
- if(utlf_isNull(bbaseksckeum) || utlf_isNull(danggisangak))
- {
- sysf_messageBox("전기말누계액 과 당기상각액은","I003");
- }
- else
- {
- ds_main_maindatalist.setColumn(ds_main_maindatalist.rowposition, "baseksckeum", parseInt(bbaseksckeum) + parseInt(danggisangak));
- var baseksckeum = ds_main_maindatalist.getColumn(0, "baseksckeum");
- ds_main_maindatalist.setColumn(ds_main_maindatalist.rowposition, "janjonsak", parseInt(possnamt) - parseInt(baseksckeum));
- }
- }
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
-
- }
- function btn_modify_onclick(obj:Button, e:ClickEventInfo)
- {
- if( fSetChackValue() )
- {
- rtn = sysf_messageBox("감가상각내역을 수정","Q002");
- if ( rtn == "6" )
- {
- var oParam = {};
- oParam.id = "TXRAR02501";
- oParam.service = "accountinginfoapp.AccountingInfo";
- oParam.method = "setRfrsDeprModify";
- oParam.inds = "req=ds_main_maindatalist:u";
- oParam.outds = "ds_=line";
- oParam.async = false;
- oParam.callback = "cf_TXRAR02501";
- tranf_submit(oParam);
- }
- }
- }
- function cf_TXRAR02501(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0) return;
- else
- {
- grp_sea.btn_search.click();
- btn_save.enable = false;
- btn_modify.enable = true;
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if( fSetChackValue() )
- {
- rtn = sysf_messageBox("감가상각내역을 수정","Q002");
- if ( rtn == "6" )
- {
- var oParam = {};
- oParam.id = "TXRAR02501";
- oParam.service = "accountinginfoapp.AccountingInfo";
- oParam.method = "setRfrsDeprModify";
- oParam.inds = "req=ds_main_maindatalist:u";
- oParam.outds = "ds_=line";
- oParam.async = false;
- oParam.callback = "cf_TXRAR02501";
- tranf_submit(oParam);
- }
- }
- }
- function fSetChackValue()
- {
- if (String(ds_main_maindatalist.getColumn(0, "bbaseksckeum")).length==0 )
- {
- sysf_messageBox("전기말누계액" ,"C001");
- ds_main_maindatalist.rowposition = 0;
-
- grd_main.setCellPos(grd_main.getBindCellIndex("body", "bbaseksckeum"));
- grd_main.showEditor(true);
- return false;
- }
-
- if (String(ds_main_maindatalist.getColumn(0, "danggisangak")).length==0 )
- {
- sysf_messageBox("당기상각액" ,"C001");
- ds_main_maindatalist.rowposition = 0;
-
- grd_main.setCellPos(grd_main.getBindCellIndex("body", "danggisangak"));
- grd_main.showEditor(true);
- return false;
- }
- if (String(ds_main_maindatalist.getColumn(0, "baseksckeum")).length==0 )
- {
- sysf_messageBox("감가누계" ,"I004");
- return false;
- }
- if (String(ds_main_maindatalist.getColumn(0, "janjonsak")).length==0 )
- {
- sysf_messageBox("미상각잔액" ,"I004");
- return false;
- }
- return true;
- } ]]></Script>
- </Form>
- </FDL>
|