本公司前身为用友软件台州分公司,现为浙江台州地区用友软件专业销售商:销售用友U8、用友U9、用友PLM、用友CRM、台州ERP等台州用友ERP产品,欢迎选购。

数据驱动企业

仓库不计入成本属性更改

分享到:

当仓库属性为不计入成本,而后续出入库单单据又做了很多,造成存货核算无法核算成本

后台更改脚本如下


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)


回到顶部