close(this)
return
end if
select min(ykjqj) into :i_ykjqj from zz_kmyeb where zth=:g_zth and nkjqj=:i_nkjqj;
select ztmc into :r_ztmc from zz_ztxxb where zth=:g_zth;
st_zth.text='账套号【'+g_zth +' 】 账套名称
论文范文http://www.chuibin.com/ 【'+r_ztmc+'】'
st_qj.text=' 会计年度【'+i_nkjqj+' 】 月会计期间【'+i_ykjqj+'】'
this.title="科目余额初始完毕确定"
cb_qd:
Clicked! integer Net
decimal r_jfye,r_dfye
string r_ztmc
select ztmc into :r_ztmc from zz_ztxxb where zth=:g_zth;
Net=messagebox('提示','是否真要对账套【'+g_zth+' 】 账套名称【'+r_ztmc+'】进行科目余额初始完毕确定?',exclamation!,yesno!,2)
if Net=2 then return
//试算平衡检验
select sum(qcjfye), sum(qcdfye) into :r_jfye,:r_dfye
from zz_kmyeb,zz_kjkmbmb
where zz_kmyeb.zth=zz_kjkmbmb.zth and zz_kmyeb.km_code=zz_kjkmbmb.km_code
and zz_kmyeb.zth=:g_zth and zz_kmyeb.nkjqj=:i_nkjqj and zz_kmyeb.ykjqj=:i_ykjqj
and mjbj_code='Y' ;
if r_jfye <> r_dfye then
messagebox('提示','期初借方余额【'+string(r_jfye)+'】,贷方余额【'+string(r_dfye)+'】,借贷不平,不能进行科目余额初始完毕确定!')
return
end if
//将账套信息表中的状态从初始化更新为正常
update zz_ztxxb set zt='正常' where zth=:g_zth and zt='初始化' ;
//在结账标记表中本账套插入的年会计期间与第一个月会计期间,且默认结账标记为N
insert into zz_jzb (zth,nkjqj,ykjqj,jzrq,jzbj) values (:g_zth,:i_nkjqj,:i_ykjqj,'','N');
//在明细账表表中插入初始数据
insert into zz_mxzb (zth,nkjqj,ykjqj,km_code,xh,rq,pzlx_code,pzh,zy,jfje,dfje,yefx_code,ye)
select zz_kmyeb.zth,zz_kmyeb.nkjqj,zz_kmyeb.ykjqj,zz_kmyeb.km_code,1,:g_rq,'无','0','期初',qcjfye,qcdfye,yefx_code,qcye
from zz_kmyeb,zz_kjkmbmb
where zz_kmyeb.zth=zz_kjkmbmb.zth and zz_kmyeb.km_code=zz_kjkmbmb.km_code
and zz_kmyeb.zth=:g_zth and nkjqj=:i_nkjqj and ykjqj=:i_ykjqj and mjbj_code='Y';
//在总账表中插入初始数据
insert into zz_zzb (zth,nkjqj,ykjqj,km_code,qcye,jffse,dffse,yefx_code,ye)
select zz_kmyeb.zth,zz_kmyeb.nkjqj,zz_kmyeb.ykjqj,zz_kmyeb.km_code,qmye,0,0,yefx_code,qmye
from zz_kmyeb,zz_kjkmbmb
where zz_kmyeb.zth=zz_kjkmbmb.zth and zz_kmyeb.km_code=zz_kjkmbmb.km_code
and zz_kmyeb.zth=:g_zth and nkjqj=:i_nkjqj and ykjqj=:i_ykjqj;
上一页 [1] [2] [3] [4] 下一页
账务处理系统试算平衡检验模块 第3页下载如图片无法显示或论文不完整,请联系qq752018766