Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

问题描述:借款单生成凭证,记账后反记账,反审核,修改,再审核记账就报错:凭证明细科目余额表方向异常,不能记账,请确认!

借款科目勾选了核算往来就不报错,不勾选就报错。

解决办法:备份数据后执行这个脚本,再去重新生成借款单凭证:

995版本:

https://share.weiyun.com/Jh3EARz6 ;    ---GP_BatchCreateVoucher_BorrowBill.sql

994版本:

https://share.weiyun.com/YhUZPftD     ---994GP_BatchCreateVoucher_BorrowBill.sql


备份数据后执行下面脚本,可以对未修改过的有错的凭证进行修复,已经修改过的凭证只能删除重新生成。

UPDATE a SET a.Fdc=b.Fdc FROM dbo.Ac_Voucher_Bill a ,Ac_Account b
WHERE a.ATypeId = b.TypeId
AND a.STypeId = b.StypeId
AND a.BillNumberId IN(
SELECT c.VourchBillId FROM dbo.Ac_GoodsBill_VoucherBill c
INNER JOIN (SELECT BillNumberId FROM dbo.BillIndex WHERE BillType IN (452, 453,455 )) d ON c.GoodsBillId = d.BillNumberId)
AND A.Fdc IS NULL

  • No labels