其他出库单生成凭证报错
金蝶云社区-云社区用户8VH71234
云社区用户8VH71234
0人赞赏了该文章 1,565次浏览 未经作者许可,禁止转载编辑于2016年05月18日 08:41:46

环境:服务器:windows server 2008 r2
数据库:sqlserver2005 sp3
软件版本:KIS旗舰版4.0
开始的时候,其他出库单设置了几个自定义字段,然后在生成凭证的时候,就报错(见附件),后来把其他出库单中的自定义项删除了,依旧不能生成凭证,错误还是存在,通过后台跟踪,语句如下:
select * from Select distinct t1.FInterID,t1.FHookInterID,t1.FEntryID, t1.FDeptIDName From (select u1.FDetailID AS FListEntryID,0 AS FSel,t14.FName AS FPlanVchTplName,t13.FName AS FActualVchTplName,v1.FPlanVchTplID,v1.FActualVchTplID,v1.FVchInterID,v1.FTranType, v1.FHookInterID,v1.FInterID,
u1.FEntryID,t34.FNumber AS FSupplyNumber,v1.Fdate,case when v1.FCheckerID>0 then 'Y' when v1.FCheckerID<0 then 'Y' else '' end AS FCheck,case when v1.FCancellation=1 then 'Y' else '' end AS FCancellation,t4.FName AS FDeptIDName,v1.Fuse,v1.FBillNo,t7.FName AS FDCStockIDName,t4.FNumber AS FDepartmentNumber,v1.FPrintCount,t12.FShortNumber AS FItemIDName,t12.FNumber AS FFullNumber,t12.Fname AS FItemName,t12.Fmodel AS FItemModel,t15.FName AS FUnitIDName,u1.FBatchNo,u1.Fauxqty,u1.FComplexQty,u1.Fauxprice,u1.Famount,t8.FName AS FFManagerIDName,t9.FName AS FSManagerIDName,t10.FName AS FuserName,t24.FName AS FCheckerName,u1.FNote,(SELECT (SELECT FName FROM t_VoucherGroup WHERE FGroupID=t_Voucher.FGroupID)+'-'+CONVERT(Varchar(30),FNumber) FROM t_Voucher WHERE FVoucherid=v1.FVchInterID) AS FVoucherNumber,left('Y',v1.FChildren) AS FReStatus,v1.FCheckDate, (CASE t31.FName WHEN '*' THEN '' ELSE t31.FName END) AS FAuxPropIDName,t31.FNumber AS FAuxPropIDNumber,t34.FName AS FSupplyIDName,u1.FOrderBillNo,u1.FSourceBillNo,t70.FName AS FSourceTranType,t106.FName AS FEmpIDName,t107.FName AS FManagerIDName,t12.FQtyDecimal,t12.FPriceDecimal,t30.FName AS FBaseUnitID,u1.FQty AS FBaseQty,u1.FAuxPlanPrice,u1.FPlanAmount,Case WHEN t12.FStoreUnitID=0 THEN '' Else t500.FName end AS FCUUnitName,Case WHEN t12.FStoreUnitID=0 THEN '' Else u1.FQty/t500.FCoefficient end AS FCUUnitQty,Case When v1.FCurrencyID is Null Or v1.FCurrencyID='' then (Select FScale From t_Currency Where FCurrencyID=1) else t503.FScale end AS FAmountDecimal, (CASE t510.FName WHEN '*' THEN '' ELSE t510.FName END) AS FSPName,u1.FKFPeriod,u1.FKFDate,u1.FPeriodDate,case when (v1.FROB <> 1) then 'Y' else '' end AS FRedFlag,t530.FName AS FBillTypeName,v1.FBillTypeID,u1.FMapName,u1.FMapNumber,t7.FNumber AS FDCStockIDNumber,u1.FSecCoefficient,u1.FSecQty,t554.FName AS FSecUnitName,(CASE v1.FBrID WHEN 0 THEN NULL ELSE t560.FName END) AS FBrID,u1.FBarCode,t1031.FName AS FComCategoryID,t1032.FName AS FComBrandID,v1.FHeadSelfB0937,v1.FHeadSelfB0938,t1013.FName AS FHeadSelfB0939,t1014.FName AS FHeadSelfB0940,t1015.F_102 AS FEntrySelfB0942
from ICStockBill v1 Inner Join ICStockBillEntry u1 on v1.FInterID=u1.FInterID
left outer join t_Department t4 on v1.FDeptID=t4.FItemID
Inner Join t_Stock t7 on u1.FDCStockID=t7.FItemID
left outer join t_Emp t8 on v1.FFManagerID=t8.FItemID
left outer join t_Emp t9 on v1.FSManagerID=t9.FItemID
Inner Join t_User t10 on v1.FBillerID=t10.FUserID
Inner Join t_ICItem t12 on u1.FItemID=t12.FItemID
Inner Join t_MeasureUnit t15 on u1.FUnitID=t15.FItemID
left outer join t_User t24 on v1.Fcheckerid=t24.FUserID
left outer join t_AuxItem t31 on u1.FAuxPropID=t31.FItemid
left outer join t_MeasureUnit t30 on t12.FUnitID=t30.FMeasureUnitID
left outer join t_Organization t34 on v1.FSupplyID=t34.FItemID
left outer join v_ICTransType t70 on u1.FSourceTranType=t70.FID
left outer join ICVoucherTpl t14 on v1.FPlanVchTplID=t14.FInterID
left outer join ICVoucherTpl t13 on v1.FActualVchTplID=t13.FInterID
left outer join t_Emp t106 on v1.FEmpID=t106.FItemID
left outer join t_Emp t107 on v1.FManagerID=t107.FItemID
left outer join t_MeasureUnit t500 on t12.FStoreUnitID=t500.FItemID
left outer join t_Currency t503 on v1.FCurrencyID=t503.FCurrencyID
left outer join t_StockPlace t510 on u1.FDCSPID=t510.FSPID
left outer join ICBillType t530 on v1.FBillTypeID=t530.FID
left outer join t_SonCompany t550 on v1.FRelateBrID=t550.FItemID
left outer join t_MeasureUnit t554 on t12.FSecUnitID=t554.FItemID
left outer join t_SonCompany t560 on v1.FBrID=t560.FItemID
left outer join t_BaseBondedManageType t621 on v1.FManageType=t621.FID
Inner Join t_SubMessage t123 on u1.FPlanMode=t123.FInterID
left outer join t_Item t1032 on u1.FComBrandID=t1032.FItemID
left outer join t_ICItem t1033 on u1.FItemID=t1033.FItemID
left outer join t_Item t1013 on v1.FHeadSelfB0939=t1013.FItemID
left outer join t_Item t1014 on v1.FHeadSelfB0940=t1014.FItemID
left outer join t_ICItem t1015 on u1.FItemID=t1015.FItemID

where 1=1 ) t1
Inner Join Temp_ICVoucherNoteInterID182533 t2 On t1.FInterID=t2.FInterID
不知道应该是什么原因导致的???

错误.png(7.63KB)