SPRAD00700_증빙서유형관리.xfdl 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPRAD00700" position="absolute 0 0 556 236" titletext="품의사용내역" oninit="SPRAD00700_oninit" onload="SPRAD00700_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="증빙서유형" class="tit_1" position="absolute 0 0 190 23"/>
  8. <Calendar id="ipt_unsldd" taborder="1" class="input_s_essential" position="absolute 111 32 231 51"/>
  9. <Static id="caption5" text="거래발생일 :" class="search_name" position="absolute 6 32 106 49"/>
  10. <Button id="button2" taborder="2" class="icon_search" position="absolute 210 62 226 78" onclick="button2_onclick"/>
  11. <Edit id="ipt_custcd" taborder="3" class="input_essential" position="absolute 111 62 206 81"/>
  12. <Static id="caption13" text="거 래 처 :" class="search_name" position="absolute 6 62 92 79"/>
  13. <Edit id="input3" taborder="4" class="input_essential" enable="false" position="absolute 230 62 414 81"/>
  14. <MaskEdit id="input10" taborder="5" mask="(-)#,###" enable="false" position="absolute 111 92 231 111"/>
  15. <Static id="caption18" text="금 액 :" class="search_name" position="absolute 6 92 107 109"/>
  16. <MaskEdit id="input1" taborder="6" mask="(-)#,###" position="absolute 111 122 231 141"/>
  17. <Static id="caption1" text="공급가액 :" class="search_name" position="absolute 6 122 107 139"/>
  18. <Static id="caption2" text="세 액 :" class="search_name" position="absolute 6 152 107 169"/>
  19. <MaskEdit id="input2" taborder="7" mask="(-)#,###" position="absolute 111 152 231 171"/>
  20. <Static id="caption3" text="확인번호 :" class="search_name" position="absolute 246 32 347 49"/>
  21. <MaskEdit id="input4" taborder="8" mask="(-)#,###" enable="false" position="absolute 341 32 461 51"/>
  22. <Button id="button1" taborder="10" text="저장" class="btn4" position="absolute 435 204 491 226" onclick="button1_onclick"/>
  23. <Button id="btn_close" taborder="11" text="닫기" class="btn4" position="absolute 495 204 551 226" onclick="btn_close_onclick"/>
  24. <MaskEdit id="input5" taborder="12" mask="(-)#,###" position="absolute 111 122 231 141"/>
  25. </Layout>
  26. </Layouts>
  27. <Objects>
  28. <Dataset id="ds_main_list_pumlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_list_pumlist_oncolumnchanged">
  29. <ColumnInfo>
  30. <Column id="kyymd" type="STRING" size="256" sumtext="신청일자"/>
  31. <Column id="custcode" type="STRING" size="256" sumtext="거래처코드"/>
  32. <Column id="custname" type="STRING" size="256" sumtext="거래처명"/>
  33. <Column id="pumamt" type="STRING" size="256" sumtext="품의금액"/>
  34. <Column id="amt1" type="STRING" size="256" sumtext="공급가액1"/>
  35. <Column id="amt2" type="STRING" size="256" sumtext="공급가액2"/>
  36. <Column id="seamt3" type="STRING" size="256" sumtext="세액"/>
  37. <Column id="noseq" type="STRING" size="256" sumtext="번호"/>
  38. <Column id="naeyong" type="STRING" size="256" sumtext="내용"/>
  39. <Column id="pumno2" type="STRING" size="256" sumtext="내용"/>
  40. <Column id="taxlist" type="STRING" size="256" sumtext="세금구분"/>
  41. <Column id="status" type="STRING" size="256" sumtext="모드"/>
  42. <Column id="sekeumdate" type="STRING" size="256" sumtext="거래일자"/>
  43. <Column id="no" type="STRING" size="256" sumtext="모드"/>
  44. <Column id="acctseid" type="STRING" size="256" sumtext="계정코드"/>
  45. <Column id="dateflag" type="STRING" size="256"/>
  46. </ColumnInfo>
  47. </Dataset>
  48. <Dataset id="ds_pop3data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  49. </Objects>
  50. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  51. * System Name :
  52. * Job Name :
  53. * Creator :
  54. * Make Date : 2017-06-19
  55. * Description :
  56. *---------------------------------------------------------------------------------------
  57. * Modify Date Modifier Modify Description
  58. *---------------------------------------------------------------------------------------
  59. * 2017-06-19 Live Converter TF->XP
  60. *
  61. *---------------------------------------------------------------------------------------
  62. ****************************************************************************************/
  63. include "com_commonxp::comm_main.xjs";
  64. include "mis_miscommonxp::MIS.xjs";
  65. function SPRAD00700_oninit(obj:Form, e:InitEventInfo)
  66. {
  67. frmf_initForm(obj);
  68. }
  69. function SPRAD00700_onload(obj:Form, e:LoadEventInfo)
  70. {
  71. try
  72. {
  73. ds_pop3data.copyData(arg_ds_pop3data);
  74. }
  75. catch(e)
  76. {
  77. }
  78. fInitialize();
  79. }
  80. function fInitialize()
  81. {
  82. if(ds_pop3data.getColumn(0, "taxlist") == "1")
  83. {
  84. input5.visible = false;
  85. input1.visible = true;
  86. input2.visible = true;
  87. caption2.visible = true;
  88. }
  89. else
  90. {
  91. input5.visible = true;
  92. input1.visible = false;
  93. input2.visible = false;
  94. caption2.visible = false;
  95. }
  96. var pumamt = ds_pop3data.getColumn(0, "pumamt");
  97. var amt1 = 0;
  98. var amt2 = 0;
  99. var seamt3 = 0;
  100. var oParam = {};
  101. oParam.id = "TRRAD01515";
  102. oParam.service = "slipapp.AccBook";
  103. oParam.method = "reqGetPopup3List";
  104. oParam.inds = "req=ds_pop3data";
  105. oParam.outds = "ds_main_list_pumlist=pumlist";
  106. oParam.async = false;
  107. //oParam.callback = "cf_TRRAD01515";
  108. tranf_submit(oParam);
  109. if(utlf_isNull(ds_main_list_pumlist.getColumn(0, "noseq")))
  110. {
  111. ds_main_list_pumlist.setColumn(0, "kyymd", ds_pop3data.getColumn(0, "kyymd"));
  112. ds_main_list_pumlist.setColumn(0, "custcode", ds_pop3data.getColumn(0, "custcode"));
  113. ds_main_list_pumlist.setColumn(0, "custname", ds_pop3data.getColumn(0, "custname"));
  114. ds_main_list_pumlist.setColumn(0, "pumamt", ds_pop3data.getColumn(0, "pumamt"));
  115. ds_main_list_pumlist.setColumn(0, "naeyong", ds_pop3data.getColumn(0, "naeyong"));
  116. ds_main_list_pumlist.setColumn(0, "pumno2", String(ds_pop3data.getColumn(0, "pumno")).substr(8,4));
  117. ds_main_list_pumlist.setColumn(0, "taxlist", ds_pop3data.getColumn(0, "taxlist"));
  118. ds_main_list_pumlist.setColumn(0, "sekeumdate", ds_pop3data.getColumn(0, "sekeumdate"));
  119. ds_main_list_pumlist.setColumn(0, "no", "");
  120. ds_main_list_pumlist.setColumn(0, "status", "i");
  121. ds_main_list_pumlist.setColumn(0, "acctseid", "");
  122. if(ds_pop3data.getColumn(0, "taxlist") == "1")
  123. {
  124. amt1 = Math.round(parseFloat(pumamt) / 11.0 * 10);
  125. seamt3 = parseFloat(pumamt) - parseFloat(amt1);
  126. dsf_makeValue(ds_main_list_pumlist, "amt1", "string", amt1, 0);
  127. dsf_makeValue(ds_main_list_pumlist, "amt2", "string", "0", 0);
  128. dsf_makeValue(ds_main_list_pumlist, "seamt3", "string", seamt3, 0);
  129. var dateflag = String(ds_pop3data.getColumn(0, "sekeumdate"))substr(4,2);
  130. if(dateflag >= "01" && dateflag<= "03")
  131. {
  132. dsf_makeValue(ds_main_list_pumlist, "dateflag", "string", "1", 0);
  133. }
  134. else if(dateflag >= "04" && dateflag<= "06")
  135. {
  136. dsf_makeValue(ds_main_list_pumlist, "dateflag", "string", "2", 0);
  137. }
  138. else if(dateflag >= "07" && dateflag<= "09")
  139. {
  140. dsf_makeValue(ds_main_list_pumlist, "dateflag", "string", "3", 0);
  141. }
  142. else if(dateflag >= "10" && dateflag<= "12")
  143. {
  144. dsf_makeValue(ds_main_list_pumlist, "dateflag", "string", "4", 0);
  145. }
  146. }
  147. else
  148. {
  149. dsf_makeValue(ds_main_list_pumlist, "amt1", "string", "0", 0);
  150. dsf_makeValue(ds_main_list_pumlist, "amt2", "string", ds_pop3data.getColumn(0, "pumamt"), 0);
  151. dsf_makeValue(ds_main_list_pumlist, "seamt3", "string", "0", 0);
  152. }
  153. }
  154. }
  155. function button2_onclick(obj:Button, e:ClickEventInfo)
  156. {
  157. fOpenPopupHelp("56", ds_main_list_pumlist, "custcode,custname", "", "");
  158. }
  159. function fOpenPopupHelp(pHelper, pControl, pInstance, pCdgrupid, pValueControl, pNodeName)
  160. {
  161. misfOpenPopUpList(pHelper, pControl, pCdgrupid, pInstance, pValueControl, pNodeName);
  162. }
  163. function ds_main_list_pumlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  164. {
  165. if(e.columnid == "amt2")
  166. {
  167. if(ds_pop3data.getColumn(0, "taxlist") != "1")
  168. {
  169. input10.value = parseInt(input1.value) + parseInt(input5.value);
  170. }
  171. }
  172. if(e.columnid == "amt1")
  173. {
  174. if(ds_pop3data.getColumn(0, "taxlist") != "1")
  175. input10.value = parseInt(input1.value) + parseInt(input2.value);
  176. }
  177. }
  178. if(e.columnid == "seamt3")
  179. {
  180. if(ds_pop3data.getColumn(0, "taxlist") != "1")
  181. {
  182. input10.value = parseInt(input1.value) + parseInt(input2.value);
  183. }
  184. }
  185. }
  186. function button1_onclick(obj:Button, e:ClickEventInfo)
  187. {
  188. fSaveDate();
  189. }
  190. function fSaveDate()
  191. {
  192. var custcode = ds_main_list_pumlist.getColumn(0, "custcode");
  193. ds_main_list_pumlist.setColumn(0, "acctseid", ds_pop3data.getColumn(0, "acctseid"));
  194. if( custcode == "9000")
  195. {
  196. sysf_messageBox("거래처 정보를 다시 입력해 주십시오.( [ 9000 / 기타 ]는 입력불가능 )", "E000", "");
  197. return;
  198. }
  199. var oParam = {};
  200. oParam.id = "TXRAD01503";
  201. oParam.service = "slipapp.AccBook";
  202. oParam.method = "reqExePopup3List";
  203. oParam.inds = "req=ds_main_list_pumlist";
  204. oParam.outds = "ds_=item";
  205. oParam.async = false;
  206. oParam.callback = "cf_TXRAD01503";
  207. tranf_submit(oParam);
  208. }
  209. function cf_TXRAD01503(sSvcId, nErrorCode, sErrorMsg)
  210. {
  211. if(nErrorCode < 0)
  212. {
  213. return;
  214. }
  215. else
  216. {
  217. if(ds_main_list_pumlist.getColumn(0, "status") == "i")
  218. {
  219. sysf_messageBox("저장되었습니다.", "I000");
  220. }
  221. else if(ds_main_list_pumlist.getColumn(0, "status") == "u")
  222. {
  223. sysf_messageBox("수정되었습니다.", "I000");
  224. }
  225. var oParam = {};
  226. oParam.id = "TRRAD01515";
  227. oParam.service = "slipapp.AccBook";
  228. oParam.method = "reqGetPopup3List";
  229. oParam.inds = "req=ds_pop3data";
  230. oParam.outds = "ds_main_list_pumlist=pumlist";
  231. oParam.async = false;
  232. //oParam.callback = "cf_TRRAD01515";
  233. tranf_submit(oParam);
  234. }
  235. }
  236. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  237. {
  238. this.close();
  239. }
  240. ]]></Script>
  241. </Form>
  242. </FDL>