通2005-发货明细表功能错误

2016/10/13 12:05:21济南用友

通2005-发货明细表功能错误
自动编号:19417产品版本:通2005
产品模块:总账所属行业: 通用
适用产品:关 键 字:
问题名称:发货明细表功能错误
问题现象:发货明细表(按存货查询)不能输出
原因分析:可能是数据库中各表之间有错误
解决方案:执行脚本:
Begin
Declare @cItemName varchar(20) Set @cItemName = (Select cItemName from userDef Where cID = '01') If @cItemName Is Null update rpt_flddef set Name = '自定义项1' where Expression = 'cDefine1' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)')) else update rpt_flddef set Name = @cItemName where Expression = 'cDefine1' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)')) Set @cItemName = (Select cItemName from userDef Where cID = '02') If @cItemName Is Null update rpt_flddef set Name = '自定义项2' where Expression = 'cDefine2' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)')) else update rpt_flddef set Name = @cItemName where Expression = 'cDefine2' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)'))
end
--重新排序
Begin
Declare @ID_Field int Declare @iOrderEx int Set @iOrderEx = 0 Declare Fld_Cur Cursor For Select ID_Field from Rpt_FldDEF Where Id = 1362 And ModeEx = 0 order by OrderEx Open Fld_cur Fetch Next FROM Fld_Cur Into @ID_Field WHILE @@FETCH_STATUS = 0 Begin Set @iOrderEx = @iOrderEx + 1 Update Rpt_FldDef Set OrderEx = @iOrderEx Where Id = 1362 And ModeEx = 0 And ID_Field = @ID_Field Fetch Next FROM Fld_Cur Into @ID_Field End CLOSE Fld_Cur DEALLOCATE Fld_Cur DELETE FROM Rpt_FldDEF Where Id = 1362 And ModeEx = 0 And Expression = 'cDefine22'
End
  • 设为首页
  • 济南用友|
  • 用友畅捷通软件山东济南销售服务中心|
  • 联系我们|
  • 鲁ICP备2021016587号-3
  • Copyright © 2021 山东一友信息科技有限公司