委外加工入库审核未成功解决办法.docx

  1. 1、本文档共9页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
委外加工入库审核未成功解决办法

---委外加工审核未成功的问题解决办法, ---可能原因是表 ICShop_ItemConsume 中FinterID的最大值问题,由于中间有表删除,一些流水号丢失,所以更新下最大值 select top 1 * from ICShop_ItemConsume order by FInterID desc select * from ICMaxNum where FTableName like ICShop_ItemConsume --- 保证最大值一致,如不是则更新 update ICMaxNum set FMaxNum = (select max(finterid) from ICShop_ItemConsume) where FTableName like ICShop_ItemConsume 以下代码为其中一列报错中抓取的过程 --Declare @FSouceTrantype as int Declare @WIPDeductMode as Decimal(28,10) --在制品扣减方式 Declare @bWriteMethod as Int --是否按标准数量 Declare @dRate as Decimal(28,10) --换算率 Declare @FWIPQty as Decimal(28,10) --在制品数量 Declare @FICMOInterID as int Declare @#Data797A90FE46DE4D3DB0887B4794F98159 table(FOrderInterID int , FOrderEntryID INT ,FItemID INT, FStockQty Decimal(28,10),FSecStockQty DECIMAL(28,10)) Insert into @#Data797A90FE46DE4D3DB0887B4794F98159 SELECT FOrderInterID,FOrderEntryID,FItemID,SUM(ISNULL(u2.FQty,0)) as FStockQty,SUM(ISNULL(u2.FSecQty,0)) AS FSecStockQty FROM ICStockBillEntry u2 WHERE u2.FICMoInterID = 0 AND u2.FOrderInterID0 AND u2.FInterID= 213494 GROUP BY FOrderInterID,FOrderEntryID,FItemID IF (select count(*) from @#Data797A90FE46DE4D3DB0887B4794F98159 ) 0 UPDATE u1 SET u1.FStockQty=ISNULL(u1.FStockQty,0)+ m2.FStockQty, u1.FAuxStockQty=ISNULL(u1.FAuxStockQty,0)+ m2.FStockQty/cast(t2.FCoEfficient as float), u1.FSecStockQty =ISNULL(u1.FSecStockQty,0)+ m2.FSecStockQty FROM ICSubContractEntry u1 INNER JOIN @#Data797A90FE46DE4D3DB0887B4794F98159 m2 on u1.FInterID=m2.FOrderInterID AND u1.FEntryID = m2.FOrderEntryID AND u1.FItemID=m2.FItemID INNER JOIN t_MeasureUnit t2 ON u1.FUnitID=t2.FMeasureUnitID UPDATE u1 SET u1.FBCommitQty=ISNULL(u1.FBCommitQty,0)+ m2.FBackQty, u1.FAuxBCommitQty=(ISNULL(u1.FBCommitQty,0)+ m2.FBackQty)/cast(t2.FCoEfficient as float), u1.FSecBCommitQty=ISNULL(u1.FSecBCommitQty,0)+m2.FSecBackQty FROM ICSubContractEntry u1 INNER JOIN (SELECT FOrderInterID,FOrderEntryID,FItemID,SUM(ISNULL(u2.FQty,0))

文档评论(0)

2017ll + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档