找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 348|回复: 0

T6单据新打印数据顺序错乱

[复制链接]
发表于 2018-10-9 16:05:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
T6单据新打印数据顺序错乱    魏雯
【问题现象】业务单据使用新打印,表体存货顺序错乱,见下图:

                               
登录/注册后可看大图

【问题分析】软件前台没有新打印顺序设置功能节点,一般新打印顺序是按照录入顺序,不会错乱,考虑是存储过程异常导致的。
【解决方案】备份好账套数据,使用事件跟踪器查询正常账套在新打印预览时的存储过程,在查询分析器中针对问题账套执行即可。以下以销售出库单新打印表体顺序错乱为例:
1.备份好账套数据,进入软件,打开销售出库单,点击打印-新设计,将新打印模板打开,使用事件跟踪器查询正常账套在打开新打印模板时的存储过程:

                               
登录/注册后可看大图

2. 进入查询分析器执行查看存储过程的命令:sp_helptext newprint_SaleOutVouch_body

                               
登录/注册后可看大图

3.在查询分析器中针对问题账套执行以下语句:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
alter  PROCEDURE [dbo].[NewPrint_SaleOutVouch_Body]      
@parm varchar(100) ,@user varchar(100)  ,@cardnumber varchar(100), @cardsection varchar (100)   
AS   
begin   
declare @strname varchar(4000)  
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)  
exec('SELECT '+@strname+' from KCSaleOutB where id='''+@parm+'''' +'order by autoid')      
--select * from KCSaleOutB where id=@parm  order by AutoID  
end  
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO


                               
登录/注册后可看大图

PS:语句中红色字体是需要自己在执行语句时加入的,“order by autoid”的意思是按照录入顺序自动排序,也可以根据自己的个性化要求进行排序,比如根据存货编码排序加“order by cInvCode”。
附件:以下附各单据的存储过程模块
单据
存储过程
采购
采购请购单
CREATE PROCEDURE [dbo].[NewPrint_PU_AppVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from pu_AppHead with(nolock) where id='''+@parm+'''')
--select * from pu_AppHead where id=@parm

end
采购订单
采购订单存储过程
--采购订单
CREATE PROCEDURE [dbo].[NewPrint_PurOrder_body]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+',ginvpicture from zpurpotail with(nolock)
left join (select cinvcode as piccode,ginvpicture from InventoryPicture where cpictype is not null) as A on A.piccode=zpurpotail.cInvCode where poid='''+@parm+'''')
--SELECT * from zpurpotail where poid=@parm

end
采购到货单
采购到货单存储过程
CREATE PROCEDURE [dbo].[NewPrint_PU_ArrivalVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from pu_ArrHead with(nolock) where id='''+@parm+'''')
--select * from pu_ArrHead where id=@parm

end

采购入库单
采购入库单存储过程
--采购入库单
CREATE PROCEDURE [dbo].[NewPrint_VoucherRD_Body]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+',ginvpicture from zpurRkdTail with(nolock)
left join (select cinvcode as gpiccode,ginvpicture from InventoryPicture where cpictype is not null) A on A.gpiccode=zpurRkdTail.cinvcode where id='''+@parm+'''' )

--SELECT * from zpurRkdTail where id=@parm
end

专用采购发票
CREATE PROCEDURE [dbo].[NewPrint_zhpurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from zhpurBillHead with(nolock) where pbvid='''+@parm+'''' )
--select * from zhpurBillHead where pbvid=@parm

end
红字专用采购发票
CREATE PROCEDURE [dbo].[NewPrint_zhpurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from zhpurBillHead with(nolock) where pbvid='''+@parm+'''' )
--select * from zhpurBillHead where pbvid=@parm

end
普通采购发票
CREATE PROCEDURE [dbo].[NewPrint_PpurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from PpurBillHead with(nolock) where pbvid='''+@parm+'''')
--select * from PpurBillHead where pbvid=@parm

end
红字普通采购发票
CREATE PROCEDURE [dbo].[NewPrint_PpurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from PpurBillHead with(nolock) where pbvid='''+@parm+'''')
--select * from PpurBillHead where pbvid=@parm

end
采购普通运费发票
CREATE PROCEDURE [dbo].[NewPrint_YpurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from YpurBillHead with(nolock) where pbvid='''+@parm+'''' )
--select * from YpurBillHead where pbvid=@parm

end
采购专用运费发票

Create PROCEDURE [dbo].[NewPrint_Z_YPurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from zypurBillhead with(nolock) where pbvid='''+@parm+'''' )


end
红字采购普通运费发票
CREATE PROCEDURE [dbo].[NewPrint_YpurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from YpurBillHead with(nolock) where pbvid='''+@parm+'''' )
--select * from YpurBillHead where pbvid=@parm

end
红字采购专用运费发票

Create PROCEDURE [dbo].[NewPrint_Z_YPurBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from zypurBillhead with(nolock) where pbvid='''+@parm+'''' )


end
采购检验单
采购检验单存储过程
CREATE PROCEDURE [dbo].[NewPrint_QM_NCV10Vouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from QM_NCV10_H with(nolock) where id='''+@parm+'''')
--select * from QM_NCV10_H where id=@parm

end
销售
销售报价单
销售报价单
CREATE PROCEDURE [dbo].[NewPrint_SA_QuoVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from SA_QuoHead with(nolock) where id='''+@parm+'''' )
--select * from SA_QuoHead where id=@parm

end
样品接单管理
样品接单管理
CREATE PROCEDURE [dbo].[NewPrint_SA_ManageSampleVouch_body]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from SA_ManageSample_V with(nolock) where iautoid='''+@parm+'''' )
--SELECT * from SA_ManageSample_V where iautoid=@parm

end
销售订单
销售订单存储过程
CREATE PROCEDURE [dbo].[NewPrint_SaleOrder_Title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from SaleOrderQ with(nolock) where id='''+@parm+'''' )
--select * from SaleOrderQ where id=convert(int,@parm)
end
发货单
发货单存储过程
CREATE PROCEDURE [dbo].[NewPrint_Dispvch_Title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from Sales_FHD_T with(nolock) where DLID='''+@parm+'''')
--select * from Sales_FHD_T where DLID=@parm
end

退货单
退货单存储过程
CREATE PROCEDURE [dbo].[newprint_ReDispatchList_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from Sales_FHD_T with(nolock) where dlid='''+@parm+'''' )
--select * from Sales_FHD_T where dlid=@parm

end
销售专用发票
销售专用发票存储过程
CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouch_body]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from SaleBillVouchZW with(nolock) where sbvid='''+@parm+'''' )
--SELECT * from SaleBillVouchZW where sbvid=@parm

end
红字专用销售发票
CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from SaleBillVouchZT with(nolock) where sbvid='''+@parm+'''' )
--select * from SaleBillVouchZT where sbvid=@parm

end

销售普通发票
销售普通发票存储过程
CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouch_body]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from SaleBillVouchZW with(nolock) where sbvid='''+@parm+'''' )
--SELECT * from SaleBillVouchZW where sbvid=@parm

end
红字普通销售发票
CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouch_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from SaleBillVouchZT with(nolock) where sbvid='''+@parm+'''' )
--select * from SaleBillVouchZT where sbvid=@parm

end

委托代销发货单
委托代销发货单
CREATE PROCEDURE [dbo].[NewPrint_Sales_DXFH_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from Sales_DXFH_T with(nolock) where dlid='''+@parm+'''' )
--select * from Sales_DXFH_T where dlid=@parm

end
委托代销发货退回单
委托代销发货退回单
CREATE PROCEDURE [dbo].[NewPrint_Sales_DXFH_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from Sales_DXFH_T with(nolock) where dlid='''+@parm+'''' )
--select * from Sales_DXFH_T where dlid=@parm

end

委托代销结算单
委托代销结算单
CREATE PROCEDURE [dbo].[NewPrint_Sales_DXJS_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from Sales_DXJS_T with(nolock) where id='''+@parm+'''' )
--select * from Sales_DXJS_T where id=@parm

end

委托代销结算退回单
CREATE PROCEDURE [dbo].[NewPrint_Sales_DXJS_title]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsection)
exec('SELECT '+@strname+' from Sales_DXJS_T with(nolock) where id='''+@parm+'''' )
--select * from Sales_DXJS_T where id=@parm

end

委托代销调整单
CREATE PROCEDURE [dbo].[NewPrint_Sales_DXFH_body]
@parm varchar(100) ,@user varchar(100) ,@cardnumber varchar(100), @cardsection varchar (100)
AS
begin
declare @strname varchar(4000)
set @strname=dbo.NPrint_GetFldName(@user,@cardnumber,@cardsecti
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-11-24 19:00 , Processed in 0.056848 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表