SMRST06800_입고전표마감작업(약국).xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>입고전표마감작업</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <usernm/>
  12. <userid/>
  13. <instcd/>
  14. <stocdeptcd/>
  15. <stocdeptnm/>
  16. <goodflag/>
  17. <stocym/>
  18. <reqdd/>
  19. </cond>
  20. </main>
  21. <init>
  22. <total>
  23. <amt/>
  24. <suplamt/>
  25. <valaddtax/>
  26. </total>
  27. </init>
  28. <send>
  29. </send>
  30. <hidden>
  31. <temp/>
  32. </hidden>
  33. </root>
  34. </instance>
  35. <script type="javascript" ev:event="xforms-ready">
  36. <![CDATA[
  37. //화면 Control을 초기화한다
  38. fInitialize();
  39. ]]>
  40. </script>
  41. <submission id="TXRST06801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/inslip" resultref="/root/temp"/>
  42. <submission id="TXRST06802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/inslip" resultref="/root/temp"/>
  43. <submission id="TRRST06801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/"/>
  44. <bind id="amt" ref="/root/init/total/amt" calculate="sum(/root/main/list/detailist/amt)" type="xsd:float"/>
  45. <bind id="suplamt" ref="/root/init/total/suplamt" calculate="sum(/root/main/list/detailist/suplamt)" type="xsd:float"/>
  46. <bind id="valaddtax" ref="/root/init/total/valaddtax" calculate="sum(/root/main/list/detailist/valaddtax)" type="xsd:float"/>
  47. </model>
  48. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  50. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  51. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  54. <script type="javascript">
  55. <![CDATA[
  56. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  57. function fInitialize() {
  58. rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
  59. rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  60. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  61. model.setValue(ipt_deptcd.attribute("ref") , getUserInfo("dutplcecd"));
  62. model.setValue(ipt_deptnm.attribute("ref") , getUserInfo("dutplcenm"));
  63. model.setValue("/root/main/cond/userid", getUserInfo("userid"));
  64. model.setValue("/root/main/cond/usernm", getUserInfo("usernm"));
  65. var sDate = getCurrentDate();
  66. var cDate = sDate.substring(0, 6);
  67. model.setValue("/root/main/cond/stocym" , cDate);
  68. model.setValue("/root/main/cond/reqdd" , sDate);
  69. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  70. model.setValue("/root/main/cond/goodflag", "PH");
  71. model.refresh();
  72. }
  73. ]]>
  74. </script>
  75. </xhtml:head>
  76. <xhtml:body guideline="1,1220;2,707;1,448;1,349;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  77. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:950px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
  78. <line id="line7" class="line_1" style="x1:0px; y1:114px; x2:950px; y2:114px; "/>
  79. <group id="grp_tle" style="left:0px; top:0px; width:380; height:13px; ">
  80. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">입고전표마감</caption>
  81. </group>
  82. <button id="btn_gen" class="btn2_letter4" style="left:828px; top:94px; width:64px; height:19px; ">
  83. <caption>전표발행</caption>
  84. <script type="javascript" ev:event="DOMActivate">
  85. <![CDATA[
  86. // model.setValue(ipt_defrayreqdd.attribute("ref"),model.getValue(ipt_slipdd.attribute("ref")));
  87. // if (model.getValue(ipt_defrayreqdd.attribute("ref")) == "") {
  88. // alert("출금요청일을 입력 하십시요!!" );
  89. // return;
  90. // }
  91. //
  92. var query014 = "N";
  93. var iPath = "/root/send/inslip/";
  94. var vdate = new Date();
  95. var HH = vdate.getHours();
  96. var MI = vdate.getMinutes();
  97. var SS = vdate.getSeconds();
  98. var vTime = HH +"" + MI +"" + SS;
  99. var vSlipDate = model.getValue("/root/main/cond/reqdd"); // 기표일자
  100. var stocym = model.getValue("/root/main/cond/stocym");
  101. var fromdd = stocym + "01";
  102. var todd = stocym + "31";
  103. var vBizpk = getUserInfo("dutplceinstcd") +"_" // 기관
  104. + vSlipDate +"_" // 기표일자
  105. + getCurrentDate()+ vTime +'_I_DRG'; // 작업일시
  106. var vSlipCmt = vSlipDate.substr(0,4) + "."
  107. + vSlipDate.substr(4,2) + "."
  108. + vSlipDate.substr(6,2) + " 월분 약품 구입대금지급"; // 대표적요
  109. if (getUserInfo("dutplceinstcd") =="014") {
  110. query014 = "Y";
  111. }
  112. model.makeValue(iPath + "instcd" , getUserInfo("dutplceinstcd") ); // 기관코드
  113. model.makeValue(iPath + "genrdd" , vSlipDate ); // 생성일자
  114. model.makeValue(iPath + "stocym" , stocym ); // 생성일자
  115. model.makeValue(iPath + "slipflag" , "6" ); // 전표구분 (1:일반전표, 2:입원수익전표 3:외래수익전표 4:건진수익전표 5:급여전표 6:물류입고전표 7:물류출고전표 8:감가상각전표)
  116. model.makeValue(iPath + "bizpk" , vBizpk ); // 업무별 Primary Key
  117. model.makeValue(iPath + "slipdeptcd" , getUserInfo("dutplcecd") ); // 구매부서
  118. model.makeValue(iPath + "unslwrit" , getUserInfo("userid" ) ); // 전표작성자
  119. model.makeValue(iPath + "defrayreqdd" , vSlipDate ); // 출금요청일
  120. model.makeValue(iPath + "slipcmt" , vSlipCmt ); // 전표대표적요
  121. model.makeValue(iPath + "usedd" , vSlipDate.substr(0,6)+"01" ); // 사용일자
  122. model.makeValue(iPath + "endmonth" , vSlipDate.substr(0,6) ); // 작업년월
  123. model.makeValue(iPath + "fromdd" , fromdd ); // 입고일자 FROM
  124. model.makeValue(iPath + "todd" , todd ); // 입고일자 TO
  125. model.makeValue(iPath + "frslipdd" , fromdd ); // 기표일자 FROM
  126. model.makeValue(iPath + "toslipdd" , todd ); // 기입고일자 TO
  127. model.makeValue(iPath + "frcalcdocudd" , fromdd ); // 계산서일자 FR
  128. model.makeValue(iPath + "tocalcdocudd" , todd ); // 계산서일자 TO
  129. model.makeValue(iPath + "frcalccnfmdd" , fromdd ); // 정산확정일자 FR
  130. model.makeValue(iPath + "tocalccnfmdd" , todd ); // 정산확정일자 TO
  131. model.makeValue(iPath + "slipinclusion" , "" ); // 기표대상 포함여부
  132. model.makeValue(iPath + "query014" , query014 );
  133. if (submit("TXRST06801") == true) {
  134. var slipno = model.getValue("/root/temp/insliplist/slipno");
  135. if (!isNull(slipno)) {
  136. messageBox("전표번호는 " + slipno + "입니다.", "I");
  137. }
  138. }
  139. ]]>
  140. </script>
  141. </button>
  142. <caption id="caption61" class="tit_2" style="left:4px; top:99px; width:123px; height:13px; ">전표 분개 리스트</caption>
  143. <input id="ipt_stocym" ref="/root/main/cond/stocym" class="input_default" inputtype="date" format="yyyy-mm" style="left:765px; top:25px; width:90px; height:19px; "/>
  144. <input id="input2" ref="/root/main/cond/reqdd" class="input_default" inputtype="date" format="yyyy-mm-dd" style="left:765px; top:50px; width:90px; height:19px; "/>
  145. <button id="button29" class="icon_search" style="left:195px; top:54px; width:16px; height:16px; ">
  146. <caption/>
  147. <script type="javascript" ev:event="DOMActivate">
  148. <![CDATA[
  149. var recv_list = "stocdeptcd,stocdeptnm";
  150. misfOpenPopUpList("02", ipt_deptcd,"", recv_list) ;
  151. model.refresh();
  152. ]]>
  153. </script>
  154. </button>
  155. <select1 id="cmb_instcd" ref="/root/main/cond/instcd" class="combo_essential" appearance="minimal" style="left:111px; top:25px; width:213px; height:19px; ">
  156. <choices>
  157. <itemset nodeset="/root/init/instcd">
  158. <label ref="cdnm"/>
  159. <value ref="cdid"/>
  160. </itemset>
  161. </choices>
  162. </select1>
  163. <select1 id="cmb_goodflag" ref="/root/main/cond/goodflag" class="combo_essential" appearance="minimal" style="left:485px; top:25px; width:140px; height:19px; ">
  164. <choices>
  165. <itemset nodeset="/root/init/goodflag">
  166. <label ref="cdnm"/>
  167. <value ref="cdid"/>
  168. </itemset>
  169. </choices>
  170. </select1>
  171. <input id="ipt_deptnm" ref="/root/main/cond/stocdeptnm" class="input_default" appearance="input" style="left:214px; top:49px; width:162px; height:19px; ">
  172. <script type="javascript" ev:event="xforms-value-changed">
  173. <![CDATA[
  174. if(ipt_deptnm.value.length == 0)
  175. ipt_deptcd.value = "";
  176. else
  177. misfValidationCheck("02", "", "stocdeptcd,stocdeptnm" );
  178. model.refresh();
  179. ]]>
  180. </script>
  181. </input>
  182. <input id="ipt_deptcd" ref="/root/main/cond/stocdeptcd" class="input_default" appearance="input" style="left:111px; top:49px; width:79px; height:19px; ">
  183. <script type="javascript" ev:event="xforms-value-changed">
  184. <![CDATA[
  185. if(ipt_deptcd.value.length == 0)
  186. ipt_deptnm.value = "";
  187. else
  188. misfValidationCheck("02", "", "stocdeptcd,stocdeptnm" );
  189. model.refresh();
  190. ]]>
  191. </script>
  192. </input>
  193. <caption id="caption5" class="search_name" style="left:15px; top:25px; width:76px; height:17px; ">기관코드</caption>
  194. <caption id="caption7" class="search_name" style="left:405px; top:25px; width:76px; height:17px; ">물품구분</caption>
  195. <caption id="caption9" class="search_name" style="left:15px; top:49px; width:76px; height:17px; ">작업부서</caption>
  196. <caption id="caption10" class="search_name" style="left:405px; top:50px; width:76px; height:17px; ">작업자</caption>
  197. <caption id="caption1" class="search_name" style="left:680px; top:25px; width:76px; height:17px; ">마감년월</caption>
  198. <caption id="caption2" class="search_name" style="left:680px; top:50px; width:76px; height:17px; ">기표일자</caption>
  199. <datagrid id="grd_autosliplist" nodeset="/root/main/list/detailist" caption="기관코드^주거래처^입고일^합계금액^공급가액^부가가치세^증빙적요^매입매출구분^과세구분" colsep="^" colwidth="0, 127, 100, 100, 100, 100, 237, 81, 72" explorerbar="move" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:0px; top:120px; width:950px; height:588px; ">
  200. <col ref="instcd" visibility="hidden"/>
  201. <col ref="rlanm" style="text-align:left; "/>
  202. <col ref="notefactspec1" format="yyyy-mm-dd" style="text-align:left; "/>
  203. <col ref="amt" format="(-)#,###" style="text-align:right; "/>
  204. <col ref="suplamt" format="(-)#,###" style="text-align:right; "/>
  205. <col ref="valaddtax" format="(-)#,###" style="text-align:right; "/>
  206. <col ref="mainrec" style="text-align:left; "/>
  207. <col disabled="true" ref="taxbillflag" type="combo" style="text-align:center; ">
  208. <choices>
  209. <item>
  210. <label>매입</label>
  211. <value>1</value>
  212. </item>
  213. <item>
  214. <label>매출</label>
  215. <value>2</value>
  216. </item>
  217. </choices>
  218. </col>
  219. <col disabled="true" ref="taxkind" type="combo" style="text-align:center; ">
  220. <choices>
  221. <item>
  222. <label>과세</label>
  223. <value>01</value>
  224. </item>
  225. <item>
  226. <label>영세율</label>
  227. <value>02</value>
  228. </item>
  229. <item>
  230. <label>대손세액가감</label>
  231. <value>03</value>
  232. </item>
  233. <item>
  234. <label>비과세</label>
  235. <value>04</value>
  236. </item>
  237. </choices>
  238. </col>
  239. </datagrid>
  240. <button id="btn_req" class="btn1_letter2" style="left:886px; top:35px; width:56px; height:22px; ">
  241. <caption>조회</caption>
  242. <script type="javascript" ev:event="DOMActivate">
  243. <![CDATA[
  244. model.removeNodeset("/root/main/list/detailist");
  245. submit("TRRST06801");
  246. ]]>
  247. </script>
  248. </button>
  249. <line id="line3" style="x1:875px; y1:25px; x2:875px; y2:69px; border-color:#ffe4bb; border-left-style:solid; "/>
  250. <button id="button1" class="btn2_letter6" style="left:739px; top:94px; width:86px; height:19px; ">
  251. <caption>발행내역삭제</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. // model.setValue(ipt_defrayreqdd.attribute("ref"),model.getValue(ipt_slipdd.attribute("ref")));
  255. // if (model.getValue(ipt_defrayreqdd.attribute("ref")) == "") {
  256. // alert("출금요청일을 입력 하십시요!!" );
  257. // return;
  258. // }
  259. //
  260. var query014 = "N";
  261. var iPath = "/root/send/inslip/";
  262. var vdate = new Date();
  263. var HH = vdate.getHours();
  264. var MI = vdate.getMinutes();
  265. var SS = vdate.getSeconds();
  266. var vTime = HH +"" + MI +"" + SS;
  267. var vSlipDate = model.getValue("/root/main/cond/reqdd"); // 기표일자
  268. var stocym = model.getValue("/root/main/cond/stocym");
  269. var fromdd = stocym + "01";
  270. var todd = stocym + "31";
  271. var vBizpk = getUserInfo("dutplceinstcd") +"_" // 기관
  272. + vSlipDate +"_" // 기표일자
  273. + getCurrentDate()+ vTime +'_I_DRG'; // 작업일시
  274. var vSlipCmt = vSlipDate.substr(0,4) + "."
  275. + vSlipDate.substr(4,2) + "."
  276. + vSlipDate.substr(6,2) + " 월분 약품 구입대금지급"; // 대표적요
  277. if (getUserInfo("dutplceinstcd") =="014") {
  278. query014 = "Y";
  279. }
  280. model.makeValue(iPath + "instcd" , getUserInfo("dutplceinstcd") ); // 기관코드
  281. model.makeValue(iPath + "genrdd" , vSlipDate ); // 생성일자
  282. model.makeValue(iPath + "stocym" , stocym ); // 생성일자
  283. model.makeValue(iPath + "slipflag" , "6" ); // 전표구분 (1:일반전표, 2:입원수익전표 3:외래수익전표 4:건진수익전표 5:급여전표 6:물류입고전표 7:물류출고전표 8:감가상각전표)
  284. model.makeValue(iPath + "bizpk" , vBizpk ); // 업무별 Primary Key
  285. model.makeValue(iPath + "slipdeptcd" , getUserInfo("dutplcecd") ); // 구매부서
  286. model.makeValue(iPath + "unslwrit" , getUserInfo("userid" ) ); // 전표작성자
  287. model.makeValue(iPath + "defrayreqdd" , vSlipDate ); // 출금요청일
  288. model.makeValue(iPath + "slipcmt" , vSlipCmt ); // 전표대표적요
  289. model.makeValue(iPath + "usedd" , vSlipDate.substr(0,6)+"01" ); // 사용일자
  290. model.makeValue(iPath + "endmonth" , vSlipDate.substr(0,6) ); // 작업년월
  291. model.makeValue(iPath + "fromdd" , fromdd ); // 입고일자 FROM
  292. model.makeValue(iPath + "todd" , todd ); // 입고일자 TO
  293. model.makeValue(iPath + "frslipdd" , fromdd ); // 기표일자 FROM
  294. model.makeValue(iPath + "toslipdd" , todd ); // 기입고일자 TO
  295. model.makeValue(iPath + "frcalcdocudd" , fromdd ); // 계산서일자 FR
  296. model.makeValue(iPath + "tocalcdocudd" , todd ); // 계산서일자 TO
  297. model.makeValue(iPath + "frcalccnfmdd" , fromdd ); // 정산확정일자 FR
  298. model.makeValue(iPath + "tocalccnfmdd" , todd ); // 정산확정일자 TO
  299. model.makeValue(iPath + "slipinclusion" , "" ); // 기표대상 포함여부
  300. model.makeValue(iPath + "query014" , query014 );
  301. if (submit("TXRST06802") == true) {
  302. messageBox(stocym + "전표발행내역이 삭제되었습니다.", "I");
  303. }
  304. ]]>
  305. </script>
  306. </button>
  307. <input id="input3" ref="/root/main/cond/userid" disabled="true" style="left:485px; top:50px; width:65px; height:19px; "/>
  308. <input id="input4" ref="/root/main/cond/usernm" disabled="true" style="left:555px; top:50px; width:70px; height:19px; "/>
  309. <button id="btn_excel" class="btn5_letter3" style="left:895px; top:94px; width:53px; height:19px; ">
  310. <caption>Excel</caption>
  311. <script type="javascript" ev:event="DOMActivate">
  312. <![CDATA[
  313. misfSaveExcel(grd_autosliplist);
  314. ]]>
  315. </script>
  316. </button>
  317. <output id="opt_amt" ref="/root/init/total/amt" class="output_fix" format="#,###" style="left:234px; top:90px; width:105px; height:19px; font-weight:bold; text-align:right; "/>
  318. <output id="opt_suplamt" ref="/root/init/total/suplamt" class="output_fix" format="#,###" style="left:405px; top:90px; width:90px; height:19px; font-weight:bold; text-align:right; "/>
  319. <output id="opt_valaddtax" ref="/root/init/total/valaddtax" class="output_fix" format="#,###" style="left:555px; top:90px; width:90px; height:19px; font-weight:bold; text-align:right; "/>
  320. <caption id="caption16" style="left:170px; top:93px; width:64px; height:15px; text-align:right; ">총금액:</caption>
  321. <caption id="caption3" style="left:344px; top:93px; width:54px; height:15px; text-align:right; ">공급가:</caption>
  322. <caption id="caption4" style="left:505px; top:93px; width:49px; height:15px; text-align:right; ">부가세:</caption>
  323. </xhtml:body>
  324. </xhtml:html>