累计折旧总账里面出现如下问题
2018-6-2 0:0:0 用友T1小编累计折旧总账里面出现如下问题
累计折旧总账里面出现如下问题点下还原按钮试试@qq37724861:[/强]
如果您的问题还没有解决,可以到 T+搜索>>上找一下答案
相关阅读
- 麻烦问下,T3升级T6,是不是要先安装6.1,用工具升级,再导出帐套,安装6.5,再升级到6.5?2018-6-8 0:0:0
- 麻烦问下,账簿交接怎么操作2018-6-8 0:0:0
- 麻烦问下:增值税普票次月开了负数发票,做账时是否都要把财务联和发票联附在记账凭证后,另外当月作废的增值税普票怎么处理呢?谢谢!2018-6-8 0:0:0
- 黄色的加密狗驱动不了,在服务社区下载的驱动安装后也是不行,win2003的系统2018-6-8 0:0:0
- 黄色部分的最新成本错了,如何修改2018-6-8 0:0:0
- (-0.2)的2009次方乘(-5)的2010次方2018-6-8 0:0:0
- (时间是11点多的时候还没吃饭)体育考试立定跳远 和跑完50米后 然后走20几分钟去车站搭车2018-6-8 0:0:0
- ,小额纳税企业在营业大厅开增值税专用发票税点是多少2018-6-8 0:0:0
- 1。T3升级上来,增加了 人事管理模块 ,加密狗刷新了 薪资管理还是系那是演示版……--2.还有就是 登录进去经常会出现登录子系统失败,退出再登录进去就行-请教2018-6-8 0:0:0
- T+怎么把停用的员工永久显示出来2018-6-8 0:0:0
最新信息
- 还没开票的做到预收科目,那成本可以先做进去吗?
- 进入总账提示所选行业性质与科目不相符,去检查表提示数据库严重损坏,修复数据提示成功,再去检测又是严重错误
- 进入总账正常,打开报表,选择报表文件,提示正在使用或被锁定。另存为后,打开正常,但是点打印时提示内容如图。点确定,重新进入财务报表时就提示报表为试用版。重新打补丁后又可以进入,还是一样问题循环。求解??
- 进入报表系统显示
- 进入界面提示:请使用系统维护工具修复数据库:k:-记账宝-zwset.mdb! 是4G的 _0
- 进入系统是提示无法连接服务器
- 进入财务报表模块,总是提示当前运行的是试用版 ,多次注册了还有提示。-报表最多追加4页,-报表不能打印,总是保存下来在打印。-财务报表数据不准,,有时候对,有时候不对,
- 进入账套后,点击编制凭证,出现动态库JZBComp.dll加载失败,点确定,记账宝就退出了。怎么办?我的邮箱为<span class="__cf_email__" data-cfemail="b381858385808385878184f3c2c29dd0dcde">[email protected]</span>
- 进入软件总是要密码,但是在安装数据库的时候没有密码。
- 进入软件提示这个问题 11.5的版本 打了最新补丁。已经成功注册。
不是“受益所有人”能享受优惠待遇吗? 不是“受益所有人”能享受优惠待遇吗?
某外商企业根据董事会决议分配2010年度税后利润,按投资比例向香港某投资有限公司支付红利。在代扣代缴预提所得税时,香港某投资有限公司提出享受《内地和香港特别行政区关于对所得避免双重征税和防止偷漏税的安排》5%优惠税率待遇。
根据《关于下发协定股息税率情况一览表的通知》(国税函[2008]112号)规定:2008年1月1日起,非居民企业从我国居民企业获得的股息将按照10%的税率征收预提所得税。但是,我国政府同外国政府订立的关于对所得避免双重征税和防止偷漏税的协定以及内地与香港、澳门间的安排(以下统称“协定”),与国内有不同规定的,依照协定的规定办理。
用友计提完成,在生成折旧分配表时跳出,提示失败计提完成,在生成折旧分配表时跳出,提示失败
|
收款单不能删除 收款单不能删除
问题号: | 24073 |
---|---|
适用产品: | 用友T3-用友通 |
软件版本: | 用友T3—业务通专业版11.0(限量 |
软件模块: | 销售管理 |
问题名称: | 收款单不能删除 |
问题现象: | 收款单不能删除,收款单界面中的删除按钮是置灰的;在应收明细账中也查不到这张收款单。 |
问题原因: | - |
关键字: | |
解决方案: | 原因:收款单是由销货单现结生成的,在收款单界面不能删除。并且现结时是不写应收账的,所以在应收明细账中查不到该笔记录。 |
征期内已经申报增值税,但是银行划款没有成功,今天补缴了,并交了滞纳金十几元,我想请教,滞纳金这部分要走营业外支出吗,以前没有过这种情况,出现滞纳金是不是很严重,有什么补救办法吗? 征期内已经申报增值税,但是银行划款没有成功,今天补缴了,并交了滞纳金十几元,我想请教,滞纳金这部分要走营业外支出吗,以前没有过这种情况,出现滞纳金是不是很严重,有什么补救办法吗?[]
不严重,走营业外支出就行,所得税汇算清缴时记得调增。走营业外支出,不清楚楼上说的汇算清缴时调增具体做法麻烦给解释下呗谢谢就是说滞纳金不能税前扣除,要全额调增计征企业所得税!就是说滞纳金不能税前扣除,要全额调增计征企业所得税!就是说滞纳金不能税前扣除,要全额调增计征企业所得税!
- 经常出现账套年度演示期限已到期,怎么办?
- 麻烦问下,T3升级T6,是不是要先安装6.1,用工具升级,再导出帐套,安装6.5,再升级到6.5?
- 麻烦问下,账簿交接怎么操作
- 麻烦问下:增值税普票次月开了负数发票,做账时是否都要把财务联和发票联附在记账凭证后,另外当月作废的增值税普票怎么处理呢?谢谢!
- 黄色的加密狗驱动不了,在服务社区下载的驱动安装后也是不行,win2003的系统
- 黄色部分的最新成本错了,如何修改
- (-0.2)的2009次方乘(-5)的2010次方
- (时间是11点多的时候还没吃饭)体育考试立定跳远 和跑完50米后 然后走20几分钟去车站搭车
- ,小额纳税企业在营业大厅开增值税专用发票税点是多少
- 1。T3升级上来,增加了 人事管理模块 ,加密狗刷新了 薪资管理还是系那是演示版……--2.还有就是 登录进去经常会出现登录子系统失败,退出再登录进去就行-请教
农业企业车船使用税的纳税辅导——车船使用税的征收 农业企业车船使用税的纳税辅导——车船使用税的征收
一、车船使用税的纳税地点
按照规定,车船使用税,由纳税人在其所在地向当地税务机关缴纳。“纳税人所在地”,对单位是指经营所在地或机构所在地。
二、车船使用税的纳税期限
按照规定,车船使用税按年征收,分期交纳。纳税期限由省、自治区、直辖市人民政府确定,一般原则为按季或半年征收。
三、车船使用税的纳税申报
纳税人提起税务行政复议需要哪些条件 纳税人提起税务行政复议需要哪些条件
【问题】
人就争议提起行政复议,要先缴纳税款或提供纳税担保,否则就会失去申请复议的资格。请问,这样的要求是否公平?
【解答】
《征管法》第八十八条第一项,将缴纳税款或者提供纳税担保作为提起行政复议的前置条件,是出于在依法纳税的前提下,兼顾各方利益的综合考虑。主要原因:一是若不设定前置条件,纳税人可以就任意一笔税款申请行政复议,势必增加复议成本,降低税收征管效率,且不能保障国家税款及时入库。二是即使按照行政复议期间具体行政行为不停止执行原则,税务机关有权对纳税人应缴纳的税款及滞纳金采取强制执行措施,势必导致执法成本增加,支出加大,从而间接加重纳税人的负担。三是站在纳税人角度看,确实需要行政复议的,纳税人可以积极采取措施完成该前置条件,并不会影响纳税人保护自己的合法权益。四是对于特殊困难的纳税人,可以通过办理保证、抵押、质押等方式来提供纳税担保。
- 请问:修改制单人后以前做账的制单人不能同步修改吗?以前做好的账的制单人姓名?
- 请问,我们缴纳的税款入库到哪里了?在哪里可以看出入哪个金库了?三方协议上能看出吗?
- 请问,我先前收到一笔货款,不知道是谁付的,借:银行存款,贷:应收账款-未知;现在确认是谁付的后,我该怎样调账
- 请问,我公司是一般纳税人,供应商开给我们的进项名字开错了,已经被我们认证了,但是客户那边作废重开了一张,重开的未认证,这种进项转出要怎么做的?直接做一张红字红冲就可以了么?
- 请问,我看她写的期限是一年,那么一年以后,现在建立的帐套还在么
- 请问,我进项一个东西含税价是62元,税负率算1.2%,进销都是17%的税钱收,卖出去我要卖多少钱才不会亏呢?有公式吗
- 请问,新版的国税季报利润表里,本期金额和上期金额怎么填,取哪个数呢,谢谢
- 请问,用友建账建筑行业行业性质选哪个?
- 请问,财务做帐时后面附的合同必须是原件吗?
- 请问:店铺转让费10万元放在什么科目核算?新店。如果要摊消,几年摊完比较合理。坐得各位高手解答。谢谢。
这个现存量怎么删除啊?望高手指教!谢谢! 这个现存量怎么删除啊?望高手指教!谢谢!
使用现存量整理工具修复。@畅捷支持侯椿寳1976:我整了一上午也不会用哪个现存量整理工具望指教怎么使用工具 登录需要数据库sa密码,并选择指定的账套库。
应税销售额超50万元要申办一般纳税人吗- 应税销售额超50万元要申办一般纳税人吗?
问:应税销售额超50万元要申办一般纳税人吗?
答:新修订的《中华人民共和国增值税暂行条例实施细则》降低了小规模纳税人标准,自2009年1月1日起实施。《国家税务总局关于增值税一般纳税人认定有关问题的通知》(国税函〔2008〕1079号)规定,2009年应税销售额超过新标准的小规模纳税人,应当按照《增值税暂行条例》及其实施细则的有关规定向主管税务机关申请一般纳税人资格认定。而新的《增值税暂行条例实施细则》第二十八条规定的小规模纳税人的标准为从事货物生产或者提供应税劳务的纳税人,以及以从事货物生产或者提供应税劳务为主,并兼营货物批发或者零售的纳税人,年应征增值税销售额在50万元以下的。所以,企业的年应税销售额超过了新规定的小规模纳税人标准,应按新规定向主管税务机关申请一般纳税人资格认定。
- 钱流信息-现金银行收支查询-查询结果的明细列表会出现以下错误:-如果收款单中填写了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普及版2.0升级到T65.0报错提示列名ID不明确(解决办法)用友U8普及版2.0升级到T65.0报错提示列名ID不明确(解决办法)
很多人在用友U8普及版升级的时候会报错,提示列名ID不明确。下面我们就用友U8普及版2.0升级到T65.0报错提示列名ID不明确说一下解决办法。
“数据库名:UFDATA_100_2008
DMRP_U6V31_PP,DMRP_U6V31_PP
错误信息:
-2147217900
列名\'ID\'不明确。“
问题分析及解决方式:
此问题是由于数据库表多列造成,请先执行以下脚本(做好备份工作)
useufdata_002_2005
altertableproductstructuredropcolumnid
altertablePP_MRPDGdropcolumncBomSoCode
altertablepp_rmrpdetailsdropcolumncBomSoCode
然后打开SQLSERVER企业管理器,点击问题帐套数据库,找到PP_ForecastMain表,然后右键该表再选择设计表,找到PP_ForecastMain表中的ID列,右击该列,点击设置主键。此时id字段前面的钥匙就消失了。
最后再对该账套重新升级即可。
- 销售订单,联查都已经没有后续单据了,但是还是一直提示单据已后续执行,不能弃审。
- 销售订单,表头,字段的位置可以移动吗?如何移动控件位置? _0
- 销售费用分摊单,什么情况下适合进行分摊,我方付运费时?还是客户方付运费我方暂时垫付时?
- 销货单已经部分出库,做了出库单,现在想要在不删除出库单的前提下将销货单弃审后修改价格再重新审核能实现吗?还是说一定要把出库单删除后才能够弃审销货单?
- 销售报表上怎么把单据的备注显示出来
- 销售排行榜报表和图表怎么显示
- 销售排行榜统计的数据是扣除退货的吗?
- 销售统计表想某一自定义数值型要显示但不做合计可以吗?
- 销售订单上能不能显示客户应收款?
- 销售订单如何自动带出最新的销售单价?
用友U8.61U8应用服务器配置时,提示错误信息“.NET FRAMWORK MSCORWKS is NOT LOAD-U8.61U8应用服务器配置时,提示错误信息“.NET FRAMWORK MSCORWKS is NOT LOAD"
U8.61-U8应用服务器配置时,提示错误信息“.NET FRAMWORK MSCORWKS is NOT LOAD"
自动编号: | 1660 | 产品版本: | U8.61 |
产品模块: | 系统环境 | 所属行业: | 通用 |
适用产品: | U86x | 关 键 字: | 应用服务器配置 |
问题名称: | U8应用服务器配置时,提示错误信息“.NET FRAMWORK MSCORWKS is NOT LOAD" | ||
问题现象: | 安装U861软件后,组件注册完成后,U8应用服务器配置时,提示错误信息“.NET FRAMWORK MSCORWKS is NOT LOAD",检查操作系统管理工具中的“microsoft .net framework配置“,无法打开进行配置。 | ||
原因分析: | 由于安装U861,U861无法自动创建.NET框架,造成861控件无法注册到.net控件集中。 | ||
解决方案: | 卸载.NET框架,重新手工安装.net framework 1.1版本,再修复U861,问题解决。 温馨提示:如果您的问题还没有解决,欢迎进入用友云基地。 |
用友U8.60服务器上的生产备料数据其他客户端都查询不到U8.60服务器上的生产备料数据其他客户端都查询不到
U8.60-服务器上的生产备料数据其他客户端都查询不到
自动编号: | 13942 | 产品版本: | U8.60 |
产品模块: | 其他 | 所属行业: | 通用 |
适用产品: | 860 | 关 键 字: | 查询 |
问题名称: | 服务器上的生产备料数据其他客户端都查询不到 | ||
问题现象: | 服务器上可以看到生产备料数据,但他所有客户端都查不到 | ||
原因分析: | 其他客户端的电脑名称里都有"-"的特殊字符 | ||
解决方案: | 修改电脑名称重启后就正常了 温馨提示:如果您的问题还没有解决,欢迎进入用友云基地。 |
在必有订单的模式下,红字采购入库单如何参照采购订单来生成? 在必有订单的模式下,红字采购入库单如何参照采购订单来生成?
问题号: | 8366 |
---|---|
解决状态: | 临时解决方案 |
软件版本: | 8.52 |
软件模块: | 库存管理 |
行业: | 通用 |
关键字: | 无法生成红字采购入库单 |
适用产品: | 85系列 |
问题名称: | 在必有订单的模式下,红字采购入库单如何参照采购订单来生成? |
问题现象: | 在必有订单的模式下,红字采购入库单如何参照采购订单来生成? |
问题原因: | 使用问题 |
解决方案: | 在库存管理的采购入库单生单界面点“执行完未关闭的显示”后再点过滤,会把所有的已经生成过入库单但是还没有关闭的采购订单显示出来,在表体直接打入负数即可,这样生成的采购入库单就是红字的采购入库单了 |
补丁编号: | |
录入日期: | 2016-03-16 15:23:45 |
最后更新时间: |
设立独立核算的销售公司节省消费税案例 设立独立核算的销售公司节省消费税案例
规定:征税环节为生产销售环节,(包括生产、委托加工和进口环节),而在以后的商品流通环节(包括批发、零售环节)是不征消费税的(不包括金银首饰)。从2009年8月1日起,白酒生产企业消费税计税价格低于销售单位对外销售价格70%以下的,消费税最低计税价格由机关根据生产规模、白酒品牌、利润水平等情况在销售单位对外销售价格50%至70%范围内自行核定。其中生产规模较大,利润水平较高的企业生产的需要核定消费税最低计税价格的白酒,税务机关核价幅度原则上应选择在销售单位对外销售价格60%至70%范围内。
用友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.还有就是 登录进去经常会出现登录子系统失败,退出再登录进去就行-请教
手机版旺铺助手怎么关闭去电弹屏功能? 手机版旺铺助手怎么关闭去电弹屏功能?
问题号: | 41714 |
---|---|
适用产品: | 其他 |
软件版本: | 其他 |
软件模块: | 支持文档 |
问题名称: | 手机版旺铺助手怎么关闭去电弹屏功能? |
问题现象: | 使用手机版旺铺助手,怎么关闭去电弹屏功能? |
问题原因: | 见问题答案。 |
关键字: | 关闭去电弹屏 |
解决方案: | <P>登录手机版旺铺助手软件里,点击“设置”–“通话弹屏设置”在“设置去电弹屏”处点击关就能关闭去电弹屏功能。</P> |
行业: | 通用 |
补丁编号: | |
解决状态: | 最终解决方案 |
录入日期: | 2016-03-16 15:23:45 |
最后更新时间: |