用友U8软件财务通现存量不对
2015-1-25 0:0:0 wondial用友U8软件财务通现存量不对
财务通现存量不对财务通现存量不对
原因分析:执行以下脚本能解决问题select * from sysobjects where name='tempcurrentstock'drop table TempCurrentStockSELECT cWhCode,cInvCode,(CASE WHEN cFree1=''THEN NULL ELSE cFree1 END) AScFree1 ,(CASE WHEN cFree2=''THEN NULL ELSE cFree2 END) AS cFree2 ,iainquantity AS iQuantity, CAST(0 AS FLOAT) AS fOutQuantity,CAST(0 AS FLOAT) AS fInQuantityINTO TempCurrentStockFrom ia_subsidiaryWhere cvoutype='34'group by ia_subsidiary.cWhCode,ia_subsidiary.cInvCode,ia_subsidiary.cFree1,ia_subsidiary.cFree2,ia_subsidiary.iainquantityINSERT INTO TempCurrentStock(cWhCode,cInvCode,cFree1,cFree2,iQuantity) SELECT cWhCode, cInvCode,(CASE WHEN cFree1=''THEN NULL ELSE cFree1 END) AS cFree1 ,(CASE WHEN cFree2=''THEN NULL ELSE cFree2 END) AS cFree2 , (CASE WHEN bRdFlag0THEN iQuantity ELSE -iQuantity END) AS iQuantityFROM RdRecord INNER JOIN RdRecords ON RdRecord.ID = RdRecords.ID WHERE cVouchType'33'AND cVouchType'34' AND RdRecord.dDate>='2007-1-01'INSERT INTO TempCurrentSt问题解答:执行以下脚本能解决问题select * from sysobjects where name='tempcurrentstock'drop table TempCurrentStockSELECT cWhCode,cInvCode,(CASE WHEN cFree1=''THEN NULL ELSE cFree1 END) AScFree1 ,(CASE WHEN cFree2=''THEN NULL ELSE cFree2 END) AS cFree2 ,iainquantity AS iQuantity, CAST(0 AS FLOAT) AS fOutQuantity,CAST(0 AS FLOAT) AS fInQuantityINTO TempCurrentStockFrom ia_subsidiaryWhere cvoutype='34'group by ia_subsidiary.cWhCode,ia_subsidiary.cInvCode,ia_subsidiary.cFree1,ia_subsidiary.cFree2,ia_subsidiary.iainquantityINSERT INTO TempCurrentStock(cWhCode,cInvCode,cFree1,cFree2,iQuantity) SELECT cWhCode, cInvCode,(CASE WHEN cFree1=''THEN NULL ELSE cFree1 END) AS cFree1 ,(CASE WHEN cFree2=''THEN NULL ELSE cFree2 END) AS cFree2 , (CASE WHEN bRdFlag0THEN iQuantity ELSE -iQuantity END) AS iQuantityFROM RdRecord INNER JOIN RdRecords ON RdRecord.ID = RdRecords.ID WHERE cVouchType'33'AND cVouchType'34' AND RdRecord.dDate>='2007-1-01'INSERT INTO TempCurrentStock(cWhCode,cInvCode,cFree1,cFree2,fOutQuantity) SELECT EnDispatchs.cWhCode, EnDispatchs.cInvCode,(CASE WHEN EnDispatchs.cFree1='' THEN NULL ELSE EnDispatchs.cFree1 END) AS cFree1 ,(CASE WHEN EnDispatchs.cFree2='' THEN NULL ELSE EnDispatchs.cFree2 END) AS cFree2 , (ISNULL(iQuantity,0)-ISNULL(fOutQuantity,0)) AS fOutQuantityFROM EnDispatch INNER JOIN EnDispatchs ON EnDispatch.EDID = EnDispatchs.EDID WHERE ISNULL(EnDispatchs.cWhCode,'')'' AND ISNULL(EnDispatch.cSTCode,'')'' AND EnDispatchs.iQuantity>0 AND bReturnFlag=0INSERT INTO TempCurrentStock(cWhCode,cInvCode,cFree1,cFree2,fOutQuantity) SELECT DispatchLists.cWhCode as cWhCode, DispatchLists.cInvCode as cInvCode,(CASE WHEN DispatchLists.cFree1='' THEN NULL ELSE DispatchLists.cFree1 END) AScFree1 , (CASE WHEN DispatchLists.cFree2='' THEN NULL ELSE DispatchLists.cFree2END) AS cFree2 , (ISNULL(iQuantity,0)-ISNULL(fOutQuantity,0)) AS fOutQuantityFROM DispatchLists INNER JOIN DispatchList ON DispatchLists.DLID =DispatchList.DLID WHERE DispatchList.cVouchType='05' AND ISNULL(DispatchLists.cWhCode,'')''AND ISNULL(DispatchList.cSTCode,'')'' AND (DispatchList.iSale=0 orDispatchList.iSale IS NULL) AND DispatchLists.iQuantity>0INSERT INTO TempCurrentStock(cWhCode,cInvCode,cFree1,cFree2,fOutQuantity) SELECT cWhCode, cInvCode,(CASE WHEN cFree1=''THEN NULL ELSE cFree1 END) AScFree1 , (CASE WHEN cFree2=''THEN NULL ELSE cFree2 END) AS cFree2 , (ISNULL(iQuantity,0)-ISNULL(fOutQuantity,0)) AS fOutQuantityFROM SaleBillVouchs INNER JOIN SaleBillVouch ON SaleBillVouch.SBVID=SaleBillVouchs.SBVID WHERE ISNULL(SaleBillVouchs.cWhCode,'')'' AND (SaleBillVouch.iDisp=0 ORSaleBillVouch.iDisp IS NULL) AND ISNULL(cBusType,'')'委托' AND ISNULL(cSTCode,'')'' AND ISNULL(cInvalider,'')='' AND SaleBillVouchs.iQuantity>0INSERT INTO CurrentStock(cWhCode,cInvCode,cFree1,cFree2,iQuantity,fOutQuantity,fInQuantity) SELECT cWhCode, cInvCode,cFree1,cFree2 , sum(iQuantity) AS iQuantity,sum(ISNULL(fOutQuantity,0)) AS fOutQuantity, sum(ISNULL(fInQuantity,0)) ASfInQuantityFROM TempCurrentStockGROUP BY cWhCode,cInvCode,cFree1,cFree2Delete From CurrentStockwhere iquantity is null and foutquantity=0 and finquantity=0如果您的问题还没有解决,可以到 T+搜索>>上找一下答案
相关阅读
- 追“本”溯“源”2021-10-22 17:0:9
- 用友U8不同的核算方式如何影响存货成本2021-10-9 10:15:1
- 用友U8哪些办法可以让库存更准确详解2021-9-26 11:24:19
- U8固定资产操作手册2021-9-24 17:0:12
- 应收帐龄管理2021-9-3 9:19:34
- 用友U8软件怎么控制入库?2021-6-8 8:39:6
- 用友U8软件在单据打印时去掉“用友软件”字样2021-5-19 16:33:4
- 用友U8应付冲应付业务流程2021-5-17 11:55:2
- 用友U8软件销售订单生成发票2021-5-17 11:47:5
- 用友U8组装业务2021-5-10 10:17:32
最新信息
通告的写作规范 通告的写作规范
通告,是在一定范围内公布应当遵守或周知的事项时使用的一种公文。通告具有指导作用、约束作用和教育作用。通告的特点是:约束性、原则性、可行性、公开性。通告按其内容性质可分为:制约性通告、告知性通告和政策性通告。
通告的结构,一般由标题、发文字号、正文、落款、主题词几部分组成。
标题。有完整式和省略式两种。完整式即由发文机关名称、事由和文种三部分组成;省略式即或省去发文机关名称,或省去事由。