123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- $PBExportHeader$w_credence_bala.srw
- $PBExportComments$期末结帐
- forward
- global type w_credence_bala from w_publ_base
- end type
- type dw_1 from datawindow within w_credence_bala
- end type
- type cb_1 from uo_imflatbutton within w_credence_bala
- end type
- type mle_1 from multilineedit within w_credence_bala
- end type
- type p_1 from picture within w_credence_bala
- end type
- type mle_2 from multilineedit within w_credence_bala
- end type
- type gb_2 from groupbox within w_credence_bala
- end type
- type gb_1 from groupbox within w_credence_bala
- end type
- type mle_3 from multilineedit within w_credence_bala
- end type
- type cbx_check_p from checkbox within w_credence_bala
- end type
- type cb_check_p from uo_imflatbutton within w_credence_bala
- end type
- end forward
- global type w_credence_bala from w_publ_base
- integer width = 2117
- integer height = 1688
- string title = "期末结帐"
- boolean minbox = false
- long backcolor = 80269524
- dw_1 dw_1
- cb_1 cb_1
- mle_1 mle_1
- p_1 p_1
- mle_2 mle_2
- gb_2 gb_2
- gb_1 gb_1
- mle_3 mle_3
- cbx_check_p cbx_check_p
- cb_check_p cb_check_p
- end type
- global w_credence_bala w_credence_bala
- type variables
- uo_credence uo_credpost
- end variables
- on w_credence_bala.create
- int iCurrent
- call super::create
- this.dw_1=create dw_1
- this.cb_1=create cb_1
- this.mle_1=create mle_1
- this.p_1=create p_1
- this.mle_2=create mle_2
- this.gb_2=create gb_2
- this.gb_1=create gb_1
- this.mle_3=create mle_3
- this.cbx_check_p=create cbx_check_p
- this.cb_check_p=create cb_check_p
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_1
- this.Control[iCurrent+2]=this.cb_1
- this.Control[iCurrent+3]=this.mle_1
- this.Control[iCurrent+4]=this.p_1
- this.Control[iCurrent+5]=this.mle_2
- this.Control[iCurrent+6]=this.gb_2
- this.Control[iCurrent+7]=this.gb_1
- this.Control[iCurrent+8]=this.mle_3
- this.Control[iCurrent+9]=this.cbx_check_p
- this.Control[iCurrent+10]=this.cb_check_p
- end on
- on w_credence_bala.destroy
- call super::destroy
- destroy(this.dw_1)
- destroy(this.cb_1)
- destroy(this.mle_1)
- destroy(this.p_1)
- destroy(this.mle_2)
- destroy(this.gb_2)
- destroy(this.gb_1)
- destroy(this.mle_3)
- destroy(this.cbx_check_p)
- destroy(this.cb_check_p)
- end on
- event open;call super::open;dw_1.settransobject(sqlca)
- dw_1.retrieve(sys_accsetid)
- uo_credpost = create uo_credence
- end event
- event close;destroy uo_credpost
- end event
- type cb_func from w_publ_base`cb_func within w_credence_bala
- boolean visible = false
- integer x = 283
- integer y = 328
- boolean enabled = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_credence_bala
- integer x = 1696
- integer y = 1404
- string text = "取消"
- end type
- type dw_1 from datawindow within w_credence_bala
- integer x = 631
- integer y = 52
- integer width = 1413
- integer height = 152
- integer taborder = 30
- boolean bringtotop = true
- string dataobject = "dw_accset_curyearmon"
- boolean border = false
- boolean livescroll = true
- end type
- type cb_1 from uo_imflatbutton within w_credence_bala
- integer x = 1275
- integer y = 1404
- integer width = 311
- integer height = 96
- integer taborder = 80
- boolean bringtotop = true
- boolean default = true
- string normalpicname = "ok.bmp"
- end type
- event clicked;String arg_msg
- Long cnt
- datetime ldt_startdate
- ldt_startdate = f_rst_mon_1st(1,sys_curyearmon)
- cnt = 0
- SELECT count(*) INTO :cnt FROM cw_credence
- WHERE accsetid = :sys_accsetid
- AND relevantbillid = :sys_curyearmon
- And Readtype = 201;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox(publ_operator,'查询本月固定资产是否已计提折旧失败,'+sqlca.SQLErrText)
- RETURN
- END IF
- IF cnt = 0 THEN
- cnt = 0
- SELECT count(*) INTO :cnt
- FROM cw_assetcard,cw_astbalance
- WHERE ( cw_assetcard.accsetid = cw_astbalance.accsetid) AND
- ( cw_assetcard.assetcardid = cw_astbalance.assetcardid) AND
- ( cw_astbalance.yearmon = :sys_curyearmon ) AND
- ( cw_astbalance.accsetid = :sys_accsetid ) AND
- ( cw_assetcard.clearflag = 0 ) AND
- ( cw_assetcard.deprediateid > 0 ) AND
- ( cw_assetcard.startdate < :ldt_startdate ) and
- ( cw_astbalance.totalwl <= cw_assetcard.workload + cw_assetcard.usedall );
- IF sqlca.SQLCode <> 0 THEN
- MessageBox(publ_operator,'查询本月固定资产是否未计提折旧失败,'+sqlca.SQLErrText)
- RETURN
- END IF
-
- IF cnt > 0 THEN
- MessageBox(publ_operator,'本期固定资产未计提折旧,不能结帐,如需要结帐,请先计提固定资产折旧')
- RETURN
- END IF
- END IF
- IF cbx_check_p.Checked THEN
- cb_check_p.TriggerEvent(Clicked!)
- END IF
- IF uo_credpost.balance(False,arg_msg,True) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- END IF
- f_setsysoplog('结帐','结帐,用户:'+publ_operator+',帐套:'+s_sys_accset.accsetname,arg_msg,True)
- arg_msg = '会计期间:'+String(sys_curyearmon)+'期末结帐成功'
- MessageBox(publ_operator,arg_msg)
- f_set_accsetmessage()
- Close(Parent)
- end event
- type mle_1 from multilineedit within w_credence_bala
- integer x = 617
- integer y = 620
- integer width = 1417
- integer height = 172
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 80269524
- string text = " 在结帐之前,应先检查本期发生的各种经济业务是否都已经编制记帐凭证并登记入帐。对各种成本费用类帐户,也应当在结帐之前对余额进行结转,并登记入帐。"
- boolean border = false
- boolean displayonly = true
- end type
- type p_1 from picture within w_credence_bala
- integer x = 37
- integer y = 40
- integer width = 549
- integer height = 836
- boolean bringtotop = true
- boolean originalsize = true
- string picturename = "graphics\balance.bmp"
- boolean border = true
- borderstyle borderstyle = stylelowered!
- boolean focusrectangle = false
- end type
- type mle_2 from multilineedit within w_credence_bala
- integer x = 617
- integer y = 264
- integer width = 1417
- integer height = 272
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 16777215
- string text = " 为了总结某一会计期间(年度或月度)的经营活动情况,必须定期进行结帐,结帐就是把一定时期内发生的经济业务在全部登记入帐的基础上,将各种帐簿记录结出~"本期发生额~"和~"期末余额~",从而根据帐簿记录编制会计报表。"
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type gb_2 from groupbox within w_credence_bala
- integer x = 37
- integer y = 1332
- integer width = 2043
- integer height = 36
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- end type
- type gb_1 from groupbox within w_credence_bala
- integer x = 594
- integer y = 16
- integer width = 1486
- integer height = 1160
- integer taborder = 70
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- borderstyle borderstyle = styleraised!
- end type
- type mle_3 from multilineedit within w_credence_bala
- integer x = 617
- integer y = 880
- integer width = 1417
- integer height = 288
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -14
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = fixed!
- fontfamily fontfamily = modern!
- string facename = "楷体_GB2312"
- boolean underline = true
- long textcolor = 255
- long backcolor = 83488739
- string text = " 注意:如果当前期间为~"反结帐~"期间,请先~"反计提~"固定资产累计折旧,重新登帐前再重新计提折旧!"
- boolean border = false
- end type
- type cbx_check_p from checkbox within w_credence_bala
- integer x = 663
- integer y = 1216
- integer width = 576
- integer height = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "结帐前检查试算平衡"
- boolean checked = true
- end type
- type cb_check_p from uo_imflatbutton within w_credence_bala
- integer x = 782
- integer y = 1404
- integer width = 384
- integer height = 96
- integer taborder = 20
- boolean bringtotop = true
- string text = "检查试算平衡"
- end type
- event clicked;datastore ds_check_p
- Long ll_grade_len
- ll_grade_len = f_rst_grade_len(1)
- ds_check_p = CREATE datastore
- ds_check_p.DataObject = 'dw_rp_balance'
- ds_check_p.SetTransObject(sqlca)
- datawindowchild childdw_subid
- ds_check_p.GetChild("subid",childdw_subid)
- childdw_subid.SetTransObject (sqlca)
- ddd_subid_display.ShareData(childdw_subid)
- IF ds_check_p.Retrieve(sys_accsetid,0,sys_curyearmon,ll_grade_len,1) > 0 THEN
- IF String(ds_check_p.Object.debit_sum[1],'#####,###.00') <> String(ds_check_p.Object.credit_sum[1],'#####,###.00') THEN
- MessageBox('提示','试算不平衡')
- RETURN
- END IF
- END IF
- end event
|