w_credence_bala_cancel.srw 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. $PBExportHeader$w_credence_bala_cancel.srw
  2. $PBExportComments$反结帐
  3. forward
  4. global type w_credence_bala_cancel from w_publ_base
  5. end type
  6. type dw_1 from datawindow within w_credence_bala_cancel
  7. end type
  8. type cb_1 from uo_imflatbutton within w_credence_bala_cancel
  9. end type
  10. type p_1 from picture within w_credence_bala_cancel
  11. end type
  12. type mle_2 from multilineedit within w_credence_bala_cancel
  13. end type
  14. type gb_2 from groupbox within w_credence_bala_cancel
  15. end type
  16. type cbx_del from checkbox within w_credence_bala_cancel
  17. end type
  18. type gb_1 from groupbox within w_credence_bala_cancel
  19. end type
  20. type mle_1 from multilineedit within w_credence_bala_cancel
  21. end type
  22. end forward
  23. global type w_credence_bala_cancel from w_publ_base
  24. integer width = 2117
  25. integer height = 1396
  26. string title = "反结帐"
  27. boolean minbox = false
  28. long backcolor = 80269524
  29. dw_1 dw_1
  30. cb_1 cb_1
  31. p_1 p_1
  32. mle_2 mle_2
  33. gb_2 gb_2
  34. cbx_del cbx_del
  35. gb_1 gb_1
  36. mle_1 mle_1
  37. end type
  38. global w_credence_bala_cancel w_credence_bala_cancel
  39. type variables
  40. uo_credence uo_credpost
  41. end variables
  42. on w_credence_bala_cancel.create
  43. int iCurrent
  44. call super::create
  45. this.dw_1=create dw_1
  46. this.cb_1=create cb_1
  47. this.p_1=create p_1
  48. this.mle_2=create mle_2
  49. this.gb_2=create gb_2
  50. this.cbx_del=create cbx_del
  51. this.gb_1=create gb_1
  52. this.mle_1=create mle_1
  53. iCurrent=UpperBound(this.Control)
  54. this.Control[iCurrent+1]=this.dw_1
  55. this.Control[iCurrent+2]=this.cb_1
  56. this.Control[iCurrent+3]=this.p_1
  57. this.Control[iCurrent+4]=this.mle_2
  58. this.Control[iCurrent+5]=this.gb_2
  59. this.Control[iCurrent+6]=this.cbx_del
  60. this.Control[iCurrent+7]=this.gb_1
  61. this.Control[iCurrent+8]=this.mle_1
  62. end on
  63. on w_credence_bala_cancel.destroy
  64. call super::destroy
  65. destroy(this.dw_1)
  66. destroy(this.cb_1)
  67. destroy(this.p_1)
  68. destroy(this.mle_2)
  69. destroy(this.gb_2)
  70. destroy(this.cbx_del)
  71. destroy(this.gb_1)
  72. destroy(this.mle_1)
  73. end on
  74. event open;call super::open;dw_1.settransobject(sqlca)
  75. dw_1.retrieve(sys_accsetid)
  76. uo_credpost = create uo_credence
  77. end event
  78. event close;destroy uo_credpost
  79. end event
  80. type cb_func from w_publ_base`cb_func within w_credence_bala_cancel
  81. boolean visible = false
  82. integer x = 210
  83. integer y = 236
  84. boolean enabled = false
  85. end type
  86. type cb_exit from w_publ_base`cb_exit within w_credence_bala_cancel
  87. integer x = 1696
  88. integer y = 1112
  89. string text = "取消"
  90. end type
  91. type dw_1 from datawindow within w_credence_bala_cancel
  92. integer x = 631
  93. integer y = 52
  94. integer width = 1413
  95. integer height = 128
  96. integer taborder = 20
  97. boolean bringtotop = true
  98. string dataobject = "dw_accset_curyearmon"
  99. boolean border = false
  100. boolean livescroll = true
  101. end type
  102. type cb_1 from uo_imflatbutton within w_credence_bala_cancel
  103. integer x = 1275
  104. integer y = 1112
  105. integer width = 311
  106. integer height = 96
  107. integer taborder = 70
  108. boolean bringtotop = true
  109. boolean default = true
  110. string normalpicname = "ok.bmp"
  111. end type
  112. event clicked;String arg_msg
  113. Boolean if_del
  114. Long cnt
  115. IF cbx_del.Checked THEN
  116. if_del = True
  117. ELSE
  118. if_del = False
  119. END IF
  120. cnt = 0
  121. SELECT count(*) INTO :cnt FROM cw_credence
  122. WHERE accsetid = :sys_accsetid
  123. AND relevantbillid = :sys_curyearmon
  124. And Readtype = 201;
  125. IF sqlca.SQLCode = -1 THEN
  126. MessageBox(publ_operator,'查询本月固定资产是否已计提折旧失败,'+sqlca.SQLErrText)
  127. RETURN
  128. END IF
  129. IF cnt > 0 THEN
  130. MessageBox(publ_operator,'本期固定资产已经计提过折旧,不能反结帐,如需要反结帐,请先反计提折旧将固定资产计提折旧凭证删除')
  131. RETURN
  132. END IF
  133. IF uo_credpost.cancel_balance(if_del,arg_msg,True) = 0 THEN
  134. MessageBox(publ_operator,arg_msg)
  135. RETURN
  136. END IF
  137. f_setsysoplog('反结帐','月份:'+String(sys_curyearmon)+',反结帐,操作用户:'+publ_operator+',帐套:'+s_sys_accset.accsetname,arg_msg,True)
  138. MessageBox(publ_operator,"反期末结帐成功")
  139. f_set_accsetmessage()
  140. Close(Parent)
  141. end event
  142. type p_1 from picture within w_credence_bala_cancel
  143. integer x = 37
  144. integer y = 40
  145. integer width = 549
  146. integer height = 836
  147. boolean bringtotop = true
  148. boolean originalsize = true
  149. string picturename = "graphics\balance.bmp"
  150. boolean border = true
  151. borderstyle borderstyle = stylelowered!
  152. boolean focusrectangle = false
  153. end type
  154. type mle_2 from multilineedit within w_credence_bala_cancel
  155. integer x = 617
  156. integer y = 192
  157. integer width = 1417
  158. integer height = 416
  159. integer taborder = 40
  160. integer textsize = -9
  161. integer weight = 400
  162. fontcharset fontcharset = gb2312charset!
  163. fontpitch fontpitch = variable!
  164. string facename = "宋体"
  165. long textcolor = 16711680
  166. long backcolor = 16777215
  167. string text = " 你可以利用~"反结帐~"工具将当前会计期间返回到已结                         帐的期间。                                                                        按~"确定~"按钮开始反结帐。"
  168. boolean displayonly = true
  169. borderstyle borderstyle = stylelowered!
  170. end type
  171. type gb_2 from groupbox within w_credence_bala_cancel
  172. integer x = 37
  173. integer y = 1040
  174. integer width = 2043
  175. integer height = 36
  176. integer taborder = 30
  177. integer textsize = -9
  178. integer weight = 400
  179. fontcharset fontcharset = gb2312charset!
  180. fontpitch fontpitch = variable!
  181. string facename = "宋体"
  182. long textcolor = 33554432
  183. long backcolor = 67108864
  184. end type
  185. type cbx_del from checkbox within w_credence_bala_cancel
  186. integer x = 631
  187. integer y = 916
  188. integer width = 1070
  189. integer height = 76
  190. boolean bringtotop = true
  191. integer textsize = -9
  192. integer weight = 400
  193. fontcharset fontcharset = gb2312charset!
  194. fontpitch fontpitch = variable!
  195. string facename = "宋体"
  196. long textcolor = 255
  197. long backcolor = 67108864
  198. string text = "同时将结转本期损益产生的记帐凭证删除"
  199. end type
  200. type gb_1 from groupbox within w_credence_bala_cancel
  201. integer x = 594
  202. integer y = 16
  203. integer width = 1486
  204. integer height = 1028
  205. integer taborder = 50
  206. integer textsize = -9
  207. integer weight = 400
  208. fontcharset fontcharset = gb2312charset!
  209. fontpitch fontpitch = variable!
  210. string facename = "宋体"
  211. long textcolor = 33554432
  212. long backcolor = 67108864
  213. borderstyle borderstyle = styleraised!
  214. end type
  215. type mle_1 from multilineedit within w_credence_bala_cancel
  216. integer x = 617
  217. integer y = 616
  218. integer width = 1417
  219. integer height = 288
  220. integer taborder = 60
  221. boolean bringtotop = true
  222. integer textsize = -14
  223. integer weight = 700
  224. fontcharset fontcharset = gb2312charset!
  225. fontpitch fontpitch = fixed!
  226. fontfamily fontfamily = modern!
  227. string facename = "楷体_GB2312"
  228. boolean underline = true
  229. long textcolor = 255
  230. long backcolor = 83488739
  231. string text = " 注意:~"反结帐~"前请先~"反计提~"固定资产累计折旧,重新登帐前再重新计提折旧!"
  232. boolean border = false
  233. end type