网站大量收购闲置独家精品文档,联系QQ:2885784924

供应链-存货核算-存货与总账对账不平.docx

供应链-存货核算-存货与总账对账不平.docx

  1. 1、本文档共11页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 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

文档评论(0)

文人教参 + 关注
实名认证
内容提供者

老师教学,学生学习备考课程、成人语言培训课程及教材等为提升学生终身学习竞争力,塑造学生综合能力素质,赋能学生而努力

版权声明书
用户编号:6103150140000005

1亿VIP精品文档

相关文档