仓库不计入成本属性更改
当仓库属性为不计入成本,而后续出入库单单据又做了很多,造成存货核算无法核算成本
后台更改脚本如下
update Warehouse set bInCost = '1' where cWhCode in ('217','218','219') 更改仓库属性为记入成本
update rdrecords01 set bCosting = '1'
where ID in (select id from RdRecord01 where cWhCode in ('217','218','219')) 更改采购入库单表体属性为记入成本
将采购入库单插入存货核算未记账表中
insert into IA_ST_UnAccountVouch01
select rdrecord01.ID, rdrecords01.AutoID ,cVouchType, cBusType From rdrecord01 join rdrecords01
on rdrecord01.ID= rdrecords01.id where cbaccounter is null
and cwhcode in (select cwhcode from warehouse where bincost =1) And (( cWhCode IN (Select cWhCode From Warehouse Where bInCost = 1)) or cWhCode is null)
and rdrecords01 .AutoID not in( select idsun From IA_ST_UnAccountVouch01)