我下载了T3普通版10.8PLUS1的程序,还是出现以下问题
2017-8-3 0:0:0 用友T1小编我下载了T3普通版10.8PLUS1的程序,还是出现以下问题
我下载了T3普通版10.8PLUS1的程序,还是出现以下问题1.修改计算机名称,不要带符号,2.你安装数据库了吗?安装了有些数据库都安装不了@沉浮1466491762:那就安装2005的直接安装完整版数据库,然后IIS忽略即可
如果您的问题还没有解决,可以到 T+搜索>>上找一下答案
相关阅读
- 这两个单据上的成本价怎么不一样 一张是销货单 一张是销售出库单 是同一批货物 销售出库单上单成本价是正确的 销货单上单不对2017-8-8 0:0:0
- 这个应该怎么办,最好有操作流程2017-8-8 0:0:0
- 这个怎么玩的呢?不会呀2017-8-8 0:0:0
- 这个是什么版本?狗是410090302017-8-8 0:0:0
- 这个是怎么算出来的呢?2017-8-8 0:0:0
- 这是什么情况,工作圈他也加不了。2017-8-8 0:0:0
- 这是标准版还是普及版?麻烦告诉下谢谢2017-8-8 0:0:0
- 这个可以删除吗?2017-8-8 0:0:0
- 这个天要热死了,坐都坐不住了2017-8-8 0:0:0
- 这个报错是什么原因导致的呢2017-8-8 0:0:0
最新信息
- 还没开票的做到预收科目,那成本可以先做进去吗?
- 进入总账提示所选行业性质与科目不相符,去检查表提示数据库严重损坏,修复数据提示成功,再去检测又是严重错误
- 进入总账正常,打开报表,选择报表文件,提示正在使用或被锁定。另存为后,打开正常,但是点打印时提示内容如图。点确定,重新进入财务报表时就提示报表为试用版。重新打补丁后又可以进入,还是一样问题循环。求解??
- 进入报表系统显示
- 进入界面提示:请使用系统维护工具修复数据库:k:-记账宝-zwset.mdb! 是4G的 _0
- 进入系统是提示无法连接服务器
- 进入财务报表模块,总是提示当前运行的是试用版 ,多次注册了还有提示。-报表最多追加4页,-报表不能打印,总是保存下来在打印。-财务报表数据不准,,有时候对,有时候不对,
- 进入账套后,点击编制凭证,出现动态库JZBComp.dll加载失败,点确定,记账宝就退出了。怎么办?我的邮箱为<span class="__cf_email__" data-cfemail="b381858385808385878184f3c2c29dd0dcde">[email protected]</span>
- 进入软件总是要密码,但是在安装数据库的时候没有密码。
- 进入软件提示这个问题 11.5的版本 打了最新补丁。已经成功注册。
固定资产模块,帐表查询的时候为什么‘编辑’菜单是灰色的? 固定资产模块,帐表查询的时候为什么‘编辑’菜单是灰色的?
请用最新可修改日期登陆固定资产模块进行操作。@畅捷服务常媛露:用最新日期登陆还是灰色的@畅捷服务常媛露:自定义卡片样式中,点击修改后,除了移入项目和移出项目可以操作外其他的也是灰色的@朋朋6zm:您是以固定资产的最新可修改日期登陆的吗?@畅捷服务常媛露:是的@朋朋6zm:您好,您是想要调整固定资产总账的格式吗?格式固定是调整不了的,要不您去看卡片管理,里面编辑是可以调整的。@畅捷服务常媛露:卡片调整中的格式,也不是我想要的帐页格式啊?@朋朋6zm:不好意思,固定资产总账这边格式调整不了的。
安装完后服务器如何登陆,用户密码验证要填什么? 安装完后服务器如何登陆,用户密码验证要填什么?
您好,先点击测试,成功之后之后点击保存设置,在登录软件,服务器电脑登录地址输入127.0.0.1登录进去即可。老是说数据库连接测试失败!@缪晟:您安装软件之前安装数据库了吗?若是安装了数据库的话,重启电脑之后在测试,另外将127.0.0.1换成计算机名之后在测试下
- 经常出现账套年度演示期限已到期,怎么办?
- 麻烦问下,T3升级T6,是不是要先安装6.1,用工具升级,再导出帐套,安装6.5,再升级到6.5?
- 麻烦问下,账簿交接怎么操作
- 麻烦问下:增值税普票次月开了负数发票,做账时是否都要把财务联和发票联附在记账凭证后,另外当月作废的增值税普票怎么处理呢?谢谢!
- 黄色的加密狗驱动不了,在服务社区下载的驱动安装后也是不行,win2003的系统
- 黄色部分的最新成本错了,如何修改
- (-0.2)的2009次方乘(-5)的2010次方
- (时间是11点多的时候还没吃饭)体育考试立定跳远 和跑完50米后 然后走20几分钟去车站搭车
- ,小额纳税企业在营业大厅开增值税专用发票税点是多少
- 1。T3升级上来,增加了 人事管理模块 ,加密狗刷新了 薪资管理还是系那是演示版……--2.还有就是 登录进去经常会出现登录子系统失败,退出再登录进去就行-请教
进入后点击填制凭证时提示该功能模块已超出演示期,请问怎么回事? 进入后点击填制凭证时提示该功能模块已超出演示期,请问怎么回事?[]
请购买正式加密卡@董江川:有用加密狗的啊@齐佳恩:重新注册您好,建议把加密狗拔下来重新重插,如果还是有提示软件是否有识别到加密狗。
土地增值税各地成本对象规定汇总 土地增值税各地成本对象规定汇总
一、相关规定 1.国税发【2006】第187号:《关于房地产开发企业土地清算管理有关问题的通知》第一条: 土地增值税以国家有关部门审批的房地产开发项目为单位进行清算,对于分期开发的项目,以分期项目为单位清算。开发项目中同时包含普通住宅和非普通住宅的,应分别计算增值额。 2国税发【2009】第091号:关于印发《土地增值税清算管理规程》的通知 (五)人分期开发项目或者同时开发多个项目的,或者同一项目中建造不同类型房地产的,应按照受益对象,采用合理的分配方法,分摊共同的成本费用。 二、各地规定
|
- 请问:修改制单人后以前做账的制单人不能同步修改吗?以前做好的账的制单人姓名?
- 请问,我们缴纳的税款入库到哪里了?在哪里可以看出入哪个金库了?三方协议上能看出吗?
- 请问,我先前收到一笔货款,不知道是谁付的,借:银行存款,贷:应收账款-未知;现在确认是谁付的后,我该怎样调账
- 请问,我公司是一般纳税人,供应商开给我们的进项名字开错了,已经被我们认证了,但是客户那边作废重开了一张,重开的未认证,这种进项转出要怎么做的?直接做一张红字红冲就可以了么?
- 请问,我看她写的期限是一年,那么一年以后,现在建立的帐套还在么
- 请问,我进项一个东西含税价是62元,税负率算1.2%,进销都是17%的税钱收,卖出去我要卖多少钱才不会亏呢?有公式吗
- 请问,新版的国税季报利润表里,本期金额和上期金额怎么填,取哪个数呢,谢谢
- 请问,用友建账建筑行业行业性质选哪个?
- 请问,财务做帐时后面附的合同必须是原件吗?
- 请问:店铺转让费10万元放在什么科目核算?新店。如果要摊消,几年摊完比较合理。坐得各位高手解答。谢谢。
- 钱流信息-现金银行收支查询-查询结果的明细列表会出现以下错误:-如果收款单中填写了2个收款账户,在查询列表中会出现相同的两条数据。-例,收款单001 账户A 1000元 账户B2000元-明细列表是 :-单号001 账户A 1000元-单号001 账户B 2000元-单号001 账户A 1000元-单号001 账户B 2000元
- 销售业务-业务场景 客户是卖布艺的 材料是平方 购进 卖的时候是以长-宽 得出来的平方,但是软件中 只能填一个数量 能否 把 数量设定公式 =长-宽的值 这样 数量-单价就是最终的金额了
- 销售出库单怎么新增?为何没有增加按钮?是账套有问题?还是操作问题?
- 销售成本明细表里边折后价(只有一个商品)显示0,其他的的都正常,是哪里出了问题
- 销售时,仓库有100个商品,客户购买了50个商品,并支付了50个商品的钱,那我仓库就应该出库50,还剩50。但他是分批拿走货的,我还要知道仓库还剩多少,他拿走了多少,还有多少没拿走?业务流程应该怎么弄?怎么做?
- 采购单据进行正常单据记账生成凭证,销售单据不想生成凭证,手工做凭证,月底核算模块可以正常结账吗?
- 采购订单做完,审核后,新增采购入库单参照订单生成时,含税单价会自动多出0.01分钱,含税总金额就多出好多,与订单就不一样了,这是怎么回事?数量都是完全一样。
- 采购订单流转生成采购入库单时,流转是灰色的,不可用,怎么办?
- 采购退货的红字采购入库单审核提示现存量不足,有什么办法可以把单据审核掉呢?
- 重新计价后好不好恢复
用友U8 运行时错误440用友U8 运行时错误440
报错组件:查询/填制凭证
服务器环境:win2k3
客户端为:xp
出错提示:运行时错误440 automation错误,然后点一下出运行时错误94,使用null无效
点击确定出现运行时错误440。
另注:当按住 ctrl或者alt键后,运行时错误440无限弹出。
解决办法 :
报429错误是由于 GL_VoucherOption表有丢失的,解决方法是将上一年的GL_VoucherOption里的内容补全到当前的表中就可以。试着打开2个年度的这个表,发现内容没有什么区别,只有在cNewdate字段有些不一样。然后把不同的数据重新复制了一下。
用友软件,用心服务!正版软件,假一赔十!上门服务,全程免费培训,做账支持!一年免费服务,全程使用无忧!
如有其它不明白的问题,或需要我们解决的问题,请联系我们!电话:010-59798025。也可以通过在线咨询联系我们。天龙瑞德(北京用友软件销售服务中心)
营业数据发生了错误且过了夜审,如何调整 营业数据发生了错误且过了夜审,如何调整
问题号: | 29540 |
---|---|
适用产品: | T6系列 |
软件版本: | T6-酒店管理软件标准版11.2 |
软件模块: | 前台 |
问题名称: | 营业数据发生了错误且过了夜审,如何调整 |
问题现象: | 操作员在前台操作失误,房费录多了,导致营业收入不正确,且已经过了夜审,该如何调整. |
问题原因: | 酒店营业报表和财务制度是一致的,无法返回修改上日账务,可通过宾馆账来调整 |
关键字: | 营业数据的调整 |
解决方案: | 打开前台系统–账务–宾馆账中输入调整房费(负),然后进行结账退款,这样两天的营业收入相加就能平衡。<BR> |
行业: | 通用 |
补丁编号: | |
解决状态: | 临时解决方案 |
录入日期: | 2016-03-16 15:23:45 |
最后更新时间: |
- 销售订单,联查都已经没有后续单据了,但是还是一直提示单据已后续执行,不能弃审。
- 销售订单,表头,字段的位置可以移动吗?如何移动控件位置? _0
- 销售费用分摊单,什么情况下适合进行分摊,我方付运费时?还是客户方付运费我方暂时垫付时?
- 销货单已经部分出库,做了出库单,现在想要在不删除出库单的前提下将销货单弃审后修改价格再重新审核能实现吗?还是说一定要把出库单删除后才能够弃审销货单?
- 销售报表上怎么把单据的备注显示出来
- 销售排行榜报表和图表怎么显示
- 销售排行榜统计的数据是扣除退货的吗?
- 销售统计表想某一自定义数值型要显示但不做合计可以吗?
- 销售订单上能不能显示客户应收款?
- 销售订单如何自动带出最新的销售单价?
大家好,要是找银行代发工资,报个税时可以和银行的工资表人数不一样吗 大家好,要是找银行代发工资,报个税时可以和银行的工资表人数不一样吗[]
可以不一样,银行的人数比工资表上的少。比如有的人发现金。个税要求全员申报,发多少人的工资就得申报多少人的个税。按照道理来看,代发工资的人数应该是你申报的人数,也是你工资表的人数啊[/偷笑] 我们实际中都不一样
用友U8.51年结失败U8.51年结失败
U8.51-年结失败
自动编号: | 7805 | 产品版本: | U8.51 |
产品模块: | 系统环境 | 所属行业: | 通用 |
适用产品: | U851----系统管理 | 关 键 字: | U851年结失败 |
问题名称: | 年结失败 | ||
问题现象: | 结转供销链的时候,结转到“存货管理 结转分期收款 委托代销业务”的时候,就停止了。 | ||
原因分析: | 在存货档案表中有部分商品是货位管理且出库跟踪入库,而这些商品在货位对应表中没有记录入库单号,此种情况估计是由于修改过存货档案属性造成的,如原来该存货不是出库跟踪入库,填制单据时不需要记录入库单号,但修改成出库跟踪入库后,在年结的时候系统就需要查找其对应的入库单号,所以出错. | ||
解决方案: | 经过检查2003年的数据,发现有出库跟踪入库的货物都没有出入库,所以可以把这些存货的出库跟踪入库属性去掉再结转即可。但是结转后需要手工在修改该属性。否则则需要在2003年恢复到期初状态再重新做业务。如果采纳修改属性的办法,可以使用如下SQL语句使用前作好数据备份工作:update ufdata_101_2003..inventory set btrack=0 where btrack=1 update ufdata_101_2004..inventory set btrack=0 where b 温馨提示:如果您的问题还没有解决,欢迎进入用友云基地。 |
用友U8 销售系统中进销存统计表与销售毛利分析不一致。正常时进销存统计表中的销售数量、销售金额应分别与销售毛利分析中的本期数量、毛利变动扩影响分析售价影响一致,但在用户处11月份不一致用友U8 销售系统中进销存统计表与销售毛利分析不一致。正常时进销存统计表中的销售数量、销售金额应分别与销售毛利分析中的本期数量、毛利变动扩影响分析/售价影响一致,但在用户处11月份不一致。
问题原因:软件设计问题,Sa_moveSRMDetail存储过程其日期过滤条件的判断为大于起始日期。 解决方法:查询其他账表并与此两张表对比,发现销售毛利分析中数据是正确的,而进销存统计表数据不对。用SQL跟踪发现进销存统计表是调用存储过程Sa_moveSRMDetail进行数据查询的,仔细分析Sa_moveSRMDetail存储过程,发现其日期过滤条件的判断为大于起始日期,小于等于结束日期,也就是起始日期这一天给舍弃了,导致统计数据不对,改成大于等于起始日期后查询正确。if exists(select * from sysobjects where name='sa_MoveSRMDetail' and type='P')drop PROCEDURE sa_MoveSRMDetailgo-- U821版-- 2003.12.5-- 南京用友 丁德安-- 销售系统中进销存统计表的销售数量、销售收入不等于销售毛利分析中的本期数量和售价影响-- 经分析后发现是起始日期判断条件为'>',应为'>='CREATE PROCEDURE sa_MoveSRMDetail ( @chrtablename varchar (50) = null , @chrWhere varchar (255 ) = null , @chrStartDate varchar(20) = null , @chrendDate varchar(20) = null , @chrChecker varchar(40) = null , @chrDep varchar(50) = null , @chrWareHouse varchar(20) ) ASdeclare @chrsql varchar(4000) declare @chrCost varchar(40) declare @chrSaleDate varchar (50)-- 删除临时表 if exists (select name from tempdb..sysobjects where name ='tmp_srm') drop table tempdb..tmp_srm --删除进销存明细账--1 组织期初数据 --1.1 计算所有发出成本 if exists (select name from tempdb..sysobjects where name ='tmp_srmcost' ) drop table tempdb..tmp_srmcost --删除成本明细 --从成本明细账中取得销售成本和其他出库成本 set @chrsql= ' Select dkeepdate as ddate , cVouType AS cvoutype,cInvcode, cAccDep ,ia_subsidiary.cDepCode, bMoneyFlag, bSale, iMonth , Warehouse.cWhValueStyle AS cWhValueStyle , ia_subsidiary.cWhcode , iAOutQuantity , case when (cWhvaluestyle=''计划价法''or cWhvalueStyle=''售价法'') and bMoneyFlag=1 then isnull(iAOutPrice,0)- isnull(iDebitDifCost,0) + isnull(iCreditDifCost,0) else isnull ( iAOutPrice,0 ) end as iAOutPrice into tempdb..tmp_srmcost from ia_subsidiary inner join warehouse on ia_subsidiary.cwhcode = warehouse.cwhcodewhere brdflag = 0 ' if ltrim(rtrim(@chrwhere )) <> '' and not ( @chrwhere is null ) set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cAccdep ' + @chrdep if ltrim(rtrim(@chrenddate )) <> '' and not (@chrenddate is null ) set @chrsql = @chrsql + ' and dkeepdate<='''+ @chrenddate +''''if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and ia_subsidiary.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec (@chrsql )--计算非自填成本 set @chrCost=(SELECT cValue FROM AccInformation WHERE (cSysID = 'ia') AND (cName = 'cvaluestyle')) if @chrCost ='按部门核算'begin update tempdb..tmp_srmcost set tempdb..tmp_srmcost.iAOutPrice=case when (tempdb..tmp_srmcost.cWhvalueStyle='售价法' ) then tempdb..tmp_srmcost.iAoutPrice*(1 - isnull(ia_summary.iDifRate,0)) else tempdb..tmp_srmcost.iAoutPrice*(1 + isnull(ia_summary.iDifRate,0)) end from tempdb..tmp_srmcost inner join ia_summary on tempdb..tmp_srmcost.iMonth = ia_summary.iMonth and tempdb..tmp_srmcost.cDepCode = ia_summary.cDepCode and tempdb..tmp_srmcost.cInvCode = ia_summary.cInvCode where (tempdb..tmp_srmcost.cWhvaluestyle='计划价法'or tempdb..tmp_srmcost.cWhvalueStyle='售价法') and tempdb..tmp_srmcost.bMoneyFlag=0 and tempdb..tmp_srmcost.bSale<> 1 endelse begin update tempdb..tmp_srmcost set tempdb..tmp_srmcost.iAOutPrice=case when (tempdb..tmp_srmcost.cWhvalueStyle='售价法' ) then tempdb..tmp_srmcost.iAoutPrice*(1 - isnull(ia_summary.iDifRate,0)) else tempdb..tmp_srmcost.iAoutPrice*(1 + isnull(ia_summary.iDifRate,0)) end from tempdb..tmp_srmcost inner join ia_summary on tempdb..tmp_srmcost.iMonth = ia_summary.iMonth and tempdb..tmp_srmcost.cWhCode = ia_summary.cWhCode and tempdb..tmp_srmcost.cInvCode = ia_summary.cInvCode where (tempdb..tmp_srmcost.cWhvaluestyle='计划价法'or tempdb..tmp_srmcost.cWhvalueStyle='售价法') and tempdb..tmp_srmcost.bMoneyFlag=0 and tempdb..tmp_srmcost.bSale<> 1 end--完成成本计算所有的出库成本保存在临时文件 tempdb..tmp_srccost中 --1.3计算期初入库金额 --创建临时表tmp_srm保存查询统计的临时结果 --临时表结构 存货编号 ,部门编号 ,期初数量,期初金额,采购数量,采购金额 -- 暂诂数量,暂诂金额,其他入库数量,其他入库金额,销售数量 -- 销售金额,其他出库数量,其他出库金额,调拨数量,调拨金额 -- 收入金额,出库数量,成本 set @chrsql = 'Select cInvCode , caccdep ,iAinQuantity as qc_iQuantity , (iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) ) as qc_imoney ,(iAinPrice - iAinPrice) as iQuantityCG , (iAinPrice - iAinPrice) as iMoneyCG , (iAinPrice - iAinPrice) as iQuantityZG, (iAinPrice - iAinPrice) as iMoneyZG , (iAinPrice - iAinPrice) as iQuantityQTRK , (iAinPrice - iAinPrice) as iMoneyQTRK , (iAinPrice - iAinPrice) as iQuantityXS , (iAinPrice - iAinPrice) as iMoneyXS , (iAinPrice - iAinPrice) as iQuantityQTCK , (iAinPrice - iAinPrice) as iMoneyQTCK , (iAinPrice - iAinPrice) as iQuantityDB , (iAinPrice - iAinPrice) as iMoneyDB ,(iAinPrice - iAinPrice) as iMoneySR , (iAinPrice - iAinPrice) as iQuantityCK , (iAinPrice - iAinPrice) as iMoneyCB ,cwhcode into tempdb..tmp_srm from ia_subsidiary 'if ltrim(rtrim(@chrstartdate)) = '' or @chrstartdate is null begin --无期初日期时只计算上年结转 set @chrsql = @chrsql + ' where iMonth=0 and brdflag = 1 and cVoutype <>''33'' 'end else begin--有期初日期时的情况 set @chrsql = @chrsql + ' where brdflag = 1 and ( (iMonth = 0 and cVoutype <>''33'' ) or dkeepdate <='''+@chrstartdate +''' and ( cVoutype in (''01'',''24'',''30'',''08'',''20'',''22'',''10'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) ) ) 'end --加入日期和部门条件 if ltrim(rtrim(@chrwhere )) <> '' and not (@chrwhere is null ) set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cAccdep ' + @chrdep --加入仓库条件 if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and ia_subsidiary.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec ( @chrsql )--1.2 生成期初出库成本 if ltrim(rtrim(@chrstartdate)) <> '' and not ( @chrstartdate is null ) begin --如果无期初日期不应该计算期初发出内容 set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , caccdep ,- iAoutQuantity as qc_iQuantity , - iAoutPrice as qc_imoney ,0 as iQuantityCG , 0 as iMoneyCG , 0 as iQuantityZG, 0 as iMoneyZG , 0 as iQuantityQTRK , 0 as iMoneyQTRK , 0 as iQuantityXS , 0 as iMoneyXS , 0 as iQuantityQTCK , 0 as iMoneyQTCK , 0 as iQuantityDB , 0 as iMoneyDB ,0 as iMoneySR , 0 as iQuantityCK , 0 as iMoneyCB , cWhcode from tempdb..tmp_srmcost where cvoutype in (''09'',''11'',''21'',''26'',''27'',''28'',''29'',''32'') 'set @chrsql = @chrsql + ' and ddate <=''' + @chrstartdate + '''' exec(@chrsql )end --完成期初数据的准备 --2 组织本期数据 --2.1 统计本期采购入库数据:采购入库数量,采购入库金额,暂诂入库数量,暂诂入库金额,其它入库数量,其他入库金额set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , caccdep ,0 as qc_iQuantity ,0 as qc_imoney ,case when cvoutype in(''01'',''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinQuantity else 0end iQuantityCG , case when cvoutype in(''01'',''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) else 0end as iMoneyCG , case when ( cvoutype = ''01'' and bflag = 1 ) or cvoutype in(''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinQuantity else 0end as iQuantityZG, case when ( cvoutype = ''01'' and bflag = 1 ) or cvoutype in(''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) else 0end as iMoneyZG , case when cVoutype in (''08'',''20'',''22'',''10'') then iAinQuantity else 0 end as iQuantityQTRK , case when cVoutype in (''08'',''20'',''22'',''10'') then iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) else 0 end as iMoneyQTRK , 0 as iQuantityXS , 0 as iMoneyXS , 0 as iQuantityQTCK , 0 as iMoneyQTCK , 0 as iQuantityDB , 0 as iMoneyDB ,0 as iMoneySR , 0 as iQuantityCK , 0 as iMoneyCB , cWhcode from ia_subsidiary Where bRdflag = 1 and iMonth > 0 and ( cVoutype in (''01'',''24'',''30'',''08'',''20'',''22'',''10'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) ) '--追加开始日期条件 if ltrim(rtrim(@chrstartdate)) <> '' and not ( @chrstartdate is null ) set @chrsql = @chrsql + ' and dkeepdate>''' + @chrstartdate + ''''--追加结束日期条件 if ltrim(rtrim(@chrenddate)) <> ''and not ( @chrenddate is null ) set @chrsql = @chrsql + ' and dkeepdate<=''' + @chrenddate + ''''--追加其他条件 if ltrim(rtrim(@chrwhere)) <> '' and not @chrwhere is null set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cAccdep ' + @chrdep --加入仓库条件 if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and ia_subsidiary.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec(@chrsql ) --end 本期采购部分计算结束 --2.3 统计本期销售数量,销售金额,销售调拨数量,销售调拨金额 -- 取得销售系统启用日期 set @chrsaledate = (select isnull(cValue,'1900-01-01') from accinformation where cSysid='Sa' and cName='dStartDate' ) if @chrsaledate <> '' begin if len(ltrim(rtrim(@chrsaledate))) <= 8 set @chrsaledate = convert(varchar(10),convert(smalldatetime,@chrsaledate,2),121)set @chrsaleDate = ' and SalebillVouch.dDate>=''' + @chrsaledate + ''''end --计算本期销售数据 set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , cdepcode as caccdep ,0 as qc_iQuantity , 0 as qc_imoney ,0 as iQuantityCG , 0 as iMoneyCG , 0 as iQuantityZG, 0 as iMoneyZG , 0 as iQuantityQTRK , 0 as iMoneyQTRK , iQuantity as iQuantityXS , iNatSum as iMoneyXS , 0 as iQuantityQTCK , 0 as iMoneyQTCK , case when cvouchtype = ''28'' then iQuantity else 0 end as iQuantityDB , case when cvouchtype =''28'' then iNatMoney else 0 end as iMoneyDB ,iNatMoney as iMoneySR , 0 as iQuantityCK , 0 as iMoneyCB , Salebillvouchs.cWhcode From Salebillvouchs inner join Salebillvouch on salebillvouchs.sbvid = salebillvouch.sbvid where isnull(Salebillvouch.cinvalider ,'''')='''' ' + @chrsaledate --增加审核条件 if ltrim(rtrim(@chrchecker)) <> '' and not (@chrchecker is null ) set @chrsql = @chrsql + ' and ' + @chrchecker --增加开始日期条件 if ltrim(rtrim(@chrstartdate)) <> '' and not (@chrstartdate is null ) -- 2003.12.5 丁德安--set @chrsql = @chrsql + ' and ddate >''' + @chrstartdate + ''''set @chrsql = @chrsql + ' and ddate >=''' + @chrstartdate + ''''--增加结束日期条件 if ltrim(rtrim(@chrenddate )) <> '' and not (@chrenddate is null )set @chrsql = @chrsql + ' and ddate <=''' + @chrenddate + '''' --增加一般条件 if ltrim(rtrim(@chrwhere)) <> '' and not (@chrwhere is null )set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cdepCode ' + @chrdep --加入仓库条件 if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and Salebillvouchs.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec (@chrsql )--本期收入计算终止 --2.4 统计本期销售成本,销售收入,出库数量 set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , caccdep ,0 as qc_iQuantity , 0 as qc_imoney ,0 as iQuantityCG , 0 as iMoneyCG , 0 as iQuantityZG, 0 as iMoneyZG , 0 as iQuantityQTRK , 0 as iMoneyQTRK , 0 as iQuantityXS , 0 as iMoneyXS , case when cvoutype =''09'' or cvoutype =''11'' or (cvoutype = ''21'' and bSale = 0 ) then iAoutQuantity else 0 end as iQuantityQTCK , case when cvoutype =''09'' or cvoutype =''11'' or (cVoutype =''21'' and bSale = 0 ) then iAoutPrice else 0 end as iMoneyQTCK , 0 as iQuantityDB , 0 as iMoneyDB , 0 as iMoneySR ,case when cvoutype in (''26'',''27'',''28'',''29'',''32'') or ( cvoutype =''21'' and bsale=1) then iAoutQuantity else 0 end as iQuantityCK , case when cvoutype in (''26'',''27'',''28'',''29'',''32'') or ( cvoutype =''21'' and bsale=1) then iAoutPrice else 0 end as iMoneyCB , cwhcode from tempdb..tmp_srmcost Where iMonth > 0 and cvoutype in (''09'',''11'',''21'',''26'',''27'',''28'',''29'',''32'') ' if ltrim(rtrim(@chrstartdate)) <> '' and not (@chrstartdate is null ) set @chrsql = @chrsql + ' and ddate >'''+ @chrstartdate + '''' exec( @chrsql )--3 按存货分类展开处理 /*存货分类按编码级次展开 */declare @chrfieldlist varchar(4000)declare @chrInner varchar (4000)declare @chrbmjc varchar(20)declare @i int declare @n int /*存货分类按编码级次展开 *//*取得存货分类编码级次 */set @chrbmjc = ''set @chrbmjc = (select cValue from accInformation where cName ='cGoodClass')/*连接展开字符串*/set @chrfieldlist = ''set @chrInner = '' set @i =1 set @n = 0 while (@i <= 8 )begin set @n = @n + substring(@chrbmjc,@i,1) /* 分解级次 *//* 组合字段列表 */set @chrfieldlist = @chrfieldlist +'c'+ ltrim(rtrim(str(@i))) + '.cInvCName as cInvCName' + ltrim(rtrim(@i)) +','/* 组合关联 */if (@i <= len(@chrbmjc))begin set @chrinner = @chrinner + ' left join inventoryClass c'+ ltrim(rtrim(str(@i)))+ ' on c'+ ltrim(rtrim(str(@i)))+'.cInvCCode = left( b.cInvCCode,'+ltrim(rtrim(str(@n)))+')'end else begin set @chrinner = @chrinner + ' left join inventoryClass c' + ltrim(rtrim(str(@i)))+ ' on b.cInvCCode = c'+ ltrim(rtrim(str(@i)))+ '.cInvCCode 'end set @i = @i +1 end --4 生成最终的临时表if exists(select name from tempdb..sysobjects where name = @chrtablename ) exec ('drop table tempdb..' + @chrtablename )set @chrsql = 'Select a.* ,Department.cDepName , b.cinvname , b.cinvStd , b.cinvM_Unit ,'+@chrfieldlist +'b.cInvDefine1 , b.cInvDefine2 ,b.cInvDefine3 , 0 as iProfit , 0 as iProfittax, 0 as qm_iQuantity ,0 as qm_iMoney , 0 as iPrice , 0 as iPriceTax ,vendor.cvenname , warehouse.cWhname into tempdb..'+@chrtablename+'from tempdb..tmp_srm a left join inventory b on a.cInvCode = b.cInvCode left join Department on a.caccdep = department.cDepcode left join vendor on b.cvencode = vendor.cvencode left join warehouse on a.cwhcode = warehouse.cwhcode ' + @chrInner exec(@chrsql)
解决方案:
问题原因:软件设计问题,Sa_moveSRMDetail存储过程其日期过滤条件的判断为大于起始日期。 解决方法:查询其他账表并与此两张表对比,发现销售毛利分析中数据是正确的,而进销存统计表数据不对。用SQL跟踪发现进销存统计表是调用存储过程Sa_moveSRMDetail进行数据查询的,仔细分析Sa_moveSRMDetail存储过程,发现其日期过滤条件的判断为大于起始日期,小于等于结束日期,也就是起始日期这一天给舍弃了,导致统计数据不对,改成大于等于起始日期后查询正确。if exists(select * from sysobjects where name='sa_MoveSRMDetail' and type='P')drop PROCEDURE sa_MoveSRMDetailgo-- U821版-- 2003.12.5-- 南京用友 丁德安-- 销售系统中进销存统计表的销售数量、销售收入不等于销售毛利分析中的本期数量和售价影响-- 经分析后发现是起始日期判断条件为'>',应为'>='CREATE PROCEDURE sa_MoveSRMDetail ( @chrtablename varchar (50) = null , @chrWhere varchar (255 ) = null , @chrStartDate varchar(20) = null , @chrendDate varchar(20) = null , @chrChecker varchar(40) = null , @chrDep varchar(50) = null , @chrWareHouse varchar(20) ) ASdeclare @chrsql varchar(4000) declare @chrCost varchar(40) declare @chrSaleDate varchar (50)-- 删除临时表 if exists (select name from tempdb..sysobjects where name ='tmp_srm') drop table tempdb..tmp_srm --删除进销存明细账--1 组织期初数据 --1.1 计算所有发出成本 if exists (select name from tempdb..sysobjects where name ='tmp_srmcost' ) drop table tempdb..tmp_srmcost --删除成本明细 --从成本明细账中取得销售成本和其他出库成本 set @chrsql= ' Select dkeepdate as ddate , cVouType AS cvoutype,cInvcode, cAccDep ,ia_subsidiary.cDepCode, bMoneyFlag, bSale, iMonth , Warehouse.cWhValueStyle AS cWhValueStyle , ia_subsidiary.cWhcode , iAOutQuantity , case when (cWhvaluestyle=''计划价法''or cWhvalueStyle=''售价法'') and bMoneyFlag=1 then isnull(iAOutPrice,0)- isnull(iDebitDifCost,0) + isnull(iCreditDifCost,0) else isnull ( iAOutPrice,0 ) end as iAOutPrice into tempdb..tmp_srmcost from ia_subsidiary inner join warehouse on ia_subsidiary.cwhcode = warehouse.cwhcodewhere brdflag = 0 ' if ltrim(rtrim(@chrwhere )) <> '' and not ( @chrwhere is null ) set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cAccdep ' + @chrdep if ltrim(rtrim(@chrenddate )) <> '' and not (@chrenddate is null ) set @chrsql = @chrsql + ' and dkeepdate<='''+ @chrenddate +''''if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and ia_subsidiary.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec (@chrsql )--计算非自填成本 set @chrCost=(SELECT cValue FROM AccInformation WHERE (cSysID = 'ia') AND (cName = 'cvaluestyle')) if @chrCost ='按部门核算'begin update tempdb..tmp_srmcost set tempdb..tmp_srmcost.iAOutPrice=case when (tempdb..tmp_srmcost.cWhvalueStyle='售价法' ) then tempdb..tmp_srmcost.iAoutPrice*(1 - isnull(ia_summary.iDifRate,0)) else tempdb..tmp_srmcost.iAoutPrice*(1 + isnull(ia_summary.iDifRate,0)) end from tempdb..tmp_srmcost inner join ia_summary on tempdb..tmp_srmcost.iMonth = ia_summary.iMonth and tempdb..tmp_srmcost.cDepCode = ia_summary.cDepCode and tempdb..tmp_srmcost.cInvCode = ia_summary.cInvCode where (tempdb..tmp_srmcost.cWhvaluestyle='计划价法'or tempdb..tmp_srmcost.cWhvalueStyle='售价法') and tempdb..tmp_srmcost.bMoneyFlag=0 and tempdb..tmp_srmcost.bSale<> 1 endelse begin update tempdb..tmp_srmcost set tempdb..tmp_srmcost.iAOutPrice=case when (tempdb..tmp_srmcost.cWhvalueStyle='售价法' ) then tempdb..tmp_srmcost.iAoutPrice*(1 - isnull(ia_summary.iDifRate,0)) else tempdb..tmp_srmcost.iAoutPrice*(1 + isnull(ia_summary.iDifRate,0)) end from tempdb..tmp_srmcost inner join ia_summary on tempdb..tmp_srmcost.iMonth = ia_summary.iMonth and tempdb..tmp_srmcost.cWhCode = ia_summary.cWhCode and tempdb..tmp_srmcost.cInvCode = ia_summary.cInvCode where (tempdb..tmp_srmcost.cWhvaluestyle='计划价法'or tempdb..tmp_srmcost.cWhvalueStyle='售价法') and tempdb..tmp_srmcost.bMoneyFlag=0 and tempdb..tmp_srmcost.bSale<> 1 end--完成成本计算所有的出库成本保存在临时文件 tempdb..tmp_srccost中 --1.3计算期初入库金额 --创建临时表tmp_srm保存查询统计的临时结果 --临时表结构 存货编号 ,部门编号 ,期初数量,期初金额,采购数量,采购金额 -- 暂诂数量,暂诂金额,其他入库数量,其他入库金额,销售数量 -- 销售金额,其他出库数量,其他出库金额,调拨数量,调拨金额 -- 收入金额,出库数量,成本 set @chrsql = 'Select cInvCode , caccdep ,iAinQuantity as qc_iQuantity , (iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) ) as qc_imoney ,(iAinPrice - iAinPrice) as iQuantityCG , (iAinPrice - iAinPrice) as iMoneyCG , (iAinPrice - iAinPrice) as iQuantityZG, (iAinPrice - iAinPrice) as iMoneyZG , (iAinPrice - iAinPrice) as iQuantityQTRK , (iAinPrice - iAinPrice) as iMoneyQTRK , (iAinPrice - iAinPrice) as iQuantityXS , (iAinPrice - iAinPrice) as iMoneyXS , (iAinPrice - iAinPrice) as iQuantityQTCK , (iAinPrice - iAinPrice) as iMoneyQTCK , (iAinPrice - iAinPrice) as iQuantityDB , (iAinPrice - iAinPrice) as iMoneyDB ,(iAinPrice - iAinPrice) as iMoneySR , (iAinPrice - iAinPrice) as iQuantityCK , (iAinPrice - iAinPrice) as iMoneyCB ,cwhcode into tempdb..tmp_srm from ia_subsidiary 'if ltrim(rtrim(@chrstartdate)) = '' or @chrstartdate is null begin --无期初日期时只计算上年结转 set @chrsql = @chrsql + ' where iMonth=0 and brdflag = 1 and cVoutype <>''33'' 'end else begin--有期初日期时的情况 set @chrsql = @chrsql + ' where brdflag = 1 and ( (iMonth = 0 and cVoutype <>''33'' ) or dkeepdate <='''+@chrstartdate +''' and ( cVoutype in (''01'',''24'',''30'',''08'',''20'',''22'',''10'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) ) ) 'end --加入日期和部门条件 if ltrim(rtrim(@chrwhere )) <> '' and not (@chrwhere is null ) set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cAccdep ' + @chrdep --加入仓库条件 if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and ia_subsidiary.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec ( @chrsql )--1.2 生成期初出库成本 if ltrim(rtrim(@chrstartdate)) <> '' and not ( @chrstartdate is null ) begin --如果无期初日期不应该计算期初发出内容 set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , caccdep ,- iAoutQuantity as qc_iQuantity , - iAoutPrice as qc_imoney ,0 as iQuantityCG , 0 as iMoneyCG , 0 as iQuantityZG, 0 as iMoneyZG , 0 as iQuantityQTRK , 0 as iMoneyQTRK , 0 as iQuantityXS , 0 as iMoneyXS , 0 as iQuantityQTCK , 0 as iMoneyQTCK , 0 as iQuantityDB , 0 as iMoneyDB ,0 as iMoneySR , 0 as iQuantityCK , 0 as iMoneyCB , cWhcode from tempdb..tmp_srmcost where cvoutype in (''09'',''11'',''21'',''26'',''27'',''28'',''29'',''32'') 'set @chrsql = @chrsql + ' and ddate <=''' + @chrstartdate + '''' exec(@chrsql )end --完成期初数据的准备 --2 组织本期数据 --2.1 统计本期采购入库数据:采购入库数量,采购入库金额,暂诂入库数量,暂诂入库金额,其它入库数量,其他入库金额set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , caccdep ,0 as qc_iQuantity ,0 as qc_imoney ,case when cvoutype in(''01'',''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinQuantity else 0end iQuantityCG , case when cvoutype in(''01'',''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) else 0end as iMoneyCG , case when ( cvoutype = ''01'' and bflag = 1 ) or cvoutype in(''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinQuantity else 0end as iQuantityZG, case when ( cvoutype = ''01'' and bflag = 1 ) or cvoutype in(''24'',''30'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) then iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) else 0end as iMoneyZG , case when cVoutype in (''08'',''20'',''22'',''10'') then iAinQuantity else 0 end as iQuantityQTRK , case when cVoutype in (''08'',''20'',''22'',''10'') then iAinPrice + isnull( iDebitDifCost,0) -isnull(iCreditDifCost,0) else 0 end as iMoneyQTRK , 0 as iQuantityXS , 0 as iMoneyXS , 0 as iQuantityQTCK , 0 as iMoneyQTCK , 0 as iQuantityDB , 0 as iMoneyDB ,0 as iMoneySR , 0 as iQuantityCK , 0 as iMoneyCB , cWhcode from ia_subsidiary Where bRdflag = 1 and iMonth > 0 and ( cVoutype in (''01'',''24'',''30'',''08'',''20'',''22'',''10'') or (cvoutype =''20'' and cbustype=''暂估报销'' ) ) '--追加开始日期条件 if ltrim(rtrim(@chrstartdate)) <> '' and not ( @chrstartdate is null ) set @chrsql = @chrsql + ' and dkeepdate>''' + @chrstartdate + ''''--追加结束日期条件 if ltrim(rtrim(@chrenddate)) <> ''and not ( @chrenddate is null ) set @chrsql = @chrsql + ' and dkeepdate<=''' + @chrenddate + ''''--追加其他条件 if ltrim(rtrim(@chrwhere)) <> '' and not @chrwhere is null set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cAccdep ' + @chrdep --加入仓库条件 if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and ia_subsidiary.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec(@chrsql ) --end 本期采购部分计算结束 --2.3 统计本期销售数量,销售金额,销售调拨数量,销售调拨金额 -- 取得销售系统启用日期 set @chrsaledate = (select isnull(cValue,'1900-01-01') from accinformation where cSysid='Sa' and cName='dStartDate' ) if @chrsaledate <> '' begin if len(ltrim(rtrim(@chrsaledate))) <= 8 set @chrsaledate = convert(varchar(10),convert(smalldatetime,@chrsaledate,2),121)set @chrsaleDate = ' and SalebillVouch.dDate>=''' + @chrsaledate + ''''end --计算本期销售数据 set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , cdepcode as caccdep ,0 as qc_iQuantity , 0 as qc_imoney ,0 as iQuantityCG , 0 as iMoneyCG , 0 as iQuantityZG, 0 as iMoneyZG , 0 as iQuantityQTRK , 0 as iMoneyQTRK , iQuantity as iQuantityXS , iNatSum as iMoneyXS , 0 as iQuantityQTCK , 0 as iMoneyQTCK , case when cvouchtype = ''28'' then iQuantity else 0 end as iQuantityDB , case when cvouchtype =''28'' then iNatMoney else 0 end as iMoneyDB ,iNatMoney as iMoneySR , 0 as iQuantityCK , 0 as iMoneyCB , Salebillvouchs.cWhcode From Salebillvouchs inner join Salebillvouch on salebillvouchs.sbvid = salebillvouch.sbvid where isnull(Salebillvouch.cinvalider ,'''')='''' ' + @chrsaledate --增加审核条件 if ltrim(rtrim(@chrchecker)) <> '' and not (@chrchecker is null ) set @chrsql = @chrsql + ' and ' + @chrchecker --增加开始日期条件 if ltrim(rtrim(@chrstartdate)) <> '' and not (@chrstartdate is null ) -- 2003.12.5 丁德安--set @chrsql = @chrsql + ' and ddate >''' + @chrstartdate + ''''set @chrsql = @chrsql + ' and ddate >=''' + @chrstartdate + ''''--增加结束日期条件 if ltrim(rtrim(@chrenddate )) <> '' and not (@chrenddate is null )set @chrsql = @chrsql + ' and ddate <=''' + @chrenddate + '''' --增加一般条件 if ltrim(rtrim(@chrwhere)) <> '' and not (@chrwhere is null )set @chrsql = @chrsql + ' and ' + @chrwhere if ltrim(rtrim(@chrdep )) <> '' and not ( @chrdep is null ) set @chrsql = @chrsql + ' and cdepCode ' + @chrdep --加入仓库条件 if ltrim(rtrim(@chrWareHouse)) <> '' and not (@chrWareHouse is null ) set @chrsql = @chrsql +' and Salebillvouchs.cwhcode='''+ ltrim(rtrim(@chrWareHouse)) +''''exec (@chrsql )--本期收入计算终止 --2.4 统计本期销售成本,销售收入,出库数量 set @chrsql = 'insert into tempdb..tmp_srm Select cInvCode , caccdep ,0 as qc_iQuantity , 0 as qc_imoney ,0 as iQuantityCG , 0 as iMoneyCG , 0 as iQuantityZG, 0 as iMoneyZG , 0 as iQuantityQTRK , 0 as iMoneyQTRK , 0 as iQuantityXS , 0 as iMoneyXS , case when cvoutype =''09'' or cvoutype =''11'' or (cvoutype = ''21'' and bSale = 0 ) then iAoutQuantity else 0 end as iQuantityQTCK , case when cvoutype =''09'' or cvoutype =''11'' or (cVoutype =''21'' and bSale = 0 ) then iAoutPrice else 0 end as iMoneyQTCK , 0 as iQuantityDB , 0 as iMoneyDB , 0 as iMoneySR ,case when cvoutype in (''26'',''27'',''28'',''29'',''32'') or ( cvoutype =''21'' and bsale=1) then iAoutQuantity else 0 end as iQuantityCK , case when cvoutype in (''26'',''27'',''28'',''29'',''32'') or ( cvoutype =''21'' and bsale=1) then iAoutPrice else 0 end as iMoneyCB , cwhcode from tempdb..tmp_srmcost Where iMonth > 0 and cvoutype in (''09'',''11'',''21'',''26'',''27'',''28'',''29'',''32'') ' if ltrim(rtrim(@chrstartdate)) <> '' and not (@chrstartdate is null ) set @chrsql = @chrsql + ' and ddate >'''+ @chrstartdate + '''' exec( @chrsql )--3 按存货分类展开处理 /*存货分类按编码级次展开 */declare @chrfieldlist varchar(4000)declare @chrInner varchar (4000)declare @chrbmjc varchar(20)declare @i int declare @n int /*存货分类按编码级次展开 *//*取得存货分类编码级次 */set @chrbmjc = ''set @chrbmjc = (select cValue from accInformation where cName ='cGoodClass')/*连接展开字符串*/set @chrfieldlist = ''set @chrInner = '' set @i =1 set @n = 0 while (@i <= 8 )begin set @n = @n + substring(@chrbmjc,@i,1) /* 分解级次 *//* 组合字段列表 */set @chrfieldlist = @chrfieldlist +'c'+ ltrim(rtrim(str(@i))) + '.cInvCName as cInvCName' + ltrim(rtrim(@i)) +','/* 组合关联 */if (@i <= len(@chrbmjc))begin set @chrinner = @chrinner + ' left join inventoryClass c'+ ltrim(rtrim(str(@i)))+ ' on c'+ ltrim(rtrim(str(@i)))+'.cInvCCode = left( b.cInvCCode,'+ltrim(rtrim(str(@n)))+')'end else begin set @chrinner = @chrinner + ' left join inventoryClass c' + ltrim(rtrim(str(@i)))+ ' on b.cInvCCode = c'+ ltrim(rtrim(str(@i)))+ '.cInvCCode 'end set @i = @i +1 end --4 生成最终的临时表if exists(select name from tempdb..sysobjects where name = @chrtablename ) exec ('drop table tempdb..' + @chrtablename )set @chrsql = 'Select a.* ,Department.cDepName , b.cinvname , b.cinvStd , b.cinvM_Unit ,'+@chrfieldlist +'b.cInvDefine1 , b.cInvDefine2 ,b.cInvDefine3 , 0 as iProfit , 0 as iProfittax, 0 as qm_iQuantity ,0 as qm_iMoney , 0 as iPrice , 0 as iPriceTax ,vendor.cvenname , warehouse.cWhname into tempdb..'+@chrtablename+'from tempdb..tmp_srm a left join inventory b on a.cInvCode = b.cInvCode left join Department on a.caccdep = department.cDepcode left join vendor on b.cvencode = vendor.cvencode left join warehouse on a.cwhcode = warehouse.cwhcode ' + @chrInner exec(@chrsql)
- 经常出现账套年度演示期限已到期,怎么办?
- 麻烦问下,T3升级T6,是不是要先安装6.1,用工具升级,再导出帐套,安装6.5,再升级到6.5?
- 麻烦问下,账簿交接怎么操作
- 麻烦问下:增值税普票次月开了负数发票,做账时是否都要把财务联和发票联附在记账凭证后,另外当月作废的增值税普票怎么处理呢?谢谢!
- 黄色的加密狗驱动不了,在服务社区下载的驱动安装后也是不行,win2003的系统
- 黄色部分的最新成本错了,如何修改
- (-0.2)的2009次方乘(-5)的2010次方
- (时间是11点多的时候还没吃饭)体育考试立定跳远 和跑完50米后 然后走20几分钟去车站搭车
- ,小额纳税企业在营业大厅开增值税专用发票税点是多少
- 1。T3升级上来,增加了 人事管理模块 ,加密狗刷新了 薪资管理还是系那是演示版……--2.还有就是 登录进去经常会出现登录子系统失败,退出再登录进去就行-请教
T3标准版10.8PLUSH1打了2016年5月的最新补丁了,但是在备份的时候还是提示:【Microsoft][ODBC SQL Server Driver][SQL Server] -2147220681 T3标准版10.8PLUSH1打了2016年5月的最新补丁了,但是在备份的时候还是提示:【Microsoft][ODBC SQL Server Driver][SQL Server] -2147220681[]
软件也卸载重装过了还是不行。这个应该是数据库坏了,用数据库修复工具修复一下试试