問題現(xiàn)象:用友T3財務(wù)軟件單據(jù)設(shè)置提示:在對應(yīng)所需名稱或序數(shù)的集合中,未找到項目,主要情況為:年結(jié)操作后新增采購發(fā)票時報錯,提示:在對應(yīng)所需名稱或序數(shù)的集合中,未找到項目。---cInvDefine1。
問題分析:由于PpurBilltail視圖缺少對應(yīng)的列,此情況可能是賬套在舊版本上生成新年度賬,上年度執(zhí)行過補(bǔ)丁腳本,而新年度賬套沒有執(zhí)行補(bǔ)丁腳本所致。
解決方案1:
打最新版本補(bǔ)丁包,刪除新年度賬,然后建立新年年度賬,重新結(jié)轉(zhuǎn)數(shù)據(jù)
解決方案2:
在查詢分析器上執(zhí)行下面的SQL腳本,更新新年度賬中的對應(yīng)視圖也可以:
--修改普通發(fā)票視圖
ALTER VIEW dbo.ppurBilltail AS
SELECT PurBillVouchs.ID, PurBillVouchs.PBVID,
PurBillVouchs.cInvCode, Inventory.cInvAddCode,
Inventory.cInvName, Inventory.cInvStd,
Inventory.cInvCCode, Inventory.cInvM_Unit,
Inventory.cInvA_Unit, Inventory.bService, (CASE WHEN (PurBillVouchs.iNum=0 Or PurBillVouchs.iNum IS NULL) THEN 0
ELSE (PurBillVouchs.iPBVQuantity/PurBillVouchs.iNum) END) AS iInvExchRate,Inventory.bInvBatch,
PurBillVouchs.iPBVQuantity, PurBillVouchs.iNum,
PurBillVouchs.iOriCost, PurBillVouchs.iOriMoney,
PurBillVouchs.iOriTaxPrice, PurBillVouchs.iOriSum,
PurBillVouchs.iCost, PurBillVouchs.iMoney,
PurBillVouchs.iTaxPrice, PurBillVouchs.iSum,
PurBillVouchs.iExMoney, PurBillVouchs.iLostQuan,
PurBillVouchs.iNLostQuan, PurBillVouchs.iNLostMoney,
PurBillVouchs.iOriTotal, PurBillVouchs.iTotal,
PurBillVouchs.cDebitHead, PurBillVouchs.cTaxHead,
PurBillVouchs.bExBill, PurBillVouchs.dSignDate,
PurBillVouchs.cFree1, PurBillVouchs.cFree2,
PurBillVouchs.dInDate, Inventory.bInvType,
PurBillVouchs.cDefine22,PurBillVouchs.cDefine23,PurBillVouchs.cDefine24,PurBillVouchs.cDefine25,PurBillVouchs.cDefine26,PurBillVouchs.cDefine27,PurBillVouchs.iTaxRate,PurBillVouchs.cItemCode,PurBillVouchs.cItemName,PurBillVouchs.cItem_class,fItem.cItem_name,PurBillVouchs.mNLostTax,PurBillVouchs.cNLostType,PurBillVouchs.iPOsid ,Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3 FROM PurBillVouchs
LEFT JOIN Inventory ON
PurBillVouchs.cInvCode=Inventory.cInvCode LEFT JOIN fItem ON PurbillVouchs.cItem_class=fitem.cItem_class
GO
--修改專用發(fā)票視圖
ALTER View zhpurbilltail AS SELECT PurBillVouchs.ID, PurBillVouchs.PBVID, PurBillVouchs.cInvCode,
Inventory.cInvAddCode, Inventory.cInvName,
Inventory.cInvStd, Inventory.cInvCCode,
Inventory.cInvM_Unit, Inventory.cInvA_Unit,
Inventory.bService,
(CASE WHEN (PurBillVouchs.iNum=0 Or
PurBillVouchs.iNum IS NULL)
THEN 0 ELSE
(PurBillVouchs.iPBVQuantity/PurBillVouchs.iNum) END) AS
iInvExchRate,Inventory.bInvBatch, PurBillVouchs.iPBVQuantity, PurBillVouchs.iNum,
PurBillVouchs.iOriCost, PurBillVouchs.iOriMoney,
PurBillVouchs.iOriTaxPrice, PurBillVouchs.iOriSum,
PurBillVouchs.iCost, PurBillVouchs.iMoney,
PurBillVouchs.iTaxPrice, PurBillVouchs.iSum,
PurBillVouchs.iExMoney, PurBillVouchs.iLostQuan,
PurBillVouchs.iNLostQuan, PurBillVouchs.iNLostMoney,
PurBillVouchs.iOriTotal, PurBillVouchs.iTotal,
PurBillVouchs.cDebitHead, PurBillVouchs.cTaxHead,
PurBillVouchs.bExBill, PurBillVouchs.dSignDate,
PurBillVouchs.cFree1, PurBillVouchs.cFree2,
PurBillVouchs.dInDate, Inventory.bInvType,
PurBillVouchs.cDefine22,PurBillVouchs.cDefine23,PurBillVouchs.cDefine24,PurBillVouchs.cDefine25,PurBillVouchs.cDefine26,PurBillVouchs.cDefine27,PurBillVouchs.iTaxRate,PurBillVouchs.cItemCode,PurBillVouchs.cItemName,PurBillVouchs.cItem_class,fItem.cItem_name,PurBillVouchs.mNLostTax,PurBillVouchs.cNLostType,PurBillVouchs.iPOsId ,Inventory.cInvDefine1,Inventory.cInvDefine2,Inventory.cInvDefine3 FROM PurBillVouchs
LEFT JOIN Inventory ON
PurBillVouchs.cInvCode=Inventory.cInvCode LEFT JOIN fItem ON PurbillVouchs.cItem_class=fitem.cItem_class
GO