问题描述:
5000G3.74第一次业务结账时,选择自动检查库存成本发生异常的货品并勾选所有选项,结转完成后期初库存金额为零的货品数量全部被清零。
解决方法:
广西速达软件建议您:只能从后台修复数据:
--修复期初库存
insert into aa_storebalance
select 2010 posyear,10 posmonth,storeid,goodsid,quantity bqty,
price bprice,amount bamount,0.0 inqty,0.0 inamount,0.0 outqty,
0.0 outamtqty,quantity eqty,price eprice ,amount eamount,quantity brqty,
0.0 inrqty,0.0 outrqty,0.0 erqty,0.0 bextqty,0.0 inextqty,
0.0 outextqty,0.0 eextqty,0.0 brextqty,0.0 inrextqty,0.0 outrextqty,
0.0 erextqty
from aa_billflow
where billtype < 0 and quantity <> 0 and
cast(storeid as varchar(2))+cast(goodsid as varchar(20)) not in
(select cast(storeid as varchar(2))+ cast(goodsid as varchar(20))
from aa_storebalance
where posyear = 2010 and posmonth =10
)
go
update aa_storebalance set bqty = bb.bqty
from aa_storebalance aa,
(select a.quantity bqty,a.goodsid,a.storeid
from aa_storebalance b,aa_billflow a
where a.goodsid=b.goodsid and a.storeid =b.storeid and b.posyear=2010 and b.posmonth=10
and b.bqty<>a.quantity and a.billtype < 0 and a.quantity <> 0
) as bb
where aa.storeid=bb.storeid and aa.goodsid=bb.goodsid and aa.posyear=2010 and aa.posmonth =10
and aa.bqty <> bb.bqty
go
--这两个数应一致
select * from
(select sum(quantity) bqty from aa_billflow where billtype < 0
union all
select sum(bqty) bqty from aa_storebalance where posmonth =10 and posyear =2010
) as mm ...
转载请注明文章来自广西速达软件,本文地址:/questions/5000/2011-10-10/4270.html
版本分类:速达5000系列
模块分类:/系统维护/账务系统
附 件:
以上方法还不能解决您的问题?点击联系技术员>>
|