KIS专业版结束初始化时提示:当前科目余额表试算不平衡,不能结束总账余额初始化工作

【问题描述】

专业版科目初始数据录入,点击试算平衡提示平衡;结束初始化时提示:当前科目余额表试算不平衡,不能结束总账余额初始化工作;

【原因分析】

在无外币的情况下,部分科目的原币数据反写规则偶发性异常,与其本位币不一致,导致试算平衡表无差额,结束初始化提示试算不平衡;

【解决方案】

可参考以下脚本执行处理:

update t_Balance set  FBeginBalance=FBeginBalanceFor,FEndBalance=FEndBalanceFor,FDebit=FDebitFor,FCredit=FCreditFor,FYtdCredit=FYtdCreditFor,FYtdDebit=FYtdDebitForwhere FCurrencyID=1go

declare   @FAccountID int  declare   @FPeriod int          declare   @FBeginBalanceFor moneydeclare   @FBeginBalance moneydeclare   @FDebit moneydeclare   @FDebitFor moneydeclare   @FCredit moneydeclare   @FCreditFor moneydeclare   @FYtdDebit moneydeclare   @FYtdDebitFor moneydeclare   @FYtdCredit moneydeclare   @FYtdCreditFor moneydeclare   @FEndBalance moneydeclare   @FEndBalanceFor moneydeclare   @FDetailID int  fetch next from kmyeb into @FAccountID,@FPeriod,@FBeginBalance,@FBeginBalanceFor,@FDebit,@FDebitFor,@FCredit,@FCreditFor,@FYtdDebit,@FYtdDebitFor,@FYtdCredit,@FYtdCreditFor,@FEndBalance,@FEndBalanceFor,@FDetailIDwhile @@FETCH_STATUS=0beginupdate t_balance set FBeginBalance=@FBeginBalance,FBeginBalanceFor=@FBeginBalanceFor,FDebit=@FDebit,FDebitFor=@FDebitFor,FCredit=@FCredit,FCreditFor=@FCreditFor,FYtdDebit=@FYtdDebit,FYtdDebitFor=@FYtdDebitFor,FYtdCredit=@FYtdCredit,FYtdCreditFor=@FYtdCreditFor,FEndBalance=@FEndBalance,FEndBalanceFor=@FEndBalanceFor where FAccountID=@FAccountID and FPeriod=@FPeriod and FCurrencyID=0and FDetailID=@FDetailIDfetch next from kmyeb into @FAccountID,@FPeriod,@FBeginBalance,@FBeginBalanceFor,@FDebit,@FDebitFor,@FCredit,@FCreditFor,@FYtdDebit,@FYtdDebitFor,@FYtdCredit,@FYtdCreditFor,@FEndBalance,@FEndBalanceFor,@FDetailIDendclose kmyebdeallocate kmyebgo

【注意事项】

正式账套执行脚本前请先做好备份,建议待在测试账套中核实无误后再在正式账套中执行。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注