旗舰版生产领料单关联生产任务单生成或由产品入库倒冲生成,生产任务单上存在成本对象,生产领料单上成本对象为空?
【问题描述】
旗舰版生产领料单关联生产任务单生成或由产品入库倒冲生成,生产任务单上存在成本对象,生产领料单上成本对象为空?
【原因分析】
可能修改过物料的属性或计价方法导致。
【解决方案】
可参考以下脚本执行处理:
declare @sql varchar(max)
set @sql = replace(( replace( (replace( (replace( (convert(varchar(100),getdate(),121)),char(32),'')) ,char(45),'' )), char(58),'')) ,char(46),'')
set @sql = 'temp_ICStockBillEntry_' + @sql
set @sql = 'select t2.* into ' + @sql + '
from ICStockBill t1 join ICStockBillEntry t2 on t1.FInterID = t2.FInterID
join ICMO t3 on t2.FICMOInterID = t3.FInterID
join cbCostObj t4 on t3.FCostObjID = t4.FItemID
where t1.FTranType =24 and t2.FCostOBJID not in (select FItemID from t_Item where FItemClassID = 2001 and FDetail = 1)
and t3.FCostOBJID in (select FItemID from t_Item where FItemClassID = 2001 and FDetail = 1) '
exec (@sql)
update t2 set t2.FCostOBJID = t3.FCostObjID
from ICStockBill t1
join ICStockBillEntry t2 on t1.FInterID = t2.FInterID
join ICMO t3 on t2.FICMOInterID = t3.FInterID
join cbCostObj t4 on t3.FCostObjID = t4.FItemID
where t1.FTranType =24 and t2.FCostOBJID not in (select FItemID from t_Item where FItemClassID = 2001 and FDetail = 1)
and t3.FCostOBJID in (select FItemID from t_Item where FItemClassID = 2001 and FDetail = 1)
go
【注意事项】
正式账套执行脚本前请先做好备份,建议待在测试账套中核实无误后再在正式账套中执行。
旗舰版生产领料单关联生产任务单生成或由产品入库倒冲生成,生产任务单上存在成本对象,生产领料单上成本对象为空?
本文2024-09-22 16:38:00发表“kis知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-kis-89199.html