发布时间:2026-1-5
特价活动:>>>> 用友U8、T6、T+、T3软件产品4折优惠,畅捷通T+cloud、好会计、好业财、好生意云产品8折优惠,另有话费赠送。
1,客户的账套有的存货没有最新成本,导致毛利分析表无法出现利润率,我在物料清单上面加了一个数值自定义项,子件最后面合计那里能够取出每一款产品的材料成本的总金额,咨询了一下你们的开发,说能够通过语句更新,把物料清单材料成本的总金额更新到对应的存货的最新成本中。
2,顺便问一下更新个别存货的最新成本的语句是什么。
此问题为客户操作出现的问题,客户没有最新成本,想让我们手动改最新成本,但最新成本不能手动修改,于是提出折中方案。把物料清单的子件所有的最新成本加到父件的参考成本当中
select idbom, sum(b.latestCost) as latestCost into tempb from AA_BOMChild a left outer join AA_Inventory b on a.idinventory=b.id where a.idinventory=b.id and b.latestCost is not null group by a.idbom select a.latestCost,b.idinventory,a.idbom into tempc from tempb a left outer join AA_BOM b on a.idbom=b.id where a.idbom=b.id update AA_Inventory set invSCost=a.latestcost from tempc a left outer join AA_Inventory b on a.idinventory=b.id where a.idinventory=b.id drop table tempc drop table tempb
截屏,微信识别二维码
客服QQ:5151867
(点击QQ号复制,添加好友)