- 1、本文档共11页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ME技术与产品支持服务中心
呼叫中心/产品支持 84号工程师 方俊霞
存货与总账对账
产品线:U8
版本:U8V10.1
领域:可参考excel
模块:可参考excel
数据库版本:SQL2005
问题标题:存货与总账对账
问题描述:存货与总账对账不平的常见原因和处理思路分析。
问题分析:
【原理说明】
存货与总帐对帐,实际上就是一个按照科目抓取数据进行核对的过程,其中存货的数据来自于ia_subsidiary,总账的数据主要来自于Gl_accsum、gl_accvouch。
其处理过程主要为:
--存货期初数据抽取
Select cInvHead,cCode_Name,
cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as decimal(38,2)) as QcPrice,
cast(isnull(iAInQuantity,0)-isnull(iAOutQuantity,0) as float) as QcQuantity,
cast(0 as float) as InPRice,cast(0 as float) as InQuantity,
cast(0 as float) as OutPrice,cast(0 as float) as outQuantity
--into tempdb..OptVouchFJX0
from ia_subsidiary
left join code on ia_subsidiary.cInvHead=code.ccode and code.iyear = 2011
where IA_subsidiary.iYear = 2011
And not cPZID is null
and not cInvHead is null
and ia_subsidiary.cvoutype N33
and iMonth1
Insert into tempdb..OptVouchFJX0
Select cDifHead,cCode_Name,
cast(isnull(iDebitDifCost,0)-isnull(iCreditDifCost,0) as decimal(38,2)) as QcPrice,
cast(isnull((case when isnull(idebitdifcost,0)=0 then 0 else (cast(isnull(iAInQuantity,0) as float)- cast(isnull(iAOutQuantity,0) as float)) end),0)-isnull((case when brdflag=1 then (case when isnull(iCreditDifCost,0)=0 then 0 else (cast(isnull(iAInQuantity,0) as float)- cast(isnull(iAOutQuantity,0) as float)) end) else (case when isnull(iCreditDifCost,0)=0 then 0 else (cast(isnull(iAoutQuantity,0) as float)- cast(isnull(iAinQuantity,0) as float)) end) end) ,0) as float) as QcQuantity,
cast(0 as float) as InPRice,
cast(0 as float) as InQuantity,
cast(0 as float) as OutPrice,
cast(0 as float) as outQuantity
from ia_subsidiary
left join code on ia_subsidiary.cDifHead=code.ccode and code.iYear = 2011
where IA_subsidiary.iYear = 2011
And not cPZID is null
and not cDifHead is null
and ia_subsidiary.cvoutype N33
and iMonth1
--存货日常发生数抽取
Insert into tempdb..OptVouchFJX0
Select cInvHead,cCode_Name,
cast(0 as float) as qcPRice,
cast(0 as float) as qcQuantity,
cast(isnull(iAInPrice,0) as decimal(38,2)) as inPrice,
cas
您可能关注的文档
- 2.需求挖掘与分析.docx
- 3.市场与竞品分析.docx
- 890年度结转演示数据 - 解决方案.docx
- 890年度结转演示数据.docx
- 2012.04.23_Z15项目业主BIM工作手册(设计阶段)(1).docx
- 2012.07.22_《Z15项目BIM实施导则》(设计阶段)讨论稿(讨论记录).docx
- 2012.07.22_附表1《BIM模型专业信息详表》.docx
- 20120528-北京CBD核心区Z15项目-幕墙咨询顾问技术要求-BIM20120608 .docx
- 20120717Z15幕墙顾问疑问回复3-钱.docx
- 20120727Z15项目初步设计BIM启动会议纪要(发业主).docx
文档评论(0)