综合排序
最新发布
微信营销与T+12.3对接的步骤及功能【使用微信营销的前提】(1)只有12.3版本才有此功能,软件需要更新12.3最新补丁;(2)【云应用】-【云应用管理】-开通云应用;【对接的步骤】(1)需要点【系统管理】-【账套设置】-【零售/会员】,启用U会员,然在后T+登入界面,左侧才会有微信营销按钮;(2)点开【微信营销】-【U会员】-点右上角【注册】,开通一个U会员账号;(3)开通了U会员账号后,如果需要U会员与T+账套相连接,则需要点【微信营销】-【U会员接口设置】,输入刚注册的账号进行授权,提示授权成功,则表示与T+关联上了。(4)关联成功后,我们还需要在U会员中绑定一个微信公众号,登入U会员-点【设置】-【公众号管理】-【公众号绑定】-选择【订阅号及服务号绑定】,绑定成功后则微信、U会员、T+三者就关联成功了。【与微信营销对接后T+中有那些功能】功能一:线下T+会员实时同步至U会员;(1)在T+中,【会员管理】-【会员】-新增一个会员;(2)新增成功后,再登入U会员,点【会员】-【会员档案】,可以查看到U会员上面,此会员的来源渠道是T+;功能二:线上会员可以同步至T+中,但需要有一定的促发时机;在T+中使用上了U会员的时候,才会同步到线下,比如做销货单表头录U会员录入,或做会员储值的时候都可以同步至T+的会员档案中;功能三:会员的个人微信可以绑定T+中的会员;首先会员的个人微信,需要关注U会员绑定的那个企业公众号;(2)在手机端打开微信,点开刚关注的那个企业公众号,点【会员】-【会员中心】-选择【绑定已有企业】(3)输入T+会员中,会员的手机号,进行绑定;功能四:线上线下积分实时同步(1)查看U会员-【会员】-【会员档案】中可以查看会员的当前积分;(2)登入T+软件,【会员管理】-【会员消费积分明细】;【与微信营销对接后相关注意事项】(1)消费记录单向同步,只是T+的消费记录会实时同步到U会员;(2)T+的会员积分规则、升级政策、兑换规则、积分抵现规则都不会同步至U会员中,U会员的这些记录也不会同步至T+中,需要二方都设置;(3)T+中的会员报表,数据不全:T+中的报表,只是取T+中的数据,不会取线消费的记录,建议客户在U会员中查询;(4)微信营销试用期仅有一个月;(5)U会员企业与T+账套为一对一关系,不支持多个T+账套对应一个U会员企业;(6)启用U会员后,以手机号为唯 一标识、T+不允许手机号重复;(7)启用U会员后,若会员已同步到U会员中,在T+系统中,手机号不可以改,不可注销/取消注销,不可挂失,也不能调整积分,不过可以在U会员中调整;(8)U 会员、T+中密码是分开单独使用的:即线上应用校验的是U会员密码,线下操作校验的是T+中密码;(9)线上注册的 会员,同步到T+后,该会员密码为空、期初积分为0;
T6单据新打印数据顺序错乱 魏雯【问题现象】业务单据使用新打印,表体存货顺序错乱,见下图:【问题分析】软件前台没有新打印顺序设置功能节点,一般新打印顺序是按照录入顺序,不会错乱,考虑是存储过程异常导致的。【解决方案】备份好账套数据,使用事件跟踪器查询正常账套在新打印预览时的存储过程,在查询分析器中针对问题账套执行即可。以下以销售出库单新打印表体顺序错乱为例:1.备份好账套数据,进入软件,打开销售出库单,点击打印-新设计,将新打印模板打开,使用事件跟踪器查询正常账套在打开新打印模板时的存储过程:2. 进入查询分析器执行查看存储过程的命令:sp_helptext newprint_SaleOutVouch_body3.在查询分析器中针对问题账套执行以下语句:SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GOalter 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 GOSET QUOTED_IDENTIFIER OFFGOSET ANSI_NULLS ONGOPS:语句中红色字体是需要自己在执行语句时加入的,“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
T3单据新打印数据顺序错乱 魏雯【问题现象】业务单据使用新打印,存货是按照存货编码顺序录入的,但是新预览时表体存货顺序错乱,见下图:【问题分析】查看演示账套999账套新打印正常,没有表体错乱现象,软件前台没有新打印表体顺序设置功能节点,一般新打印顺序是按照录入顺序,不会错乱,考虑是存储过程异常导致的。【解决方案】备份好账套数据,使用事件跟踪器查询正常账套在新打印预览时的存储过程,在查询分析器中针对问题账套执行即可。以下以采购订单新打印表体顺序错乱为例:1.备份好账套数据,进入软件,打开采购订单,点击打印-新设计,将新打印模板打开,使用事件跟踪器查询正常账套在打开新打印模板时的存储过程:2. 进入查询分析器执行查看存储过程的命令:sp_helptext newprint_PurOrder_body 3.在查询分析器中针对问题账套执行以下语句:SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO--采购订单 alter PROCEDURE [dbo].[NewPrint_PurOrder_body] @parm varchar(100) AS begin SELECT PO_Podetails.ID, PO_Podetails.cPOID, PO_Podetails.cInvCode, Inventory.cInvName, Inventory.cInvAddCode, Inventory.iSafeNum,Inventory.iInvSPrice,Inventory.iInvSCost,Inventory.iInvWeight,Inventory.iVolume,Inventory.iInvRCost, Inventory.iInvBatch,Inventory.iInvAdvance,Inventory.cQuality,Inventory.iInvLSCost,Inventory.iInvMPCost,Inventory.iInvNCost, Inventory.iLowSum,Inventory.itOPSum,Inventory.cPosName,inventory.cVenName, Inventory.cInvStd, PO_Podetails.iQuotedPrice, PO_Podetails.iQuantity, PO_Podetails.iNum, PO_Podetails.iUnitPrice, PO_Podetails.iMoney, PO_Podetails.iTax, PO_Podetails.iSum, PO_Podetails.iDisCount, PO_Podetails.iNatUnitPrice, PO_Podetails.iNatMoney, PO_Podetails.iNatTax, PO_Podetails.iNatSum, PO_Podetails.iNatDisCount, PO_Podetails.dArriveDate, PO_Podetails.cFree2, PO_Podetails.cFree1, Inventory.cInvM_Unit, Inventory.cInvA_Unit, (CASE WHEN (Po_podetails.iNum=0 Or po_podetails.iNum IS NULL) THEN null ELSE po_podetails.iInvExchRate END) AS iInvExchRate, Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3,PO_PoDetails.cDefine22,PO_PoDetails.cDefine23, PO_PoDetails.cDefine24,PO_PoDetails.cDefine25,PO_PoDetails.cDefine26,PO_PoDetails.cDefine27,PO_PoDetails.iPerTaxRate, PO_Podetails.cItemCode,PO_Podetails.cItemName,PO_Podetails.cItem_class,fItem.cItem_Name,PO_Podetails.PPCIds ,po_podetails.iTaxUnitPrice,po_podetails.iTaxNatUnitPrice FROM PO_Podetails LEFT JOIN inventory_pos_ven as inventory ON PO_Podetails.cInvCode = Inventory.cInvCode LEFT JOIN fItem ON PO_Podetails.cItem_Class=fItem.cItem_Class where PO_Podetails.cPOID = @parm order by PO_Podetails.ID end GOSET QUOTED_IDENTIFIER OFFGOSET ANSI_NULLS ONGOPS:语句中红色字体是需要自己在执行语句时加入修改的,“order by PO_Podetails.ID”的意思是按照录入顺序自动排序,也可以根据自己的个性化要求进行排序,比如根据存货编码排序加“order by cInvCode”。附件:以下附各单据的存储过程模块单据存储过程采购采购订单采购订单 Create PROCEDURE [dbo].[NewPrint_PurOrder_body] @parm varchar(100) AS begin SELECT PO_Podetails.ID, PO_Podetails.cPOID, PO_Podetails.cInvCode, Inventory.cInvName, Inventory.cInvAddCode, Inventory.iSafeNum,Inventory.iInvSPrice,Inventory.iInvSCost,Inventory.iInvWeight,Inventory.iVolume,Inventory.iInvRCost, Inventory.iInvBatch,Inventory.iInvAdvance,Inventory.cQuality,Inventory.iInvLSCost,Inventory.iInvMPCost,Inventory.iInvNCost, Inventory.iLowSum,Inventory.itOPSum,Inventory.cPosName,inventory.cVenName, Inventory.cInvStd, PO_Podetails.iQuotedPrice, PO_Podetails.iQuantity, PO_Podetails.iNum, PO_Podetails.iUnitPrice, PO_Podetails.iMoney, PO_Podetails.iTax, PO_Podetails.iSum, PO_Podetails.iDisCount, PO_Podetails.iNatUnitPrice, PO_Podetails.iNatMoney, PO_Podetails.iNatTax, PO_Podetails.iNatSum, PO_Podetails.iNatDisCount, PO_Podetails.dArriveDate, PO_Podetails.cFree2, PO_Podetails.cFree1, Inventory.cInvM_Unit, Inventory.cInvA_Unit, (CASE WHEN (Po_podetails.iNum=0 Or po_podetails.iNum IS NULL) THEN null ELSE po_podetails.iInvExchRate END) AS iInvExchRate, Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3,PO_PoDetails.cDefine22,PO_PoDetails.cDefine23, PO_PoDetails.cDefine24,PO_PoDetails.cDefine25,PO_PoDetails.cDefine26,PO_PoDetails.cDefine27,PO_PoDetails.iPerTaxRate, PO_Podetails.cItemCode,PO_Podetails.cItemName,PO_Podetails.cItem_class,fItem.cItem_Name,PO_Podetails.PPCIds ,po_podetails.iTaxUnitPrice,po_podetails.iTaxNatUnitPrice FROM PO_Podetails LEFT JOIN inventory_pos_ven as inventory ON PO_Podetails.cInvCode = Inventory.cInvCode LEFT JOIN fItem ON PO_Podetails.cItem_Class=fItem.cItem_Class where PO_Podetails.cPOID = @parm order by PO_Podetails.ID end 采购入库单create PROCEDURE [dbo].[NewPrint_VoucherRD_Title] @parm varchar(100) AS begin select (case when rdrecord.bRdFlag=1 then '入库单-收' else '出库单-发' end)as bRdFlag,rdrecord.cAccounter, rdrecord.cVouchType,rdrecord.cBusType,rdrecord.cSource,rdrecord.cBusCode as cBillCode,rdrecord.cWhCode,rdrecord.cCode,rdrecord.cRdCode, rdrecord.cDepCode,rdrecord.cPersonCode,rdrecord.cPTCode,rdrecord.cVenCode,rdrecord.cOrderCode,rdrecord.cARVCode, rdrecord.cBillCode as cBusCode,rdrecord.cMemo,rdrecord.cMaker,rdrecord.cDefine1,rdrecord.cDefine2,rdrecord.cDefine3,rdrecord.cDefine8, rdrecord.cDefine9,rdrecord.cDefine10,rdrecord.cDefine5,rdrecord.ID,rdrecord.cDefine7,rdrecord.cDefine6,rdrecord.cDefine4, rdrecord.dVeriDate,rdrecord.dDate,rdrecord.cHandler, vendor.dVenDevDate,vendor.cVenLPerson,vendor.cVenAddress,vendor.cVenPostCode,vendor.cVenRegCode,vendor.cVenBank, vendor.cVenAccount,vendor.cVenPhone,vendor.cVenFax,vendor.cVenEmail,vendor.cVenPerson,vendor.cVenBP,vendor.cVenHand, vendor.cVenIAddress,vendor.cVenIType,vendor.cVenWhCode,vendor.cVenAbbName, Warehouse.cWhName,Rd_Style.cRdName,Department.cDepName,Person.cPersonName,PurchaseType.cPTName,vendor.cVenDefine1,vendor.cVenDefine2,vendor.cVenDefine3 ,rdrecord.cZQCode,rdrecord.dZQDate,AccountPeriod.APName from (((((Rdrecord left join Warehouse on Rdrecord.cWhCode=Warehouse.cWhCode)left join Rd_Style on Rdrecord.cRdCode=Rd_Style.cRdCode)left join Department on Rdrecord.cDepCode=Department.cDepCode)left join Person on Rdrecord.cPersonCode=Person.cPersonCode)left join PurchaseType on Rdrecord.cPTCode=PurchaseType.cPTCode)left join Vendor on Rdrecord.cVenCode=Vendor.cVenCode left join AccountPeriod on Rdrecord.cZQCode = AccountPeriod.APCode where rdrecord.ID=@parm end 采购普通发票 CREATE PROCEDURE [dbo].[NewPrint_pPurBill_Body] @parm varchar(100) AS begin select PurBillVouchs.iExMoney,PurBillVouchs.iNLostMoney,PurBillVouchs.iOriTotal,PurBillVouchs.iTotal, (case when PurBillVouchs.bExBill=1 then '费用' else '非费用'end)as bExBill,PurBillVouchs.cDebitHead,PurBillVouchs.cTaxHead, PurBillVouchs.cFree1,PurBillVouchs.cFree2,PurBillVouchs.cDefine22,PurBillVouchs.cDefine23,PurBillVouchs.cDefine24, PurBillVouchs.cDefine25,PurBillVouchs.cInvCode,PurBillVouchs.cItemName,PurBillVouchs.cItemCode,PurBillVouchs.cItem_class, PurBillVouchs.cNLostType,PurBillVouchs.iPosID,PurBillVouchs.ID,PurBillVouchs.PBVID,PurBillVouchs.iPBVQuantity, PurBillVouchs.iNum,PurBillVouchs.iOriCost, --PurBillVouchs.iOriMoney, (PurBillVouchs.iOriMoney + PurBillVouchs.iOriTaxPrice) as iOriMoney, PurBillVouchs.iLostQuan,PurBillVouchs.iTaxPrice, (case when PurBillVouchs.iNum=0 then null else PurBillVouchs.iNum end ) as iNum, PurBillVouchs.iOriTaxPrice, PurBillVouchs.cOriCode, --PurBillVouchs.iOriSum, PurBillVouchs.iCost, --PurBillVouchs.iMoney, (PurBillVouchs.iMoney + PurBillVouchs.iTaxPrice) as iMoney, PurBillVouchs.cDefine26, PurBillVouchs.iNLostQuan,PurBillVouchs.mNLostTax,PurBillVouchs.cDefine27,PurBillVouchs.iTaxRate,PurBillVouchs.dSignDate, PurBillVouchs.dInDate, (case when Inventory.bInvType=1 then '是' else '否' end)as bInvType, (case when Inventory.bService=1 then '应税劳务' else '非应税劳务' end)as bService, (case when Inventory.bInvBatch=1 then '是' else '否' end)as bInvBatch, inventory.cInvA_Unit,inventory.cInvStd,inventory.cInvCCode,inventory.cInvM_Unit,inventory.cQuality,inventory.iInvWeight, inventory.iVolume,inventory.iInvRCost,inventory.iInvSPrice,inventory.iInvSCost,inventory.iInvLSCost,inventory.iInvNCost, inventory.iInvAdvance,inventory.iInvBatch,inventory.iSafeNum,inventory.iTopSum,inventory.iLowSum,inventory.iInvMPCost, inventory.cInvAddCode,inventory.cInvName, (case when (PurBillVouchs.iNum=0 or PurBillVouchs.iNum is null) then null else PurBillVouchs.iInvExchRate end)as iInvExchRate, inventory.cPosName,inventory.cVenName,fitem.cItem_Name from (PurBillVouchs left join inventory_pos_ven as inventory on PurBillVouchs.cInvCode=Inventory.cInvCode) left join Fitem on PurBillVouchs.cItem_class=Fitem.cItem_class where PurBillVouchs.PBVID=@parm order by PurBillVouchs.ID end if not exists(select 1 from reportinfos where CardNumber = '25' and Name = 'cOriCode' and cardsection = 'B') begin insert into reportinfos values('25','原始发票号','cOriCode','B') end 采购专用发票CREATE PROCEDURE [dbo].[NewPrint_PurBill_Title] @parm varchar(100) AS begin select (case when PurBillVouch.bNegative=1 then '是' else '否' end)as bNegative, (case when PurBillVouch.bOriginal=1 then '是' else '否' end)as bOriginal, (case when PurBillVouch.bFirst=1 then '是' else '否' end)as bFirst, (case when PurBillVouch.bPayment=1 then '是' else '否' end)as bPayment, PurBillVouch.cDefine1,PurBillVouch.cBusType,PurBillVouch.cPBVMaker,PurBillVouch.cPBVVerifier,PurBillVouch.cDefine2, PurBillVouch.cDefine4,PurBillVouch.cDefine5,PurBillVouch.cDefine7,PurBillVouch.cDefine8, CASE PurBillVouch.cPBVBillType WHEN '01' THEN '专用发票' WHEN '02' THEN '普通发票' WHEN '03' THEN '普通运费发票' WHEN '04' THEN '废旧物资收购凭证' WHEN '05' THEN '农副产品收购凭证' WHEN '06' THEN '其他票据' WHEN '07' THEN '专用运费发票' END AS cPBVBillType, PurBillVouch.cPBVCode,PurBillVouch.cPTCode,PurBillVouch.cVenCode,PurBillVouch.cUnitCode,PurBillVouch.cDepCode, PurBillVouch.cPersonCode,PurBillVouch.cPayCode,PurBillVouch.cexch_name,PurBillVouch.cPBVMemo,PurBillVouch.cOrderCode, PurBillVouch.cInCode,PurBillVouch.PBVID,PurBillVouch.iPBVTaxRate,PurBillVouch.cExchRate,PurBillVouch.cDefine9, PurBillVouch.cDefine6,PurBillVouch.cDefine3,PurBillVouch.cDefine10,PurBillVouch.dSDate,PurBillVouch.dPBVDate,PurBillVouch.dVerifyDate, Vendor.cVenAbbName as cVenAbbName_1,Vendor_D.cVenAbbName as cVenAbbName,Vendor.dVenDevDate,Vendor.cVenDefine1,Vendor.cVenDefine2,Vendor.cVenDefine3,Vendor.cVenLPerson,Vendor.cVenAddress,Vendor.cVenPostCode, Vendor.cVenRegCode,Vendor.cVenBank,Vendor.cVenAccount,Vendor.cVenPhone,Vendor.cVenFax,Vendor.cVenEmail,Vendor.cVenPerson, Vendor.cVenBP,Vendor.cVenHand,Vendor.cVenIAddress,Vendor.cVenIType,Vendor.cVenWhCode, PurchaseType.cPTName,Department.cDepName,Person.cPersonName,PayCondition.cPayName,foreigncurrency.cexch_code ,PurBillVouch.cZQCode,PurBillVouch.dZQDate,AccountPeriod.APName from ((((((PurBillVouch left join PurchaseType on PurBillVouch.cPTCode=PurchaseType.cPTCode)left join Department on PurBillVouch.cDepCode=Department.cDepCode)left join Person on PurBillVouch.cPersonCode=Person.cPersonCode)left join Paycondition on PurBillVouch.cPayCode=PayCondition.cPayCode)left join foreigncurrency on PurBillVouch.cexch_name=foreigncurrency.cexch_name)left join Vendor on PurBillVouch.cVenCode=Vendor.cVenCode)left join Vendor as Vendor_D on PurBillVouch.cUnitCode=Vendor_D.cVenCode left join AccountPeriod on PurBillVouch.cZQCode = AccountPeriod.APCode where PurBillVouch.PBVID=@parm end 采购普通运费发票 --- 采购运费发票 CREATE PROCEDURE [dbo].[NewPrint_yPurBill_Body] @parm varchar(100) AS begin select Purbillvouchs.iExMoney,Purbillvouchs.iNLostMoney,Purbillvouchs.iOriTotal,Purbillvouchs.iTotal, (case when PurBillVouchs.bExBill=1 then '费用' else '非费用'end)as bExBill, Purbillvouchs.cDebitHead,Purbillvouchs.cTaxHead,Purbillvouchs.cFree1,Purbillvouchs.cFree2,Purbillvouchs.cDefine22, Purbillvouchs.cDefine23,Purbillvouchs.cDefine24,Purbillvouchs.cDefine25,Purbillvouchs.cInvCode,Purbillvouchs.cItemName, Purbillvouchs.cItemCode,Purbillvouchs.cItem_class,Purbillvouchs.cNLostType,Purbillvouchs.iPosID,Purbillvouchs.ID, Purbillvouchs.PBVID,Purbillvouchs.iPBVQuantity,(case when PurBillVouchs.iNum=0 then null else Purbillvouchs.iNum end ) as iNum,Purbillvouchs.iOriCost,Purbillvouchs.iOriMoney, Purbillvouchs.iLostQuan,Purbillvouchs.iTaxPrice,Purbillvouchs.iSum,Purbillvouchs.iOriTaxPrice,Purbillvouchs.iOriSum, Purbillvouchs.iCost,Purbillvouchs.iMoney,Purbillvouchs.cDefine26,Purbillvouchs.iNLostQuan,Purbillvouchs.mNLostTax, Purbillvouchs.cDefine27,Purbillvouchs.iTaxRate,Purbillvouchs.dSignDate,Purbillvouchs.dInDate, (case when Inventory.bInvType=1 then '是' else '否' end)as bInvType, (case when Inventory.bService=1 then '应税劳务' else '非应税劳务' end)as bService, (case when Inventory.bInvBatch=1 then '是' else '否' end)as bInvBatch, inventory.cQuality,inventory.iInvWeight,inventory.iVolume,inventory.iInvRCost,inventory.iInvSPrice,inventory.iInvSCost, inventory.cInvA_Unit,inventory.cInvCCode,inventory.cInvM_Unit,inventory.cInvStd,inventory.cInvAddCode,inventory.cInvName, inventory.iInvLSCost,inventory.iInvNCost,inventory.iInvAdvance,inventory.iInvBatch,inventory.iSafeNum,inventory.iTopSum, inventory.iLowSum,inventory.iInvMPCost,inventory.cPosName,inventory.cVenName, (case when (PurBillVouchs.iNum=0 or PurBillVouchs.iNum is null) then null else (PurBillVouchs.iInvExchRate) end)as iInvExchRate,fitem.cItem_Name from (PurBillVouchs left join inventory_pos_ven as inventory on PurBillVouchs.cInvCode=Inventory.cInvCode)left join Fitem on PurBillVouchs.cItem_class=Fitem.cItem_class where PurBillVouchs.PBVID=@parm order by Purbillvouchs.ID end 采购专用运费发票 CREATE PROCEDURE [dbo].[NewPrint_ZyPurBill_Body] @parm varchar(100) AS begin select Purbillvouchs.iExMoney,Purbillvouchs.iNLostMoney,Purbillvouchs.iOriTotal,Purbillvouchs.iTotal, (case when PurBillVouchs.bExBill=1 then '费用' else '非费用'end)as bExBill, Purbillvouchs.cDebitHead,Purbillvouchs.cTaxHead,Purbillvouchs.cFree1,Purbillvouchs.cFree2,Purbillvouchs.cDefine22, Purbillvouchs.cDefine23,Purbillvouchs.cDefine24,Purbillvouchs.cDefine25,Purbillvouchs.cInvCode,Purbillvouchs.cItemName, Purbillvouchs.cItemCode,Purbillvouchs.cItem_class,Purbillvouchs.cNLostType,Purbillvouchs.iPosID,Purbillvouchs.ID, Purbillvouchs.PBVID,Purbillvouchs.iPBVQuantity,(case when PurBillVouchs.iNum=0 then null else Purbillvouchs.iNum end ) as iNum,Purbillvouchs.iOriCost,Purbillvouchs.iOriMoney, Purbillvouchs.iLostQuan,Purbillvouchs.iTaxPrice,Purbillvouchs.iSum,Purbillvouchs.iOriTaxPrice,Purbillvouchs.iOriSum, Purbillvouchs.iCost,Purbillvouchs.iMoney,Purbillvouchs.cDefine26,Purbillvouchs.iNLostQuan,Purbillvouchs.mNLostTax, Purbillvouchs.cDefine27,Purbillvouchs.iTaxRate,Purbillvouchs.dSignDate,Purbillvouchs.dInDate, (case when Inventory.bInvType=1 then '是' else '否' end)as bInvType, (case when Inventory.bService=1 then '应税劳务' else '非应税劳务' end)as bService, (case when Inventory.bInvBatch=1 then '是' else '否' end)as bInvBatch, inventory.cQuality,inventory.iInvWeight,inventory.iVolume,inventory.iInvRCost,inventory.iInvSPrice,inventory.iInvSCost, inventory.cInvA_Unit,inventory.cInvCCode,inventory.cInvM_Unit,inventory.cInvStd,inventory.cInvAddCode,inventory.cInvName, inventory.iInvLSCost,inventory.iInvNCost,inventory.iInvAdvance,inventory.iInvBatch,inventory.iSafeNum,inventory.iTopSum, inventory.iLowSum,inventory.iInvMPCost,inventory.cPosName,inventory.cVenName, (case when (PurBillVouchs.iNum=0 or PurBillVouchs.iNum is null) then null else (PurBillVouchs.iInvExchRate) end)as iInvExchRate,fitem.cItem_Name from (PurBillVouchs left join inventory_pos_ven as inventory on PurBillVouchs.cInvCode=Inventory.cInvCode)left join Fitem on PurBillVouchs.cItem_class=Fitem.cItem_class where PurBillVouchs.PBVID=@parm order by Purbillvouchs.ID end 采购普通发票(红字) CREATE PROCEDURE [dbo].[NewPrint_pPurBill_Body] @parm varchar(100) AS begin select PurBillVouchs.iExMoney,PurBillVouchs.iNLostMoney,PurBillVouchs.iOriTotal,PurBillVouchs.iTotal, (case when PurBillVouchs.bExBill=1 then '费用' else '非费用'end)as bExBill,PurBillVouchs.cDebitHead,PurBillVouchs.cTaxHead, PurBillVouchs.cFree1,PurBillVouchs.cFree2,PurBillVouchs.cDefine22,PurBillVouchs.cDefine23,PurBillVouchs.cDefine24, PurBillVouchs.cDefine25,PurBillVouchs.cInvCode,PurBillVouchs.cItemName,PurBillVouchs.cItemCode,PurBillVouchs.cItem_class, PurBillVouchs.cNLostType,PurBillVouchs.iPosID,PurBillVouchs.ID,PurBillVouchs.PBVID,PurBillVouchs.iPBVQuantity, PurBillVouchs.iNum,PurBillVouchs.iOriCost, --PurBillVouchs.iOriMoney, (PurBillVouchs.iOriMoney + PurBillVouchs.iOriTaxPrice) as iOriMoney, PurBillVouchs.iLostQuan,PurBillVouchs.iTaxPrice, (case when PurBillVouchs.iNum=0 then null else PurBillVouchs.iNum end ) as iNum, PurBillVouchs.iOriTaxPrice, PurBillVouchs.cOriCode, --PurBillVouchs.iOriSum, PurBillVouchs.iCost, --PurBillVouchs.iMoney, (PurBillVouchs.iMoney + PurBillVouchs.iTaxPrice) as iMoney, PurBillVouchs.cDefine26, PurBillVouchs.iNLostQuan,PurBillVouchs.mNLostTax,PurBillVouchs.cDefine27,PurBillVouchs.iTaxRate,PurBillVouchs.dSignDate, PurBillVouchs.dInDate, (case when Inventory.bInvType=1 then '是' else '否' end)as bInvType, (case when Inventory.bService=1 then '应税劳务' else '非应税劳务' end)as bService, (case when Inventory.bInvBatch=1 then '是' else '否' end)as bInvBatch, inventory.cInvA_Unit,inventory.cInvStd,inventory.cInvCCode,inventory.cInvM_Unit,inventory.cQuality,inventory.iInvWeight, inventory.iVolume,inventory.iInvRCost,inventory.iInvSPrice,inventory.iInvSCost,inventory.iInvLSCost,inventory.iInvNCost, inventory.iInvAdvance,inventory.iInvBatch,inventory.iSafeNum,inventory.iTopSum,inventory.iLowSum,inventory.iInvMPCost, inventory.cInvAddCode,inventory.cInvName, (case when (PurBillVouchs.iNum=0 or PurBillVouchs.iNum is null) then null else PurBillVouchs.iInvExchRate end)as iInvExchRate, inventory.cPosName,inventory.cVenName,fitem.cItem_Name from (PurBillVouchs left join inventory_pos_ven as inventory on PurBillVouchs.cInvCode=Inventory.cInvCode) left join Fitem on PurBillVouchs.cItem_class=Fitem.cItem_class where PurBillVouchs.PBVID=@parm order by PurBillVouchs.ID end if not exists(select 1 from reportinfos where CardNumber = '25' and Name = 'cOriCode' and cardsection = 'B') begin insert into reportinfos values('25','原始发票号','cOriCode','B') end 采购专用发票(红字)CREATE PROCEDURE [dbo].[NewPrint_PurBill_Title] @parm varchar(100) AS begin select (case when PurBillVouch.bNegative=1 then '是' else '否' end)as bNegative, (case when PurBillVouch.bOriginal=1 then '是' else '否' end)as bOriginal, (case when PurBillVouch.bFirst=1 then '是' else '否' end)as bFirst, (case when PurBillVouch.bPayment=1 then '是' else '否' end)as bPayment, PurBillVouch.cDefine1,PurBillVouch.cBusType,PurBillVouch.cPBVMaker,PurBillVouch.cPBVVerifier,PurBillVouch.cDefine2, PurBillVouch.cDefine4,PurBillVouch.cDefine5,PurBillVouch.cDefine7,PurBillVouch.cDefine8, CASE PurBillVouch.cPBVBillType WHEN '01' THEN '专用发票' WHEN '02' THEN '普通发票' WHEN '03' THEN '普通运费发票' WHEN '04' THEN '废旧物资收购凭证' WHEN '05' THEN '农副产品收购凭证' WHEN '06' THEN '其他票据' WHEN '07' THEN '专用运费发票' END AS cPBVBillType, PurBillVouch.cPBVCode,PurBillVouch.cPTCode,PurBillVouch.cVenCode,PurBillVouch.cUnitCode,PurBillVouch.cDepCode, PurBillVouch.cPersonCode,PurBillVouch.cPayCode,PurBillVouch.cexch_name,PurBillVouch.cPBVMemo,PurBillVouch.cOrderCode, PurBillVouch.cInCode,PurBillVouch.PBVID,PurBillVouch.iPBVTaxRate,PurBillVouch.cExchRate,PurBillVouch.cDefine9, PurBillVouch.cDefine6,PurBillVouch.cDefine3,PurBillVouch.cDefine10,PurBillVouch.dSDate,PurBillVouch.dPBVDate,PurBillVouch.dVerifyDate, Vendor.cVenAbbName as cVenAbbName_1,Vendor_D.cVenAbbName as cVenAbbName,Vendor.dVenDevDate,Vendor.cVenDefine1,Vendor.cVenDefine2,Vendor.cVenDefine3,Vendor.cVenLPerson,Vendor.cVenAddress,Vendor.cVenPostCode, Vendor.cVenRegCode,Vendor.cVenBank,Vendor.cVenAccount,Vendor.cVenPhone,Vendor.cVenFax,Vendor.cVenEmail,Vendor.cVenPerson, Vendor.cVenBP,Vendor.cVenHand,Vendor.cVenIAddress,Vendor.cVenIType,Vendor.cVenWhCode, PurchaseType.cPTName,Department.cDepName,Person.cPersonName,PayCondition.cPayName,foreigncurrency.cexch_code ,PurBillVouch.cZQCode,PurBillVouch.dZQDate,AccountPeriod.APName from ((((((PurBillVouch left join PurchaseType on PurBillVouch.cPTCode=PurchaseType.cPTCode)left join Department on PurBillVouch.cDepCode=Department.cDepCode)left join Person on PurBillVouch.cPersonCode=Person.cPersonCode)left join Paycondition on PurBillVouch.cPayCode=PayCondition.cPayCode)left join foreigncurrency on PurBillVouch.cexch_name=foreigncurrency.cexch_name)left join Vendor on PurBillVouch.cVenCode=Vendor.cVenCode)left join Vendor as Vendor_D on PurBillVouch.cUnitCode=Vendor_D.cVenCode left join AccountPeriod on PurBillVouch.cZQCode = AccountPeriod.APCode where PurBillVouch.PBVID=@parm end 采购普通运费发票(红字) --- 采购运费发票 CREATE PROCEDURE [dbo].[NewPrint_yPurBill_Body] @parm varchar(100) AS begin select Purbillvouchs.iExMoney,Purbillvouchs.iNLostMoney,Purbillvouchs.iOriTotal,Purbillvouchs.iTotal, (case when PurBillVouchs.bExBill=1 then '费用' else '非费用'end)as bExBill, Purbillvouchs.cDebitHead,Purbillvouchs.cTaxHead,Purbillvouchs.cFree1,Purbillvouchs.cFree2,Purbillvouchs.cDefine22, Purbillvouchs.cDefine23,Purbillvouchs.cDefine24,Purbillvouchs.cDefine25,Purbillvouchs.cInvCode,Purbillvouchs.cItemName, Purbillvouchs.cItemCode,Purbillvouchs.cItem_class,Purbillvouchs.cNLostType,Purbillvouchs.iPosID,Purbillvouchs.ID, Purbillvouchs.PBVID,Purbillvouchs.iPBVQuantity,(case when PurBillVouchs.iNum=0 then null else Purbillvouchs.iNum end ) as iNum,Purbillvouchs.iOriCost,Purbillvouchs.iOriMoney, Purbillvouchs.iLostQuan,Purbillvouchs.iTaxPrice,Purbillvouchs.iSum,Purbillvouchs.iOriTaxPrice,Purbillvouchs.iOriSum, Purbillvouchs.iCost,Purbillvouchs.iMoney,Purbillvouchs.cDefine26,Purbillvouchs.iNLostQuan,Purbillvouchs.mNLostTax, Purbillvouchs.cDefine27,Purbillvouchs.iTaxRate,Purbillvouchs.dSignDate,Purbillvouchs.dInDate, (case when Inventory.bInvType=1 then '是' else '否' end)as bInvType, (case when Inventory.bService=1 then '应税劳务' else '非应税劳务' end)as bService, (case when Inventory.bInvBatch=1 then '是' else '否' end)as bInvBatch, inventory.cQuality,inventory.iInvWeight,inventory.iVolume,inventory.iInvRCost,inventory.iInvSPrice,inventory.iInvSCost, inventory.cInvA_Unit,inventory.cInvCCode,inventory.cInvM_Unit,inventory.cInvStd,inventory.cInvAddCode,inventory.cInvName, inventory.iInvLSCost,inventory.iInvNCost,inventory.iInvAdvance,inventory.iInvBatch,inventory.iSafeNum,inventory.iTopSum, inventory.iLowSum,inventory.iInvMPCost,inventory.cPosName,inventory.cVenName, (case when (PurBillVouchs.iNum=0 or PurBillVouchs.iNum is null) then null else (PurBillVouchs.iInvExchRate) end)as iInvExchRate,fitem.cItem_Name from (PurBillVouchs left join inventory_pos_ven as inventory on PurBillVouchs.cInvCode=Inventory.cInvCode)left join Fitem on PurBillVouchs.cItem_class=Fitem.cItem_class where PurBillVouchs.PBVID=@parm order by Purbillvouchs.ID end 采购专用运费发票(红字) CREATE PROCEDURE [dbo].[NewPrint_ZyPurBill_Body] @parm varchar(100) AS begin select Purbillvouchs.iExMoney,Purbillvouchs.iNLostMoney,Purbillvouchs.iOriTotal,Purbillvouchs.iTotal, (case when PurBillVouchs.bExBill=1 then '费用' else '非费用'end)as bExBill, Purbillvouchs.cDebitHead,Purbillvouchs.cTaxHead,Purbillvouchs.cFree1,Purbillvouchs.cFree2,Purbillvouchs.cDefine22, Purbillvouchs.cDefine23,Purbillvouchs.cDefine24,Purbillvouchs.cDefine25,Purbillvouchs.cInvCode,Purbillvouchs.cItemName, Purbillvouchs.cItemCode,Purbillvouchs.cItem_class,Purbillvouchs.cNLostType,Purbillvouchs.iPosID,Purbillvouchs.ID, Purbillvouchs.PBVID,Purbillvouchs.iPBVQuantity,(case when PurBillVouchs.iNum=0 then null else Purbillvouchs.iNum end ) as iNum,Purbillvouchs.iOriCost,Purbillvouchs.iOriMoney, Purbillvouchs.iLostQuan,Purbillvouchs.iTaxPrice,Purbillvouchs.iSum,Purbillvouchs.iOriTaxPrice,Purbillvouchs.iOriSum, Purbillvouchs.iCost,Purbillvouchs.iMoney,Purbillvouchs.cDefine26,Purbillvouchs.iNLostQuan,Purbillvouchs.mNLostTax, Purbillvouchs.cDefine27,Purbillvouchs.iTaxRate,Purbillvouchs.dSignDate,Purbillvouchs.dInDate, (case when Inventory.bInvType=1 then '是' else '否' end)as bInvType, (case when Inventory.bService=1 then '应税劳务' else '非应税劳务' end)as bService, (case when Inventory.bInvBatch=1 then '是' else '否' end)as bInvBatch, inventory.cQuality,inventory.iInvWeight,inventory.iVolume,inventory.iInvRCost,inventory.iInvSPrice,inventory.iInvSCost, inventory.cInvA_Unit,inventory.cInvCCode,inventory.cInvM_Unit,inventory.cInvStd,inventory.cInvAddCode,inventory.cInvName, inventory.iInvLSCost,inventory.iInvNCost,inventory.iInvAdvance,inventory.iInvBatch,inventory.iSafeNum,inventory.iTopSum, inventory.iLowSum,inventory.iInvMPCost,inventory.cPosName,inventory.cVenName, (case when (PurBillVouchs.iNum=0 or PurBillVouchs.iNum is null) then null else (PurBillVouchs.iInvExchRate) end)as iInvExchRate,fitem.cItem_Name from (PurBillVouchs left join inventory_pos_ven as inventory on PurBillVouchs.cInvCode=Inventory.cInvCode)left join Fitem on PurBillVouchs.cItem_class=Fitem.cItem_class where PurBillVouchs.PBVID=@parm order by Purbillvouchs.ID end 销售销售订单销售订单 CREATE PROCEDURE [dbo].[NewPrint_SaleOrder_Body] @parm varchar(100) AS begin select Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3,Inventory.cInvName,Inventory.cInvStd,Inventory.cInvM_Unit, Inventory.cInvA_Unit,(CASE WHEN (SO_SODetails.iNum=0 Or SO_SODetails.iNum IS NULL) THEN null ELSE SO_SODetails.iInvExchRate END) AS iInvExchRate, Inventory.cInvAddCode,Inventory.bService,Inventory.iInvLSCost,Inventory.bFree1, Inventory.bInvType,Inventory.bFree2,Inventory.cQuality,Inventory.iInvWeight,Inventory.iVolume,Inventory.iInvRCost, Inventory.iInvSPrice,Inventory.iInvSCost,Inventory.iInvLSCost,Inventory.iInvNCost,Inventory.iInvAdvance,Inventory.iInvBatch, Inventory.iSafeNum,Inventory.iTopSum,Inventory.iLowSum,Inventory.iInvMPCost, Inventory.cPosName,Inventory.cVenName,SO_SODetails.AutoID,SO_SODetails.cSOCode,SO_SODetails.cInvCode,SO_SODetails.iQuantity, SO_SODetails.iNum, SO_SODetails.iTaxUnitPrice,SO_SODetails.iQuotedPrice,SO_SODetails.iUnitPrice,SO_SODetails.iMoney,SO_SODetails.iTaxRate, SO_SODetails.iTax,SO_SODetails.iSum,SO_SODetails.iNatUnitPrice,SO_SODetails.iNatMoney,SO_SODetails.iNatTax, SO_SODetails.iNatSum,SO_SODetails.iNatDiscount,SO_SODetails.iDiscount,SO_SODetails.iFHQuantity,SO_SODetails.iFHNum, SO_SODetails.iFHMoney,SO_SODetails.iKPQuantity,SO_SODetails.iKPNum,SO_SODetails.iKPMoney,SO_SODetails.dPreDate, SO_SODetails.cMemo,SO_SODetails.KL,SO_SODetails.cFree1,SO_SODetails.cItemCode,SO_SODetails.cFree2,SO_SODetails.cItem_class, SO_SODetails.KL2,SO_SODetails.cDefine22,SO_SODetails.cDefine23,SO_SODetails.cDefine24,SO_SODetails.cDefine25, SO_SODetails.cDefine26,SO_SODetails.cDefine27,SO_SODetails.iSOsID,SO_SODetails.cItemName,SO_SODetails.cItem_CName from SO_SODetails left join inventory_pos_ven as inventory ON SO_SODetails.cInvCode = Inventory.cInvCode where SO_SODetails.cSOCode=@parm order by SO_SODetails.AutoID end 发货单 CREATE PROCEDURE [dbo].[NewPrint_Dispvch_Title] @parm varchar(100) AS begin select customer.cCusAbbName,customer.cCusName,customer.cCusPhone,customer.cCusOAddress,customer.cCusOType,customer.cCusPayCond, customer.iCusCreLine,customer.cCusPerson,customer.cCusPostCode,customer.iCusCreDate,customer.cCusCreGrade,customer.iARMoney, customer.cCusDepart,customer.cCusPPerson,customer.dCusDevDate,customer.cCusLPerson,customer.cCusRegCode,customer.cCusBank, customer.cCusAccount,customer.cCusEmail,customer.cCusAddress,customer.cCusPostCode,customer.cCusPhone,customer.cCusFax, customer.cCusBP,customer.cCusHand,customer.cCusPerson,customer.cCusOAddress,customer.cCusOType,customer.cCusWhCode, customer.cCusDefine1,customer.cCusDefine2,customer.cCusDefine3, dispatchlist.cDLCode,dispatchlist.cVouchType,dispatchlist.cSTCode,dispatchlist.dDate,dispatchlist.cDepCode, dispatchlist.cPersonCode,dispatchlist.cSBVCode,dispatchlist.cSOCode,dispatchlist.cCusCode,dispatchlist.cPayCode, dispatchlist.cSCCode,dispatchlist.cShipAddress,dispatchlist.cexch_name,dispatchlist.iExchRate,dispatchlist.iTaxRate, dispatchlist.cMemo,dispatchlist.cDefine1,dispatchlist.cDefine2,(case when dispatchlist.bReturnFlag=1 then '退货' else '发货' end) as bReturnFlag,dispatchlist.DLID,dispatchlist.cVerifier,dispatchlist.cMaker, (case when dispatchlist.bFirst=1 then '是' else '否' end) as bFist, dispatchlist.cDefine3,dispatchlist.cDefine4,dispatchlist.cDefine5,dispatchlist.cDefine6,dispatchlist.cDefine7, dispatchlist.cDefine8,dispatchlist.cDefine9,dispatchlist.cDefine10,dispatchlist.SBVID, (case when dispatchlist.iSale=1 then '是' else '否' end) as iSale, (case when dispatchlist.bDisFlag=1 then '是' else '否' end) as bDisFlag, VouchType.cVouchName,SaleType.cSTName,Department.cDepName,Person.cPersonName,ShippingChoice.cSCName,PayCondition.cPayName ,dispatchlist.cZQCode,dispatchlist.dZQDate,AccountPeriod.APName,Customer.cCusDefine1,Customer.cCusDefine2,Customer.cCusDefine3, dispatchlist.iPrnNum+1 as iPrnNum from ((((((dispatchlist left join customer on dispatchlist.cCusCode=customer.cCusCode)left join VouchType on dispatchlist.cVouchType =VouchType.cVouchType)left join SaleType on dispatchlist.cSTCode=SaleType.cSTCode)left join Department on dispatchlist.cDepCode=Department.cDepCode)left join Person on dispatchlist.cPersonCode=Person.cPersonCode)left join PayCondition on dispatchlist.cPayCode=PayCondition.cPayCode)left join ShippingChoice on dispatchlist.cSCCode=ShippingChoice.cSCCode left join AccountPeriod on dispatchlist.cZQCode = AccountPeriod.APCode where dispatchlist.DLID=@parm end 销售退货单 CREATE PROCEDURE [dbo].[NewPrint_ReDispatchList_Body] @parm varchar(100) AS begin declare @PrintKinds varchar(100) set @PrintKinds = '' declare @All_Name varchar(50) declare @FDCondition varchar(100) declare @FDValue varchar(100) declare @IsHengDa varchar(5) declare @strSQL varchar(8000) declare @HengDaSQL varchar(1000) declare @HengDaSQL1 varchar(1000) --打印清单和其它打印的折扣横打中'折扣额'位置不一样 declare @MaxAutoID varchar(5) if CHARINDEX('||',@parm) > 0 begin set @PrintKinds = SUBSTRING(@parm,CHARINDEX('||',@parm)+2,len(@parm)-CHARINDEX('||',@parm)) set @parm = SUBSTRING(@parm,1,CHARINDEX('||',@parm)-1) end if CHARINDEX('/bDiscount',@PrintKinds) > 0 begin set @IsHengDa = 'True' set @PrintKinds = SUBSTRING(@PrintKinds,1,CHARINDEX('/bDiscount',@PrintKinds)-1) end if @PrintKinds = '' begin set @PrintKinds = 'Nothing' set @FDCondition = '' end if CHARINDEX('All',@PrintKinds) > 0 begin set @All_Name = SUBSTRING(@PrintKinds,CHARINDEX(',',@PrintKinds)+1,len(@PrintKinds)-CHARINDEX(',',@PrintKinds)) set @PrintKinds = 'All' end if CHARINDEX('Nothing',@PrintKinds) >0 if CHARINDEX(',',@PrintKinds) >0 begin set @FDCondition = SUBSTRING(@PrintKinds,CHARINDEX(',',@PrintKinds)+1,(CHARINDEX('?',@PrintKinds)-CHARINDEX(',',@PrintKinds))-1) set @FDValue = SUBSTRING(@PrintKinds,CHARINDEX('?',@PrintKinds)+1,len(@PrintKinds)-CHARINDEX('?',@PrintKinds)) set @PrintKinds = 'Nothing' end set @MaxAutoID = (select max(autoid) from dispatchlists where DLID= @parm) +1 set @HengDaSQL = ' select ((select max(autoid)from dispatchlists where DLID= ' + @parm + '))+1 as autoid ,'''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''', '''',-sum(iDiscount),null,'''',null,-(case when sum(iNatSum) = 0 then 0 else sum(iNatDiscount)-sum(iNatTax)*sum(iNatDiscount)/sum(iNatSum) end),-(case when sum(iNatSum) = 0 then 0 else sum(iNatTax)*sum(iNatDiscount)/sum(iNatSum) end),'''',-sum(iNatDiscount),'''','''','''','''',null,null,null,-(case when sum(iSum) = 0 then 0 else sum(iDiscount)-sum(iTax)*sum(iDiscount)/sum(iSum) end) ,-(case when sum(iSum) = 0 then 0 else sum(iTax)*sum(iDiscount)/sum(iSum) end),'''',null, null,'''',null,'''','''','''','''','''','''','''','''','''','''','''',null,null,null,null,'''','''', '''','''','''','''','''',''折扣额'','''', '''' ,'''','''','''','''','''','''',null,'''','''','''','''','''', '''','''','''','''' from Dispatchlists left join inventory_pos_ven as inventory ON dispatchlists.cInvCode=Inventory.cInvCode where DLID = ' + @parm set @HengDaSQL1 = ' select ((select max(autoid)from dispatchlists where DLID= ' + @parm + '))+1 as autoid ,'''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''','''', '''',null,-(case when sum(iNatSum) = 0 then 0 else sum(iNatDiscount)-sum(iNatTax)*sum(iNatDiscount)/sum(iNatSum) end),'''','''',-(case when sum(iNatSum) = 0 then 0 else sum(iNatTax)*sum(iNatDiscount)/sum(iNatSum) end),-sum(iNatDiscount),null,-sum(iDiscount),'''','''','''','''',null,null,null,-(case when sum(iSum) = 0 then 0 else sum(iDiscount)-sum(iTax)*sum(iDiscount)/sum(iSum) end),-(case when sum(iSum) = 0 then 0 else sum(iTax)*sum(iDiscount)/sum(iSum) end),'''',null, '''',null,'''','''',null,'''','''','''','''','''','''','''','''','''',null,null,null,null,null,'''', '''','''','''','''',null,'''','''', ''折扣额'' ,'''','''','''','''','''','''','''','''','''','''','''','''', '''','''','''','''' from Dispatchlists left join inventory_pos_ven as inventory ON dispatchlists.cInvCode=Inventory.cInvCode where DLID = ' + @parm if @PrintKinds = 'Nothing' begin set @strSQL = 'select Dispatchlists.AutoID,Dispatchlists.iBatch,(case when Dispatchlists.bSettleAll=1 then ''完毕'' else ''未完毕'' end)as bSettleAll, Dispatchlists.cDefine22,Dispatchlists.cBatch,Dispatchlists.cItemCode,Dispatchlists.cItem_class,Dispatchlists.cFree1, Dispatchlists.cFree2,Dispatchlists.cWhCode,Dispatchlists.cInvCode,Dispatchlists.cDefine23,Dispatchlists.cItemName, Dispatchlists.cItem_CName,Dispatchlists.cDefine24,Dispatchlists.cDefine25,Dispatchlists.cVenAbbName,Dispatchlists.iDLsID, Dispatchlists.iSOsID,Dispatchlists.DLID,Dispatchlists.iCorID,' if @IsHengDa = 'true' set @strSQL = @strSQL + '(dispatchlists.iSum + dispatchlists.iDiscount) as iSum ,' else set @strSQL = @strSQL + 'dispatchlists.iSum,' set @strSQL = @strSQL + 'Dispatchlists.iNatUnitPrice,Dispatchlists.KL,' if @IsHengDa = 'true' set @strSQL = @strSQL + ' null as iNatDiscount,' else set @strSQL = @strSQL + 'Dispatchlists.iNatDiscount,' set @strSQL = @strSQL + ' Dispatchlists.iNatMoney,Dispatchlists.iNatTax,Dispatchlists.KL2,Dispatchlists.iNatSum, (Case when Dispatchlists.iTb=0 then Dispatchlists.iNum else TBNum end ) as iNum, (Case when Dispatchlists.iTb=0 then Dispatchlists.iQuantity else TBQuantity end) as iQuantity, Dispatchlists.iSettleNum,Dispatchlists.iSettleQuantity,' if @IsHengDa = 'true' set @strSQL = @strSQL + 'case when (case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else dispatchlists.iTaxUnitPrice + dispatchlists.iDiscount /(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) end as iTaxUnitPrice ,' else set @strSQL = @strSQL + 'dispatchlists.iTaxUnitPrice,' set @strSQL = @strSQL + ' Dispatchlists.iQuotedPrice,' if @IsHengDa = 'true' set @strSQL = @strSQL + 'dispatchlists.iQuotedPrice as iUnitPrice, (dispatchlists.iQuotedPrice)*(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) as iMoney, (dispatchlists.iSum + dispatchlists.iDiscount)-(dispatchlists.iQuotedPrice)*(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) as iTax, null as iDiscount,' else set @strSQL = @strSQL + 'dispatchlists.iUnitPrice , dispatchlists.iMoney , dispatchlists.iTax, Dispatchlists.iDiscount,' set @strSQL = @strSQL + ' Dispatchlists.iTaxRate,Dispatchlists.fSalePrice, (Case when Dispatchlists.iTb=0 then ''正常'' else ''退补'' end ) as iTB,Dispatchlists.fSaleCost, Dispatchlists.cDefine26,Dispatchlists.cDefine27,Dispatchlists.dVDate, (case when Inventory.bService=1 then ''应税劳务'' else ''非应税劳务'' end)as bService, (case when Inventory.bInvBatch=1 then ''是'' else ''否'' end)as bInvBatch, (case when Inventory.bInvType=1 then ''是'' else ''否'' end)as bInvType, Inventory.bFree1,Inventory.bFree2,Inventory.cQuality,Inventory.iInvWeight,Inventory.iVolume,Inventory.iInvRCost, Inventory.iInvSPrice,Inventory.iInvSCost,Inventory.iInvNCost,Inventory.iInvAdvance,Inventory.iInvBatch,Inventory.iSafeNum, Inventory.iTopSum,Inventory.iLowSum,Inventory.iInvMPCost,Inventory.cInvAddCode,Inventory.cInvName,Inventory.cInvStd, Inventory.cInvM_Unit,Inventory.cInvA_Unit,Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3, Dispatchlists.iInvExchRate,Inventory.iVolume,Inventory.iInvLSCost,Inventory.iInvWeight,Inventory.cPosName,Inventory.cVenName, Warehouse.cWhName,SO_SODetails.cSOCode,Warehouse.cWhValueStyle,dispatchlists.fOutQuantity,dispatchlists.fOutNum,DispatchLists.cMemo from (((dispatchlists left join inventory_pos_ven as inventory ON dispatchlists.cInvCode=Inventory.cInvCode) left join Dispatchlist on dispatchlists.DLID=DispatchList.DLID)left join Warehouse on dispatchlists.cWhCode=Warehouse.cWhCode) left join SO_SODetails ON SO_SODetails.iSOsID = DispatchLists.iSOsID' if @FDCondition = 'cWhName_cInvCCode' set @strSQL = @strSQL + ' where dispatchlists.DLID=' + @parm + ' and dispatchlists.cWhCode + ''-'' + inventory.cInvCCode = ''' + @FDValue + '''' else if @FDCondition = 'cWhName' set @strSQL = @strSQL + ' where dispatchlists.DLID=' + @parm + ' and dispatchlists.cWhCode = ''' + @FDValue + '''' else if @FDCondition = 'cInvCCode' set @strSQL = @strSQL + ' where dispatchlists.DLID=' + @parm + ' and inventory.cInvCCode = ''' + @FDValue + '''' else set @strSQL = @strSQL + ' where dispatchlists.DLID=' + @parm if @IsHengDa = 'True' set @strSQL = @strSQL + 'union ' + @HengDaSQL if @FDCondition = 'cWhName_cInvCCode' set @strSQL = @strSQL + ' and dispatchlists.cWhCode + ''-'' + inventory.cInvCCode = ''' + @FDValue + '''' else if @FDCondition = 'cWhName' set @strSQL = @strSQL + ' and dispatchlists.cWhCode = ''' + @FDValue + '''' else if @FDCondition = 'cInvCCode' set @strSQL = @strSQL + ' and inventory.cInvCCode = ''' + @FDValue + '''' set @strSQL = @strSQL + ' order by Dispatchlists.AutoID' end else if @PrintKinds = 'All' begin set @strSQL = 'select max(dispatchlists.AutoID) as AutoID, max(dispatchlists.iBatch) as iBatch, case when count(distinct dispatchlists.bSettleAll)>1 then '''' else (case when max(cast(dispatchlists.bSettleAll as int)) = 1 then ''完毕'' else ''未完毕'' end) end as bSettleAll, max(dispatchlists.cDefine22) as cDefine22, max(dispatchlists.cItemCode) as cItemCode, max(dispatchlists.cBatch) as cBatch, max(dispatchlists.cItem_class) as cItem_class, case when count(distinct dispatchlists.cFree1) > 1 then '''' else max(dispatchlists.cFree1) end as cFree1, case when count(distinct dispatchlists.cFree2) > 1 then '''' else max(dispatchlists.cFree2) end as cFree2, max(dispatchlists.cWhCode) as cWhCode, case when count(distinct dispatchlists.cInvCode) >1 then '''' else max(dispatchlists.cInvCode) end as cInvCode, max(dispatchlists.cDefine23) as cDefine23, max(dispatchlists.cDefine24) as cDefine24, max(dispatchlists.cItemName) as cItemName, max(dispatchlists.cDefine25) as cDefine25, max(dispatchlists.cItem_CName) as cItem_CName, max(dispatchlists.cVenAbbName) as cVenAbbName, max(dispatchlists.iSOsID) as iSOsID, max(dispatchlists.iDLsID) as iDLsID, max(dispatchlists.DLID) as DLID, max(dispatchlists.iCorID) as iCorID, case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum(dispatchlists.iNatUnitPrice)/sum((case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end )) end as iNatUnitPrice, sum(dispatchlists.iNatMoney) as iNatMoney, max(dispatchlists.KL) as KL, max(dispatchlists.KL2) as KL2, sum(dispatchlists.iNatTax) as iNatTax, sum(dispatchlists.iNatSum) as iNatSum,' if @IsHengDa = 'true' set @strSQL = @strSQL + ' null as iNatDiscount, (sum(dispatchlists.iSum) + sum(dispatchlists.iDiscount)) as iSum ,' else set @strSQL = @strSQL + 'sum(dispatchlists.iNatDiscount) as iNatDiscount,sum(dispatchlists.iSum) as iSum,' set @strSQL = @strSQL + ' sum(case when iTB=0 then dispatchlists.iNum else dispatchlists.TBNum end) as iNum , sum((case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end )) as iQuantity, sum(dispatchlists.iSettleNum) as iSettleNum, sum(dispatchlists.iSettleQuantity) as iSettleQuantity, sum(dispatchlists.iQuotedPrice) as iQuotedPrice,' --含税单价.无税单价.无税金额.税额四个的处理 if @IsHengDa = 'true' set @strSQL = @strSQL + 'case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else (sum(dispatchlists.iSum) + sum(dispatchlists.iDiscount))/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) end as iTaxUnitPrice, case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum((dispatchlists.iSum + dispatchlists.iDiscount)/( 1 + dispatchlists.iTaxRate/100))/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end )end as iUnitPrice, sum((dispatchlists.iSum + dispatchlists.iDiscount)/( 1 + dispatchlists.iTaxRate/100)) as iMoney, sum(dispatchlists.iSum) + sum(dispatchlists.iDiscount) - sum((dispatchlists.iSum + dispatchlists.iDiscount)/( 1 + dispatchlists.iTaxRate/100)) as iTax , null as iDiscount,' else set @strSQL = @strSQL + 'case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum(dispatchlists.iSum)/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) end as iTaxUnitPrice, case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum(dispatchlists.iSum)/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) end as iUnitPrice, sum(dispatchlists.iMoney) as iMoney , sum(dispatchlists.iTax) as iTax, sum(dispatchlists.iDiscount) as iDiscount,' set @strSQL = @strSQL + ' case when count(distinct dispatchlists.iTaxRate) > 1 then '''' else max(dispatchlists.iTaxRate)end as iTaxRate, case when count(distinct dispatchlists.iTb)>1 then '''' else (case when max(cast(dispatchlists.iTb as int)) = 1 then ''正常'' else ''退补'' end) end as iTB, sum(dispatchlists.fSalePrice) as fSalePrice, max(dispatchlists.cDefine26) as cDefine26, max(dispatchlists.cDefine27) as cDefine27, max(dispatchlists.fSalePrice) as fSaleCost, max(dispatchlists.dVDate) as dVDate, case when count (distinct inventory.bService)>1 then '''' else (case when max(cast(inventory.bService as int)) = 1 then ''应税劳务'' else ''非应税劳务'' end) end as bService , case when count (distinct inventory.bInvBatch)>1 then '''' else (case when (max(cast(inventory.bInvBatch as int)))=1 then ''是'' else ''否'' end) end as bInvBatch , case when (count(distinct inventory.bFree1)) >1 then '''' else max(cast(inventory.bFree1 as varchar(10))) end as bFree1, case when count(distinct binvtype)>1 then ''是'' else '''' end as bInvType, case when (count(distinct inventory.bFree2)) >1 then '''' else max(cast(inventory.bFree2 as varchar(10))) end as bFree2, max(inventory.cQuality) as cQuality,max(inventory.iInvWeight) as iInvWeight,max(inventory.iVolume) as iVolume,max(inventory.iInvRCost) as iInvRCost, max(inventory.iInvSPrice) as iInvSPrice,max(inventory.iInvSCost) as iInvSCost,max(inventory.iInvLSCost) as iInvLSCost,max(inventory.iInvNCost) as iInvNCost,max(inventory.iInvAdvance) as iInvAdvance, max(inventory.iInvBatch) as iInvBatch, max(inventory.iSafeNum) as iSafeNum,max(inventory.iTopSum) as iTopSum,max(inventory.iLowSum) as iLowSum,max(inventory.iInvMPCost) as iInvMPCost,max(inventory.cInvAddCode) as cInvAddCode,max(inventory.cInvDefine1) as cInvDefine1, --货物名称特殊处理 case when '''+ @All_Name+ ''' = '''' then case when (select count(distinct inventory.cInvName) from dispatchlists left join inventory_pos_ven as inventory ON dispatchlists.cInvCode=Inventory.cInvCode where dispatchlists.DLID= ' + @parm + ') > 1 then '''' else max(inventory.cInvName) end else ''' + @All_Name + ''' end as cInvName, case when (select count(distinct inventory.cInvStd) from dispatchlists left join inventory_pos_ven as inventory ON dispatchlists.cInvCode=Inventory.cInvCode left join Dispatchlist on dispatchlists.DLID=DispatchList.DLID where dispatchlists.DLID= ' + @parm + ') >1 then '''' else max(inventory.cInvStd) end as cInvStd , case when count(distinct inventory.cInvM_Unit) > 1 then '''' else max(inventory.cInvM_Unit) end as cInvM_Unit, case when count(distinct inventory.cInvA_Unit) > 1 then '''' else max(inventory.cInvA_Unit) end as cInvA_Unit, max(inventory.cInvDefine2) as cInvDefine2,max(inventory.cInvDefine3) as cInvDefine3, max(dispatchlists.iInvExchRate) AS iInvExchRate ,max(inventory.iVolume) as iVolume, max(inventory.iInvWeight) as iInvWeight,max(inventory.cPosName) as cPosName, max(inventory.cVenName) as cVenName, case when count(distinct dispatchlists.cWhCode)>1 then '''' else max(Warehouse.cWhName) end as cWhName, --仓库 max(SO_SODetails.cSOCode) as cSOCode,max(Warehouse.cWhValueStyle) as cWhValueStyle, max(dispatchlists.fOutQuantity) as fOutQuantity,max(dispatchlists.fOutNum) as fOutNum,max(dispatchlists.cMemo) as cMemo from (((dispatchlists left join inventory_pos_ven as inventory ON dispatchlists.cInvCode=Inventory.cInvCode) left join Dispatchlist on dispatchlists.DLID=DispatchList.DLID)left join Warehouse on dispatchlists.cWhCode=Warehouse.cWhCode) left JOIN SO_SODetails ON DispatchLists.iSOsID=SO_SODetails.iSOsID where dispatchlists.DLID= ' + @parm if @IsHengDa = 'True' begin set @strSQL = @strSQL + ' union ' + @HengDaSQL1 end end else begin set @strSQL = 'select max(dispatchlists.AutoID) as AutoID,max(dispatchlists.iBatch) as iBatch, case when count(distinct dispatchlists.bSettleAll) >1 then '''' else (case when max(cast(dispatchlists.bSettleAll as int)) = 1 then ''完毕'' else ''未完毕'' end) end as bSettleAll, max(dispatchlists.cDefine22) as cDefine22,max(dispatchlists.cItemCode) as cItemCode, max(dispatchlists.cBatch) as cBatch,max(dispatchlists.cItem_class) as cItem_class, case when count(distinct dispatchlists.cFree1) > 1 then '''' else max(dispatchlists.cFree1) end as cFree1, case when count(distinct dispatchlists.cFree2) > 1 then '''' else max(dispatchlists.cFree2) end as cFree2, max(dispatchlists.cWhCode) as cWhCode,max(dispatchlists.cInvCode) as cInvCode, max(dispatchlists.cDefine23) as cDefine23,max(dispatchlists.cDefine24) as cDefine24, max(dispatchlists.cItemName) as cItemName,max(dispatchlists.cDefine25) as cDefine25, max(dispatchlists.cItem_CName) as cItem_CName,max(dispatchlists.cVenAbbName) as cVenAbbName, max(dispatchlists.iSOsID) as iSOsID,max(dispatchlists.iDLsID) as iDLsID, max(dispatchlists.DLID) as DLID,max(dispatchlists.iCorID) as iCorID, case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum(dispatchlists.iNatUnitPrice)/sum((case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end )) end as iNatUnitPrice, max(dispatchlists.iNatMoney) as iNatMoney, max(dispatchlists.KL) as KL,max(dispatchlists.KL2) as KL2, sum(dispatchlists.iNatTax) as iNatTax,sum(dispatchlists.iNatSum) as iNatSum,' if @IsHengDa = 'true' set @strSQL = @strSQL + 'null as iNatDiscount,(sum(dispatchlists.iSum) + sum(dispatchlists.iDiscount)) as iSum ,' else set @strSQL = @strSQL + 'sum(dispatchlists.iNatDiscount) as iNatDiscount,sum(dispatchlists.iSum) as iSum,' set @strSQL = @strSQL + ' sum(case when iTB=0 then dispatchlists.iNum else dispatchlists.TBNum end) as iNum , sum((case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end )) as iQuantity, sum(dispatchlists.iSettleNum) as iSettleNum,sum(dispatchlists.iSettleQuantity) as iSettleQuantity, max(dispatchlists.iQuotedPrice) as iQuotedPrice,' --含税单价.无税单价.无税金额.税额四个的处理 if @IsHengDa = 'true' set @strSQL = @strSQL + 'case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else (sum(dispatchlists.iSum) + sum(dispatchlists.iDiscount))/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) end as iTaxUnitPrice, case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum((dispatchlists.iSum + dispatchlists.iDiscount)/( 1 + dispatchlists.iTaxRate/100))/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end )end as iUnitPrice, sum((dispatchlists.iSum + dispatchlists.iDiscount)/( 1 + dispatchlists.iTaxRate/100)) as iMoney, sum(dispatchlists.iSum) + sum(dispatchlists.iDiscount) - sum((dispatchlists.iSum + dispatchlists.iDiscount)/( 1 + dispatchlists.iTaxRate/100)) as iTax , null as iDiscount,' else set @strSQL = @strSQL + 'case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum(dispatchlists.iSum)/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) end as iTaxUnitPrice, case when sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) = 0 then 0 else sum(dispatchlists.iSum)/sum(case when iTB=0 then dispatchlists.iQuantity else dispatchlists.TBQuantity end ) end as iUnitPrice, sum(dispatchlists.iMoney) as iMoney , sum(dispatchlists.iTax) as iTax, sum(dispatchlists.iDiscount) as iDiscount,' set @strSQL = @strSQL + ' case when count(distinct dispatchlists.iTaxRate) > 1 then '''' else max(dispatchlists.iTaxRate)end as iTaxRate, case when count(distinct dispatchlists.iTb)>1 then '''' else (case when max(cast(dispatchlists.iTb as int)) = 1 then ''正常'' else ''退补'' end) end as iTB, sum(dispatchlists.fSalePrice) as fSalePrice, max(dispatchlists.cDefine26) as cDefine26,max(dispatchlists.cDefine27) as cDefine27, max(dispatchlists.fSalePrice) as fSaleCost, max(dispatchlists.dVDate) as dVDate, case when count (distinct inventory.bService) >1 then '''' else (case when max(cast(inventory.bService as int)) = 1 then ''应税劳务'' else ''非应税劳务'' end) end as bService , case when count (distinct inventory.bInvBatch) >1 then '''' else (case when (max(cast(inventory.bInvBatch as int)))=1 then ''是'' else ''否'' end) end as bInvBatch , case when (count(distinct inventory.bFree1)) >1 then '''' else max(cast(inventory.bFree1 as varchar(10))) end as bFree1, case when count(distinct binvtype ) >1 then ''是'' else '''' end as bInvType, case when (count(distinct inventory.bFree2)) >1 then '''' else max(cast(inventory.bFree2 as varchar(10))) end as bFree2, max(inventory.cQuality) as cQuality,max(inventory.iInvWeight) as iInvWeight,max(inventory.iVolume) as iVolume,max(inventory.iInvRCost) as iInvRCost, max(inventory.iInvSPrice) as iInvSPrice,max(inventory.iInvSCost) as iInvSCost,max(inventory.iInvLSCost) as iInvLSCost,max(inventory.iInvNCost) as iInvNCost,max(inventory.iInvAdvance) as iInvAdvance, max(inventory.iInvBatch) as iInvBatch, max(inventory.iSafeNum) as iSafeNum,max(inventory.iTopSum) as iTopSum,max(inventory.iLowSum) as iLowSum,max(inventory.iInvMPCost) as iInvMPCost,max(inventory.cInvAddCode) as cInvAddCode,max(inventory.cInvDefine1) as cInvDefine1,' if @PrintKinds = 'CargoKinds' set @strSQL = @strSQL + ' max(InventoryClass.cInvCName) as cInvName, ' else set @strSQL = @strSQL + ' max(inventory.cInvName) as cInvName, ' set @strSQL = @strSQL + 'case when count(distinct inventory.cInvStd) >1 then '''' else max(inventory.cInvStd) end as cInvStd , case when count(distinct inventory.cInvM_Unit) > 1 then '''' else max(inventory.cInvM_Unit) end as cInvM_Unit, case when count(distinct inventory.cInvA_Unit) > 1 then '''' else max(inventory.cInvA_Unit) end as cInvA_Unit, max(inventory.cInvDefine2) as cInvDefine2,max(inventory.cInvDefine3) as cInvDefine3, case when count(distinct dispatchlists.iInvExchRate)>1 then '''' else max(dispatchlists.iInvExchRate) end as iInvExchRate, max(inventory.iVolume) as iVolume,max(inventory.iInvWeight) as iInvWeight,max(inventory.cPosName) as cPosName,max(inventory.cVenName) as cVenName, case when count(distinct dispatchlists.cWhCode) >1 then '''' else max(Warehouse.cWhName)end as cWhName, max(SO_SODetails.cSOCode) as cSOCode,max(Warehouse.cWhValueStyle) as cWhValueStyle,max(dispatchlists.fOutQuantity) as fOutQuantity,max(dispatchlists.fOutNum) as fOutNum,max(dispatchlists.cMemo) as cMemo from (((dispatchlists left join inventory_pos_ven as inventory ON dispatchlists.cInvCode=Inventory.cInvCode) left join Dispatchlist on dispatchlists.DLID=DispatchList.DLID)left join Warehouse on dispatchlists.cWhCode=Warehouse.cWhCode) left JOIN SO_SODetails ON DispatchLists.iSOsID=SO_SODetails.iSOsID ' if @PrintKinds = 'CargoName_Price' set @strSQL = @strSQL +' where dispatchlists.DLID= ' + @parm + ' group by dispatchlists.cInvCode , dispatchlists.iUnitPrice' else if @PrintKinds = 'CargoKinds' set @strSQL = @strSQL +' left join InventoryClass on InventoryClass.cInvCCode = Inventory.cInvCCode where dispatchlists.DLID= ' + @parm + ' group by inventory.cInvCCode' else if @PrintKinds = 'CargoCode_Free' set @strSQL = @strSQL +' where dispatchlists.DLID= ' + @parm + ' group by dispatchlists.cFree1,dispatchlists.cFree2,dispatchlists.cInvCode' if @IsHengDa = 'True' begin set @strSQL = @strSQL + ' union ' + @HengDaSQL1 end set @strSQL = @strSQL + ' order by max( Dispatchlists.AutoID) ' end end exec (@strSQL) --合并文件:C:\bak\Tong10.5Plus1\BZB\Do\合并脚本\script\UFDATA\PatchScript\DATA_ALTER_AR_客户发货到期应收款对帐单.sql --文件时间:2009-10-15 10:01:22 --合并时间:2011-01-12 10:11:46 -----------菜单中增加 客户发货到期应收款对帐单 jyw --if not exists ( select * from UFSystem..UA_SysMenu where cMenuId = 'AR050307') --INSERT INTO UFSystem..UA_SysMenu(cPosition, cMenuId, cMenuName, cSubId, iLevel, bVisible, cMemo) --VALUES('0011-0015-0007','AR050307','客户发货到期应收款对帐单','SA',3,1,NULL) --GO -----------客户发货到期应收款对帐单 权限预置表 --if not exists ( select * from UFSystem..UA_Auth where cAuth_Id = 'AR050307') --insert into UFSystem..UA_Auth (cAuth_Id,cAuth_Name) --values('AR050307','客户发货到期应收款对帐单') --GO -----------工作台增加按钮 --delete from ufsystem..ua_UserFlow where cKey = 'AR050307' --declare @iorder int --select @iorder = max(iorder) + 1 from UFSystem..Ua_SysFlow where cSysID = 'SA' --if not exists(select * from UFSystem..UA_SysFlow where cSysID = 'SA' and cKey = 'AR050307' ) --INSERT INTO UFSystem..UA_SysFlow(cType, cSysID, cKey, ccaption, bDefault, cTitle, bvisible, iorder, cEntType) --VALUES('FOOT','SA','AR050307','客户发货到期应收款对帐单',1,NULL,0,@iorder,NULL) --GO ---------------------报表查询定义 IF NOT EXISTS(SELECT * FROM Rpt_GlbDEF WHERE SystemID = 'SA' and name = '客户发货到期应收款对帐单') INSERT INTO Rpt_GlbDEF( SystemID, Name, Title, DatabaseEx, WhereEx, Predicate, Type, Relation, Note, Cols, Section, Fields, DataSource, BaseTable, IsBaseTable, IsControlCreate, IsBase, GroupDefine) VALUES('SA','客户发货到期应收款对帐单','客户发货到期应收款对帐单',NULL,NULL,NULL,42,'Heron',NULL,0,0,0,NULL,NULL,0,0,1,NULL) 销售普通发票 CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouchP_Title] @parm varchar(100) AS begin select SaleBillVouch.SBVID, (case when SaleBillVouch.bReturnFlag=1 then '负发票' else '正发票' end)as bReturnFlag, (case when SaleBillVouch.bFirst=1 then '期初' else '不是期初' end)as bFirst, (case when SaleBillVouch.bDisFlag=1 then '是' else '否' end)as bDisFlag, (case when SaleBillVouch.iDisp=1 then '先开发货单' else '先开发票' end)as iDisp, SaleBillVouch.cInvalider,SaleBillVouch.cDefine9,SaleBillVouch.cBCode,SaleBillVouch.cDefine10,SaleBillVouch.cexch_name, SaleBillVouch.cDefine8,SaleBillVouch.cBusType,SaleBillVouch.cMemo,SaleBillVouch.cMaker,SaleBillVouch.cVerifier, SaleBillVouch.citem_class,SaleBillVouch.citemcode,SaleBillVouch.cBillVer,SaleBillVouch.cPersonCode,SaleBillVouch.cSBVCode, SaleBillVouch.cVouchType,SaleBillVouch.cSTCode,SaleBillVouch.cDepCode,SaleBillVouch.cCusCode,SaleBillVouch.cPayCode, SaleBillVouch.cSOCode,SaleBillVouch.cDLCode,SaleBillVouch.cDefine1,SaleBillVouch.cDefine2,SaleBillVouch.cAccounter, SaleBillVouch.cDefine3,SaleBillVouch.cChecker,SaleBillVouch.cDefine5,SaleBillVouch.cDefine7,SaleBillVouch.iTaxRate, SaleBillVouch.iExchRate,SaleBillVouch.cDefine4,SaleBillVouch.cDefine6,SaleBillVouch.dDate,SaleBillVouch.dVerifyDate, customer.cCusAbbName,customer.cCusAddress,customer.cCusPhone,customer.cCusFax,customer.cCusBank,customer.cCusAccount, customer.cCusOAddress,customer.cCusPayCond,customer.cCusOType,customer.cCusName,customer.cCusRegCode,customer.iCusCreDate, customer.cCusCreGrade,customer.iARMoney,customer.cCusDepart,customer.cCusPPerson,customer.dCusDevDate,customer.cCusLPerson, customer.cCusRegCode,customer.cCusBank,customer.cCusAccount,customer.cCusEmail,customer.cCusAddress,customer.cCusPostCode, customer.cCusPhone,customer.cCusFax,customer.cCusBP,customer.cCusHand,customer.cCusPerson,customer.cCusOAddress, customer.cCusOType,customer.cCusWhCode,customer.iCusCreLine, SaleType.cSTName,Department.cDepName,Person.cPersonName,PayCondition.cPayName,Bank.cBName,Bank.cBAccount ,SaleBillVouch.cZQCode,SaleBillVouch.dZQDate,AccountPeriod.APName,Customer.cCusDefine1,Customer.cCusDefine2,Customer.cCusDefine3, salebillvouch.iPrnNum +1 as iPrnNum from (((((SaleBillVouch left join Customer on SaleBillVouch.cCusCode=Customer.cCusCode)left join SaleType on SaleBillVouch.cSTCode=SaleType.cSTCode)left join Department on SaleBillVouch.cDepCode=Department.cDepCode)left join Person on SaleBillVouch.cPersonCode=Person.cPersonCode)left join PayCondition on SaleBillVouch.cPayCode=PayCondition.cPayCode)left join Bank on SaleBillVouch.cBCode=Bank.cBCode left join AccountPeriod on SaleBillVouch.cZQCode = AccountPeriod.APCode where SaleBillVouch.SBVID=@parm end 销售专用发票 CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouchZ_Title] @parm varchar(100) AS begin select (case when SaleBillVouch.iDisp=1 then '先开发货单' else '先开发票' end)as iDisp,SaleBillVouch.SBVID, (case when SaleBillVouch.bReturnFlag=1 then '负发票' else '正发票' end)as bReturnFlag, (case when SaleBillVouch.bFirst=1 then '期初' else '不是期初' end)as bFirst, (case when SaleBillVouch.bDisFlag=1 then '是' else '否' end)as bDisFlag, SaleBillVouch.cDefine10,SaleBillVouch.cInvalider,SaleBillVouch.cDefine8,SaleBillVouch.cBCode,SaleBillVouch.cDefine9, SaleBillVouch.cexch_name,SaleBillVouch.cBusType,SaleBillVouch.cMemo,SaleBillVouch.cChecker,SaleBillVouch.cMaker, SaleBillVouch.cVerifier,SaleBillVouch.citem_class,SaleBillVouch.citemcode,SaleBillVouch.cBillVer,SaleBillVouch.cSBVCode, SaleBillVouch.cPayCode,SaleBillVouch.cPersonCode,SaleBillVouch.cSTCode,SaleBillVouch.cDepCode,SaleBillVouch.cCusCode, SaleBillVouch.cVouchType,SaleBillVouch.cSOCode,SaleBillVouch.cDLCode,SaleBillVouch.cDefine1,SaleBillVouch.cDefine2, SaleBillVouch.cAccounter,SaleBillVouch.cDefine3,SaleBillVouch.cDefine5,SaleBillVouch.cDefine7,SaleBillVouch.iTaxRate, SaleBillVouch.iExchRate,SaleBillVouch.cDefine6,SaleBillVouch.cDefine4,SaleBillVouch.dDate,SaleBillVouch.dVerifyDate, customer.cCusAbbName,customer.cCusAddress,customer.cCusPhone,customer.cCusFax,customer.cCusBank,customer.cCusAccount, customer.cCusOAddress,customer.cCusPayCond,customer.cCusOType,customer.cCusName,customer.cCusRegCode,customer.iCusCreDate, customer.cCusCreGrade,customer.iARMoney,customer.cCusDepart,customer.cCusPPerson,customer.dCusDevDate,customer.cCusLPerson, customer.cCusRegCode,customer.cCusBank,customer.cCusAccount,customer.cCusEmail,customer.cCusAddress,customer.cCusPostCode, customer.cCusPhone,customer.cCusFax,customer.cCusBP,customer.cCusHand,customer.cCusPerson,customer.cCusOAddress, customer.cCusOType,customer.cCusWhCode,customer.iCusCreLine,SaleType.cSTName,Department.cDepName,Person.cPersonName, PayCondition.cPayName,Bank.cBName,Bank.cBAccount ,SaleBillVouch.cZQCode,SaleBillVouch.dZQDate,AccountPeriod.APName,Customer.cCusDefine1,Customer.cCusDefine2,Customer.cCusDefine3, SaleBillVouch.iPrnNum +1 as iPrnNum from (((((SaleBillVouch left join customer on SaleBillVouch.cCusCode=customer.cCusCode)left join SaleType on SaleBillVouch.cSTCode=SaleType.cSTCode)left join Department on SaleBillVouch.cDepCode=Department.cDepCode)left join Person on SaleBillVouch.cPersonCode=Person.cPersonCode)left join PayCondition on SaleBillVouch.cPayCode=PayCondition.cPayCode)left join Bank on SaleBillVouch.cBCode=Bank.cBCode left join AccountPeriod on SaleBillVouch.cZQCode = AccountPeriod.APCode where SaleBillVouch.SBVID=@parm end 销售普通发票(红字) CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouchP_Title] @parm varchar(100) AS begin select SaleBillVouch.SBVID, (case when SaleBillVouch.bReturnFlag=1 then '负发票' else '正发票' end)as bReturnFlag, (case when SaleBillVouch.bFirst=1 then '期初' else '不是期初' end)as bFirst, (case when SaleBillVouch.bDisFlag=1 then '是' else '否' end)as bDisFlag, (case when SaleBillVouch.iDisp=1 then '先开发货单' else '先开发票' end)as iDisp, SaleBillVouch.cInvalider,SaleBillVouch.cDefine9,SaleBillVouch.cBCode,SaleBillVouch.cDefine10,SaleBillVouch.cexch_name, SaleBillVouch.cDefine8,SaleBillVouch.cBusType,SaleBillVouch.cMemo,SaleBillVouch.cMaker,SaleBillVouch.cVerifier, SaleBillVouch.citem_class,SaleBillVouch.citemcode,SaleBillVouch.cBillVer,SaleBillVouch.cPersonCode,SaleBillVouch.cSBVCode, SaleBillVouch.cVouchType,SaleBillVouch.cSTCode,SaleBillVouch.cDepCode,SaleBillVouch.cCusCode,SaleBillVouch.cPayCode, SaleBillVouch.cSOCode,SaleBillVouch.cDLCode,SaleBillVouch.cDefine1,SaleBillVouch.cDefine2,SaleBillVouch.cAccounter, SaleBillVouch.cDefine3,SaleBillVouch.cChecker,SaleBillVouch.cDefine5,SaleBillVouch.cDefine7,SaleBillVouch.iTaxRate, SaleBillVouch.iExchRate,SaleBillVouch.cDefine4,SaleBillVouch.cDefine6,SaleBillVouch.dDate,SaleBillVouch.dVerifyDate, customer.cCusAbbName,customer.cCusAddress,customer.cCusPhone,customer.cCusFax,customer.cCusBank,customer.cCusAccount, customer.cCusOAddress,customer.cCusPayCond,customer.cCusOType,customer.cCusName,customer.cCusRegCode,customer.iCusCreDate, customer.cCusCreGrade,customer.iARMoney,customer.cCusDepart,customer.cCusPPerson,customer.dCusDevDate,customer.cCusLPerson, customer.cCusRegCode,customer.cCusBank,customer.cCusAccount,customer.cCusEmail,customer.cCusAddress,customer.cCusPostCode, customer.cCusPhone,customer.cCusFax,customer.cCusBP,customer.cCusHand,customer.cCusPerson,customer.cCusOAddress, customer.cCusOType,customer.cCusWhCode,customer.iCusCreLine, SaleType.cSTName,Department.cDepName,Person.cPersonName,PayCondition.cPayName,Bank.cBName,Bank.cBAccount ,SaleBillVouch.cZQCode,SaleBillVouch.dZQDate,AccountPeriod.APName,Customer.cCusDefine1,Customer.cCusDefine2,Customer.cCusDefine3, salebillvouch.iPrnNum +1 as iPrnNum from (((((SaleBillVouch left join Customer on SaleBillVouch.cCusCode=Customer.cCusCode)left join SaleType on SaleBillVouch.cSTCode=SaleType.cSTCode)left join Department on SaleBillVouch.cDepCode=Department.cDepCode)left join Person on SaleBillVouch.cPersonCode=Person.cPersonCode)left join PayCondition on SaleBillVouch.cPayCode=PayCondition.cPayCode)left join Bank on SaleBillVouch.cBCode=Bank.cBCode left join AccountPeriod on SaleBillVouch.cZQCode = AccountPeriod.APCode where SaleBillVouch.SBVID=@parm end 销售专用发票(红字) CREATE PROCEDURE [dbo].[NewPrint_SaleBillVouchZ_Title] @parm varchar(100) AS begin select (case when SaleBillVouch.iDisp=1 then '先开发货单' else '先开发票' end)as iDisp,SaleBillVouch.SBVID, (case when SaleBillVouch.bReturnFlag=1 then '负发票' else '正发票' end)as bReturnFlag, (case when SaleBillVouch.bFirst=1 then '期初' else '不是期初' end)as bFirst, (case when SaleBillVouch.bDisFlag=1 then '是' else '否' end)as bDisFlag, SaleBillVouch.cDefine10,SaleBillVouch.cInvalider,SaleBillVouch.cDefine8,SaleBillVouch.cBCode,SaleBillVouch.cDefine9, SaleBillVouch.cexch_name,SaleBillVouch.cBusType,SaleBillVouch.cMemo,SaleBillVouch.cChecker,SaleBillVouch.cMaker, SaleBillVouch.cVerifier,SaleBillVouch.citem_class,SaleBillVouch.citemcode,SaleBillVouch.cBillVer,SaleBillVouch.cSBVCode, SaleBillVouch.cPayCode,SaleBillVouch.cPersonCode,SaleBillVouch.cSTCode,SaleBillVouch.cDepCode,SaleBillVouch.cCusCode, SaleBillVouch.cVouchType,SaleBillVouch.cSOCode,SaleBillVouch.cDLCode,SaleBillVouch.cDefine1,SaleBillVouch.cDefine2, SaleBillVouch.cAccounter,SaleBillVouch.cDefine3,SaleBillVouch.cDefine5,SaleBillVouch.cDefine7,SaleBillVouch.iTaxRate, SaleBillVouch.iExchRate,SaleBillVouch.cDefine6,SaleBillVouch.cDefine4,SaleBillVouch.dDate,SaleBillVouch.dVerifyDate, customer.cCusAbbName,customer.cCusAddress,customer.cCusPhone,customer.cCusFax,customer.cCusBank,customer.cCusAccount, customer.cCusOAddress,customer.cCusPayCond,customer.cCusOType,customer.cCusName,customer.cCusRegCode,customer.iCusCreDate, customer.cCusCreGrade,customer.iARMoney,customer.cCusDepart,customer.cCusPPerson,customer.dCusDevDate,customer.cCusLPerson, customer.cCusRegCode,customer.cCusBank,customer.cCusAccount,customer.cCusEmail,customer.cCusAddress,customer.cCusPostCode, customer.cCusPhone,customer.cCusFax,customer.cCusBP,customer.cCusHand,customer.cCusPerson,customer.cCusOAddress, customer.cCusOType,customer.cCusWhCode,customer.iCusCreLine,SaleType.cSTName,Department.cDepName,Person.cPersonName, PayCondition.cPayName,Bank.cBName,Bank.cBAccount ,SaleBillVouch.cZQCode,SaleBillVouch.dZQDate,AccountPeriod.APName,Customer.cCusDefine1,Customer.cCusDefine2,Customer.cCusDefine3, SaleBillVouch.iPrnNum +1 as iPrnNum from (((((SaleBillVouch left join customer on SaleBillVouch.cCusCode=customer.cCusCode)left join SaleType on SaleBillVouch.cSTCode=SaleType.cSTCode)left join Department on SaleBillVouch.cDepCode=Department.cDepCode)left join Person on SaleBillVouch.cPersonCode=Person.cPersonCode)left join PayCondition on SaleBillVouch.cPayCode=PayCondition.cPayCode)left join Bank on SaleBillVouch.cBCode=Bank.cBCode left join AccountPeriod on SaleBillVouch.cZQCode = AccountPeriod.APCode where SaleBillVouch.SBVID=@parm end 库存产成品入库单 CREATE PROCEDURE [dbo].[NewPrint_RecordInVouch_Title] @parm varchar(100) AS begin select (case when Rdrecord.bRdFlag=1 then '收' else '不收' end)as bRdFlag, Rdrecord.cVouchType,Rdrecord.cWhCode,Rdrecord.cCode,Rdrecord.cRdCode,Rdrecord.cDepCode,Rdrecord.cPersonCode,Rdrecord.cBusCode, Rdrecord.cProBatch,Rdrecord.cHandler,Rdrecord.cMemo,Rdrecord.cAccounter,Rdrecord.cMaker,Rdrecord.cDefine1,Rdrecord.cDefine2, Rdrecord.cDefine3,Rdrecord.cDefine8,Rdrecord.cDefine9,Rdrecord.cDefine10,Rdrecord.cSource,Rdrecord.cBusType, Rdrecord.cDefine5, Rdrecord.ID,Rdrecord.cDefine7,Rdrecord.cDefine6,Rdrecord.cDefine4,Rdrecord.dVeriDate,Rdrecord.dDate, Warehouse.cWhName,Department.cDepName,Person.cPersonName,Rd_Style.cRdName,RdRecord.iPrnNum + 1 as iPrnNum from (((Rdrecord left join Warehouse on Rdrecord.cWhCode=Warehouse.cWhCode)left join Department on Rdrecord.cDepCode=Department.cDepCode)left join Person on Rdrecord.cPersonCode=Person.cPersonCode)left join Rd_Style on Rdrecord.cRdCode=Rd_Style.cRdCode where Rdrecord.ID=@parm end --合并文件:C:\bak\Tong10.5Plus1\BZB\Do\合并脚本\script\UFDATA\PatchScript\DATA_ALTER_SA_应收明细帐查询.sql --文件时间:2009-10-15 10:27:12 --合并时间:2011-01-12 10:11:46 --删除模板中数据 delete from gl_myoutput where cauth = 'AR_UfGrid_mx' and csqrmode = 0 其他入库单 --- 其他入库单 CREATE PROCEDURE [dbo].[newprint_OtherInVouch_Body] @parm varchar(100) AS begin select Inventory.cInvAddCode,Inventory.cInvName,Inventory.cInvStd,Inventory.cInvA_Unit,Inventory.cInvM_Unit,Inventory.cReplaceItem, Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3,Inventory.cPosName as cPosName_Inv,Inventory.cVenName, Inventory.iInvSPrice,Inventory.iInvSCost,Inventory.iInvNCost,Inventory.iInvLSCost,Inventory.iInvMPCost,Inventory.cVenCode, Inventory.iTopSum,Inventory.iLowSum,Inventory.iSafeNum,Inventory.iInvWeight,Inventory.iVolume,Inventory.cQuality, (case when (rdrecords.iNum=0 or rdrecords.iNum is null)then null else rdrecords.iInvExchRate end)as iInvExchRate, rdrecords.cInvCode,rdrecords.cFree1,rdrecords.cFree2,rdrecords.cBatch,rdrecords.cVouchCode, rdrecords.cdefine22,rdrecords.cdefine23,rdrecords.cdefine24,rdrecords.cdefine25,rdrecords.cItemCode,rdrecords.cName, rdrecords.cItem_class,rdrecords.cItemCName,rdrecords.AutoID,rdrecords.ID,rdrecords.iNum,rdrecords.iQuantity, rdrecords.iUnitCost,rdrecords.iSoutQuantity,rdrecords.iPrice,rdrecords.iPUnitCost,rdrecords.iPPrice,rdrecords.cdefine26, rdrecords.cdefine27,rdrecords.iTrIds,rdrecords.iSoutNum,rdrecords.dVDate, Position.cPosName from (rdrecords left join inventory_pos_ven as inventory ON rdrecords.cInvCode = Inventory.cInvCode)left join Position on rdrecords.cPosition=Position.cPosCode where Rdrecords.ID=@parm order by rdrecords.AutoID end 材料出库单 CREATE PROCEDURE [dbo].[NewPrint_RecordOutVouch_Title] @parm varchar(100) AS begin select (case when Rdrecord.bRdFlag=1 then '发' else '不发' end)as bRdFlag, Rdrecord.cVouchType,Rdrecord.cWhCode,Rdrecord.cBusCode,Rdrecord.cCode,Rdrecord.cRdCode,Rdrecord.cDepCode,Rdrecord.cPersonCode,Rdrecord.cProBatch,Rdrecord.cHandler,Rdrecord.cMemo,Rdrecord.cAccounter,Rdrecord.cMaker,Rdrecord.cDefine1,Rdrecord.cDefine2, Rdrecord.cDefine3,Rdrecord.cDefine8,Rdrecord.cDefine9,Rdrecord.cDefine10,Rdrecord.cSource,Rdrecord.cBusType,Rdrecord.cDefine5,Rdrecord.ID,Rdrecord.cDefine7,Rdrecord.cDefine6,Rdrecord.cDefine4,Rdrecord.dVeriDate,Rdrecord.dDate, Warehouse.cWhName, Department.cDepName, Person.cPersonName, Rd_Style.cRdName,Rdrecord.iPrnNum + 1 as iPrnNum from (((Rdrecord left join Warehouse on Rdrecord.cWhCode=Warehouse.cWhCode)left join Department on Rdrecord.cDepCode=Department.cDepCode)left join Person on Rdrecord.cPersonCode=Person.cPersonCode)left join Rd_Style on Rdrecord.cRdCode=Rd_Style.cRdCode where Rdrecord.ID=@parm end 其它出库单 CREATE PROCEDURE NewPrint_OtherOutVouch_Title @parm varchar(100) AS begin select (case when Rdrecord.bRdFlag=1 then '发' else '不发' end)as bRdFlag, Rdrecord.cVouchType,Rdrecord.cBusType,Rdrecord.cBusCode,Rdrecord.cWhCode,Rdrecord.cCode,Rdrecord.cRdCode,Rdrecord.cDepCode, Rdrecord.cPersonCode,Rdrecord.cCusCode,Rdrecord.cHandler,Rdrecord.cMemo,Rdrecord.cAccounter,Rdrecord.cMaker, Rdrecord.cDefine1,Rdrecord.cDefine2,Rdrecord.cDefine3,Rdrecord.cDefine8,Rdrecord.cDefine9,Rdrecord.cDefine10, Rdrecord.cSource, Rdrecord.cDefine5,Rdrecord.ID,Rdrecord.cDefine7,Rdrecord.cDefine6,Rdrecord.cDefine4,Rdrecord.dVeriDate,Rdrecord.dDate, VouchType.cVouchName,Warehouse.cWhName,Rd_Style.cRdName,Department.cDepName,Person.cPersonName,Customer.cCusAbbName from (((((Rdrecord left join VouchType on Rdrecord.cVouchType=VouchType.cVouchType)left join Warehouse on Rdrecord.cWhCode=Warehouse.cWhCode)left join Rd_Style on Rdrecord.cRdCode=Rd_Style.cRdCode)left join Department on Rdrecord.cDepCode=Department.cDepCode)left join Person on Rdrecord.cPersonCode=Person.cPersonCode)left join Customer on Rdrecord.cCusCode=Customer.cCusCode where Rdrecord.ID=@parm end 调拨单 CREATE PROCEDURE NewPrint_TransVouch_Title @parm varchar(100) AS begin select transvouch.cTVCode,transvouch.cODepCode,transvouch.cIDepCode,transvouch.cIRdCode,transvouch.cORdCode,transvouch.cTVMemo, transvouch.cPersonCode,transvouch.cDefine1,transvouch.cDefine2,transvouch.cDefine3,transvouch.cDefine9,transvouch.cDefine8, transvouch.cDefine10,transvouch.cAccounter,transvouch.cMaker,transvouch.cOWhCode,transvouch.cIWhCode,transvouch.cDefine5, transvouch.cDefine7,transvouch.cDefine6,transvouch.cDefine4,transvouch.dTVDate, Person.cPersonName,Department_IN.cDepName as cDepName,Department_OUT.CdepName as cDepName_1,Rd_Style_In.cRdName as cRdName,Rd_Style_Out.CRdName as cRdName_1, Warehouse_In.cWhName as cWhName_1,Warehouse_Out.CWhName as cWhName from ((((((transvouch left join Person on transvouch.cPersonCode=Person.cPersonCode)left join Department as Department_IN on transvouch.cIDepCode=Department_IN.cDepCode)left join Department as Department_OUT on transvouch.cODepCode=Department_OUT.cDepCode)left join Rd_Style as Rd_Style_In on transvouch.cIRdCode=Rd_Style_In.cRdCode)left join Rd_Style as Rd_Style_Out on transvouch.cORdCode=Rd_Style_Out.cRdCode)left join Warehouse as Warehouse_In on transvouch.cIWhCode=Warehouse_In.cWhCode)left join Warehouse as Warehouse_Out on transvouch.cOWhCode=Warehouse_Out.cWhCode where transvouch.cTVCode=@parm end 盘点单 --- 盘点单 CREATE PROCEDURE [dbo].[NewPrint_CheckVouch_Body] @parm varchar(100) AS begin select checkvouchs.cInvCode,checkvouchs.cFree1,checkvouchs.cFree2,checkvouchs.cCVBatch,checkvouchs.cCVReason,checkvouchs.cCVCode, checkvouchs.cdefine22,checkvouchs.cdefine23,checkvouchs.cdefine24,checkvouchs.cdefine25, checkvouchs.cItemCode,checkvouchs.cName,checkvouchs.cItem_class,checkvouchs.cItemCName,checkvouchs.RdsID,checkvouchs.iCVCNum, checkvouchs.iCVCQuantity,(case when checkvouchs.iJhdj is null then 0 else checkvouchs.iJhdj end) as iJhdj, checkvouchs.iJhJe,checkvouchs.iCVNum,checkvouchs.iSjDJ, checkvouchs.iCVQuantity,checkvouchs.iSjJe,checkvouchs.cdefine27,checkvouchs.cdefine26,checkvouchs.dDisDate, Inventory.cInvAddCode,Inventory.cInvName,Inventory.cInvStd,Inventory.cInvM_Unit,Inventory.cReplaceItem,Inventory.cInvDefine1, Inventory.cInvDefine2,Inventory.cInvDefine3,Inventory.cInvA_Unit,Inventory.cPosName as cPosName_Inv, Inventory.iInvSPrice,Inventory.iInvSCost,Inventory.iInvNCost,Inventory.iInvLSCost,Inventory.iInvMPCost,Inventory.cVenCode, Inventory.iTopSum,Inventory.iLowSum,Inventory.iSafeNum,Inventory.iInvWeight,Inventory.iVolume,Inventory.cQuality, (CASE WHEN (checkvouchs.iCVCNum=0 Or checkvouchs.iCVCNum IS NULL) THEN null ELSE checkvouchs.iInvExchRate END) AS iInvExchRate, Position.cPosName from (checkvouchs left join inventory_pos_ven as inventory on checkvouchs.cInvCode=Inventory.cInvCode)left join Position on checkvouchs.cPosition=Position.cPosCode where checkvouchs.cCVCode=@parm order by checkvouchs.AutoID end 核算入库调整单 CREATE PROCEDURE NewPrint_JustInVouch_Title @parm varchar(100) AS begin select (case when JustInVouch.bRdFlag=1 then '收' else '不收' end)as bRdFlag, JustInVouch.cHandler,JustInVouch.cAccounter,JustInVouch.cMaker,JustInVouch.cJVMemo,JustInVouch.cJVDefine1, JustInVouch.cJVDefine2,JustInVouch.cJVDefine3,JustInVouch.cJVCode,JustInVouch.cVouchType,JustInVouch.cWhCode, JustInVouch.cUnitCode, JustInVouch.cDepCode,JustInVouch.cPersonCode,JustInVouch.cRdCode,JustInVouch.cDefine1,JustInVouch.cDefine2, JustInVouch.cDefine3,JustInVouch.cDefine8,JustInVouch.cDefine9,JustInVouch.cDefine10,JustInVouch.cDefine5, JustInVouch.cDefine7,JustInVouch.cDefine6,JustInVouch.cDefine4,JustInVouch.dJVDate, Warehouse.cWhName,Vendor.cVenAbbName,Department.cDepName,Rd_Style.cRdName,Person_Operation.cPersonName as cPersonName, Person_cHandler.cPersonName as cPersonName_1 from (((((JustInVouch left join Warehouse on JustInVouch.cWhCode=Warehouse.cWhCode)left join Vendor on JustInVouch.cUnitCode=Vendor.cVenCode)left join Department on JustInVouch.cDepCode=Department.cDepCode)left join Rd_Style on JustInVouch.cRdCode=Rd_Style.cRdCode)left join Person as Person_Operation on JustInVouch.cPersonCode=Person_Operation.cPersonCode)left join Person as Person_cHandler on JustInVouch.cHandler=Person_cHandler.cPersonCode where JustInVouch.cJVCode=@parm end 出库调整单 Create PROCEDURE NewPrint_JustOutVouch_Body @parm varchar(100) AS begin select JustInVouchs.cJVCode,JustInVouchs.cInvCode,JustInVouchs.cFree1,JustInVouchs.cFree2,JustInVouchs.cObjCode,JustInVouchs.cName, JustInVouchs.cDefine22,JustInVouchs.cDefine23,JustInVouchs.cDefine24,JustInVouchs.cDefine25,JustInVouchs.cItemCName, JustInVouchs.cItemCode,JustInVouchs.cItem_class,JustInVouchs.cDefine27,JustInVouchs.cDefine26,JustInVouchs.AutoID, JustInVouchs.iJVPrice,Inventory.cInvName,Inventory.cInvStd, Inventory.iTopSum,Inventory.iLowSum,Inventory.iSafeNum,Inventory.iInvWeight,Inventory.iVolume,Inventory.cQuality, Inventory.cInvAddCode,Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3,Inventory.cPosName as cPosName_Inv from JustInVouchs left join inventory_pos_ven as inventory on JustInVouchs.cInvCode=Inventory.cInvCode where JustInVouchs.cJVCode=@parm end
G6E科目自定义辅助核算如何使用 魏雯【业务场景】某物业公司的业务可分为中、高档小区,该公司购买了G6E软件,想分别单独核算每个小区的业务,请问在G6E软件中是否可以实现独立核算。【业务分析】G6E软件支持自定义辅助核算,该业务可以使用自定义辅助核算来实现,新增自定义辅助项目“物业”。【操作步骤】1.设置-基础档案-财务-自定义辅助项档案-增加-维护新辅助项名称“物业”-下一步2.自定义辅助项结构-默认-下一步-完成3.自定义辅助项-自定义辅助项1-选择维护好的辅助项名称4.自定义辅助项分类定义-增加(高端小区、中端小区)5.档案内容-维护(阳光小区-高端小区、月光小区-中端小区)6.设置-基础档案-财务-会计科目-材料,挂自定义辅助项“物业”。7.填制凭证- “材料”科目选择对应的自定义辅助核算8.查询收支分类科目账选不到这个科目9.查询综合辅助账-勾选“物业”-添加-科目(材料)-物业(阳光小区)-包含未记账凭证-打开10.挂自定义辅助核算的科目可以查看综合辅助总账、综合辅助明细账、综合辅助余额表、综合辅助多栏账总结:1、功能、经济、收入分类自定义辅助核算数据可以在收支分类科目账和综合辅助账进行查询2、其他的自定义辅助核算数据只能通过综合辅助账进行查询3、通过项目核算实现功能、经济、收入分类数据可以在项目辅助项和综合辅助账进行查询
T6报错更新任务库时发生冲突,请重新注册 魏雯【问题现象】系统管理注册时提示:更新任务库时发生冲突,请重新注册。见下图:【原因分析】打开系统管理报错,考虑是由于系统库异常造成的,提示中有出现表UA_Tasklog,所以判断是该表异常导致报错。UA_Tasklog是站点网络控制表,与其相关的还有功能操作网络控制表UA_Task。【解决方案】1. 备份好账套数据,如果没有做正常备份,请做好物理数据备份(备份T6安装路径下的admin文件夹,路径:安装的本地磁盘\T6SOFT\Admin),打开T6系统管理,点击【系统【注册】,用户名使用“admin”,密码默认为空,点击【登入】重现问题现象,使用事件跟踪器查询报错重现时的语句。2.表UA_tasklog出现两次,进入企业管理器查看表UA_tasklog,发现系统库中没有表UA_tasklog,所以判断是表UA_tasklog丢失导致的。3.重建表UA_tasklog,需要使用创建表脚本。T6软件安装路径下有创建系统库的模板文件ufsystem.bak,可以将该文件(ufsystem.bak)强制还原到某个新建的数据库中,这样可以还原所有系统库的表,然后查询、复制创建表UA_tasklog的脚本。具体操作步骤如下:A.登入数据库企业管理器B.右击【数据库】点击【新建】,新建数据库123。C.右击【数据库】,选择【还原数据库】,在【常规】页,目标数据库选择123,点击【源设备】,选择系统库模板文件ufsystem.bak(路径:安装的本地磁盘\T6SOFT\Admin)D. 在【选项】页选择【覆盖现有数据库】,将系统库模板文件还原到数据库123中E.还原完成后,进入数据库“123”中,找到表UA_tasklog,右击表UA_tasklog,选择【编写脚本为】-【CREATE到】-【新查询编辑器窗口】,查看创建表UA_tasklog的脚本,并全选复制F.选择系统库UFSystem,执行表UA_tasklog的创建脚本H.重新数据库服务I.重启服务后重新使用admin注册登入系统管理,可以正常登入。
T3暂估业务的实际应用问题现象: 图鸟信息科技有限公司6月收到天语公司手机一部,未收到结算发票,暂估单价900元(不含税价) 。7月收到结算发票,发票价格(不含税)800元。我们软件提供了三种暂估方式,以下是我们三种暂估方式的实际应用。解决方案:一、单到回冲解决步骤:1、点击“采购管理”—“采购入库单” 填制一张采购入库单,点击“增加”—“采购入库单”输入数量和暂估单价2、点击“库存管理”—“采购入库单审核”—“审核“, 3、采购入库单记账,点击“核算管理”—“正常单据记账”4、点击选择下面单元格知道出现打勾符号 ,点“记账 ”5、点击“购销单据制单”—“采购入库单(暂估记账)”—“确认““6、点击“全选”—“确定”7、输入借贷方科目 —点击“生成”,生成凭证,点“保存”8、分别点击“采购管理”—“月末结账”,点击“销售管理”—“月末结账”,点击“库存管理”—“月末结账”,点击“核算管理”—“月末结账”9、7月采购发票到了 ,重新登录软件--选择7月进入,点击“采购管理 ”—“采购发票”—“增加”—输入数量金额—“保存”—“审核”10、点击“采购结算”—时间选择6.1到7.1,勾选采购入库单和采购发票,点击“结算”11、点击“核算管理”—“暂估成本处理”,勾选记录,点击“暂估”12、点击“核算管理”—“明细账”,可以看到一条蓝字回冲单和一条红字回冲单13、点击“购销单据制单”—“选择”,勾选 “红字回冲单”和蓝字会回冲单“报销”14、点击“供应商往来制单”—“现结制单” 15、点击“全选”—“制单”输入借贷方科目—保存 解决方案:二、月初回冲解决步骤:1、点击“采购管理”—“采购入库单” 填制一张采购入库单,点击“增加”—“采购入库单”输入数量和暂估单价2、点击“库存管理”—“采购入库单审核”—“审核“,3、采购入库单记账,点击“核算管理”—“正常单据记账”4、点击选择下面单元格知道出现打勾符号,点“记账”5、点击“购销单据制单”—“采购入库单(暂估记账)”—“确认“6、点击“全选”—“确定”7、输入借贷方科目—点击“生成”,生成凭证,点“保存”8、分别点击“采购管理”—“月末结账”,点击“销售管理”—“月末结账”,点击“库存管理”—“月末结账”,点击“核算管理”—“月末结账”9、点击“核算管理”—“账表”—“明细账”,可以看到红圈出的一笔7月初的红字回冲记录。10、重新登录软件--选择7月进入,点击“购销单据制单”,勾选红字回冲单11、勾选记录,点击“确定”—输入科目,点击生成—保存12、填制采购发票13、点击“采购结算”—时间选择2013-06-01到2013-07-31,此处注意选择日期,过滤上个月的单据。14、勾选采购入库单和采购发票,点击“确认”15、点击“结算”16、点击“核算管理”—“暂估成本处理”,勾选记录,点击“暂估”17、点击“核算管理”—“供应商往来制单”—勾选“发票制单”—“确认”,点击“制单”—输入科目—“保存”18、点击“购销单据制单”—“蓝字回冲单(报销)”—“确认”,勾选记录—点击“生成”—输入借贷方科目—生成—保存知识拓展:1、注意:若7月份未收到发票,那就是可能延续到以后月份发票才会收到,那么我们直接进行月末处理即可,点击“月末处理”—“确定”2、点击“核算”—“账表”—“明细账”,可以看到在期末处理后,软件生成了一张蓝字回冲单。3、点击—“购销单据制单”—勾选“蓝字回冲单(暂估)”—输入科目—“生成”—“保存”解决方案:三、单到补差解决步骤:1、点击“采购管理”—“采购入库单” 填制一张采购入库单,点击“增加”—“采购入库单”输入数量和暂估单价2、点击“库存管理”—“采购入库单审核”—“审核“,3、采购入库单记账,点击“核算管理”—“正常单据记账”4、点击选择下面单元格知道出现打勾符号,点“记账”5、点击“购销单据制单”—“采购入库单(暂估记账)”—“确认““6、点击“全选”—“确定”7、输入借贷方科目—点击“生成”,生成凭证,点“保存”8、分别点击“采购管理”—“月末结账”,点击“销售管理”—“月末结账”,点击“库存管理”—“月末结账”,点击“核算管理”—“月末结账”9、7月采购发票到了,重新登录软件--选择7月进入,点击“采购管理”—“采购发票”—“增加”—输入数量金额—“保存”—“审核”10、点击“采购结算”—时间选择6.1到7.1,勾选采购入库单和采购发票,点击“结算”11、点击“核算管理”—“暂估成本处理”,勾选记录,点击“暂估”12、暂估之后,点击“核算管理”—“明细账”出现了一笔调整记录13、点击“入库调整单”可以看到一笔入库调整记录14、点击“核算管理”—“购销单据制单”,勾选“入库调整单”,点击“确认”15、点击“供应商往来制单”—勾选“发票制单”—“确认”
T3设置操作员看不到出入库单单价和金额原因分析:仓库主管对于仓库的价格有着严格的保密要求,对于某些操作员是没有权限查看存货的价格。如何在软件中设置某个操作员没有查询价格的权限呢?解决方案: 一、设置仓库权限1.依次点击“基础设置”-“购销存”-“仓库档案”-“权限”。2.弹出仓库权限设置,点击“编辑”出现“权限配置窗口”,选中002操作员,在该界面的右边显示需要录入的相关数据,“显示金额”栏中选择“否”。完毕之后直接按“退出”,设置好之后该操作员没有查看某个仓库的出入库价格的权限。二、查看出入库单扩展:1.在设置仓库查看权限时,需要注意该操作员(002)不是账套主管的权限,否则可以任意进入账套修改仓库权限中的“显示金额”。在“系统管理”中我们则给002操作员相应的权限,如果是单核算模块,我们可以给如下权限如图:a.如果没有选择“公用目录设置”而直接给“核算”这个权限,登入t3软件点开“核算管理”-“采购入库单”,会有如图提示:如果点击“基础设置”-“购销存”-“仓库档案”会有如下提示:b.在“系统管理”-“权限”下面勾选“公用目录设置”时,需要注意取消“仓库档案”的权限。如图:2.如果在仓库权限中设置了(002)的权限,那么该操作员点击“采购入库单”时不能选择没有设置权限的“仓库”。如图:如果需要有其他仓库的选择的权限和显示金额的权限,则需要返回仓库档案中的权限中去添加。如图
新年大吉
  • 冬去山川齐奇丽
  • 喜来桃里共芳香