update IA_Subsidiary set ioutCost=d.iUnitPrice,iAoutPrice=d.iSumfrom (select c.autoid,b.iUnitPrice,b.iSum
from SaleBillVouch a inner join SaleBillVouchs b on a.SBVID=b.SBVID inner join IA_Subsidiary c on a.SBVID=c.iPZID and b.AutoID=c.ID where iAOutPrice>1000000000) d
where
IA_Subsidiary.AutoID=d.autoid and IA_Subsidiary.iAOutPrice>1000000000
update RdRecords set iUnitCost=0,iPrice=0
where AutoID in( select id from IA_Subsidiary where iAInPrice>1000000000 )
update IA_Subsidiary set iInCost=0,iAInPrice=0 where iAInPrice>1000000000
2、结转供应链报错:执行视图 SA_SumOutQuantityNum_NS 报错
通用脚本:
对上年度执行
update RdRecords set iUnitCost =0,iPrice =0
WHERE ABS(iPrice) > 999999999994
3、结转应收应付的时候提示“系统所用部门被非法删除,不能结转上年数据”
通用脚本:
对本年执行
(1)先用用以下脚本检查下是否有些部门在上年度存在,但新年度中不存在的情况:
select * from department where cdepcode not in (select cdepcode from 上年数据库名
字.department);
--其中【上年数据库名字】改成账套上年的数据库名字
(2)语句查找出哪个部门不存在,就在新年度中增加该部门档案
(3)增加部门档案后重新年结。
三、反年结
1、固定资产反年结(工具无法选择 20 年以后的年度)
通用脚本:
update ufsystem..ua_account_sub set bClosing=0 where cacc_id=' 账 套 号 ' and