找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

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

应收单据不能录入

[复制链接]
发表于 2009-2-5 00:44:27 | 显示全部楼层 |阅读模式
U8知识库
问题号: 2174
解决状态: 最终解决方案
软件版本: 其他
软件模块: 应收
行业: 其他
关键字: U8应收应付
适用产品: u821
问题名称: 应收单据不能录入
问题现象: 应收单据不能录入
问题原因: 因为数据库中的两个视图有错误。
解决方案: 可以把正确的视图复制过来,重新创建,具体的脚本如附件。
drop view Ap_SalBillCust
go
create view Ap_SalBillCust as SELECT Customer.cCCCode AS cDWCCode,CustomerClass.cCCName as cDWCName,Customer.cDCCode AS cDWDCode,DistrictClass.cDCName,CASE WHEN Customer.cCusName<>‘‘ THEN Customer.cCusName ELSE Customer.cCusAbbName END AS cDWName,Customer.cCusPPerson AS cHPsnCode,Person_1.cPersonName as cHPersonName,Customer.cCusDepart AS cHDptCode,Department_1.cDepName as cHDepName,Customer.cCusHeadCode AS cHDWCode,
CASE WHEN Customer_1.cCusName<>‘‘ THEN Customer_1.cCusName ELSE Customer_1.cCusAbbName END AS cHDwName,Customer.iCusCreLine AS iCreLine, Department.cDepName, Person.cPersonName, Inventory.cInvName,Inventory.cInvCCode,InventoryClass.cInvCName,
Ap_VouchType.cTypeName,dDate+IsNull(PayCondition.iPayCreDays,0) AS dExpireDate,dDate+IsNull(PayCondition_1.iPayCreDays,0) AS dExpireDate_DW,dDate+IsNull(PayCondition.iPayFaDays,0)AS dFaDate,PayCondition.cPayName, SaleBillVouch.cCusCode AS cDWCode, SaleBillVouch.cDepCode AS cDeptCode, SaleBillVouch.cPersonCode AS cPerson,SaleBillVouch.cMemo AS cDigest,
SaleBillVouch.cInvalider as cInvalider,SaleBillVouch.cChecker,SaleBillVouch.dDate AS dVouchDate, SaleBillVouch.cVouchType, SaleBillVouch.cSBVCode AS cVouchID, SaleBillVouch.cMaker, SaleBillVouch.cVerifier AS cCheckMan, SaleBillVouch.cPayCode, SaleBillVouch.cexch_name, SaleBillVouch.iExchRate, SaleBillVouchs.cInvCode, SaleBillVouchs.iNatSum AS iAmount, SaleBillVouchs.iSum AS iAmount_f,
SaleBillVouchs.iMoneySum AS iFmount,SaleBillVouchs.iExchSum AS iFmount_f, SaleBillVouchs.iQuantity AS iAmount_s, SaleBillVouchs.iNatUnitPrice AS iprice, SaleBillVouchs.iNatTax AS ino_id,1-bReturnFlag as bd_c,bpayment,bFirst,cClue FROM ((((((((((((SaleBillVouch LEFT JOIN Ap_VouchType ON SaleBillVouch.cVouchType = Ap_VouchType.cTypeCode) LEFT JOIN Customer ON SaleBillVouch.cCusCode = Customer.cCusCode)
LEFT JOIN Department ON SaleBillVouch.cDepCode = Department.cDepCode) LEFT JOIN Person ON SaleBillVouch.cPersonCode = Person.cPersonCode) LEFT JOIN PayCondition ON SaleBillVouch.cPayCode = PayCondition.cPayCode) INNER JOIN (SaleBillVouchs LEFT JOIN Inventory ON SaleBillVouchs.cInvCode = Inventory.cInvCode) ON SaleBillVouch.SBVID = SaleBillVouchs.SBVID)
LEFT JOIN PayCondition AS PayCondition_1 ON Customer.cCusPayCond = PayCondition_1.cPayCode) LEFT JOIN CustomerClass ON Customer.cCCCode=CustomerClass.cCCCode) LEFT JOIN Customer as Customer_1 ON Customer.cCusHeadCode=Customer_1.cCusCode) LEFT JOIN DistrictClass ON Customer.cDCCode=DistrictClass.cDCCode) LEFT JOIN Department as Department_1 ON Customer.cCusDepart=Department_1.cDepCode) LEFT JOIN Person as Person_1 ON Customer.cCusPPerson=Person_1.cPersonCode) LEFT JOIN InventoryClass ON Inventory.cInvCCode=InventoryClass.cInvCCode
Where cChecker Is Not Null And isnull(cInvalider,‘‘)=‘‘
go
drop view Ap_PurBillVend
go
CREATE VIEW Ap_PurBillVend as SELECT Vendor.cVCCode AS cDWCCode,VendorClass.cVCName as cDWCName,Vendor.cDCCode AS cDWDCode,DistrictClass.cDCName,
Case When Vendor.cVenName<>‘‘ Then Vendor.cVenName Else Vendor.cVenAbbName End AS cDWName,
Vendor.cVenPPerson AS cHPsnCode,Person_1.cPersonName as cHPersonName,Vendor.cVenDepart AS cHDptCode,Department_1.cDepName as cHDepName,
Vendor.cVenHeadCode AS cHDWCode,CASE WHEN Vendor_1.cVenName<>‘‘ THEN Vendor_1.cVenName ELSE Vendor_1.cVenAbbName END as cHDWName,
Vendor.iVenCreLine AS iCreLine,Department.cDepName, Person.cPersonName, Inventory.cInvName, Inventory.cInvCCode,InventoryClass.cInvCName,
dPBVDate+IsNull(PayCondition.iPayCreDays,0) AS dExpireDate,dPBVDate+IsNull(PayCondition_1.iPayCreDays,0) AS dExpireDate_DW,
dPBVDate+IsNull(PayCondition.iPayFaDays,0)AS dFaDate,Ap_VouchType.cTypeName,
PayCondition.cPayName,PurBillVouch.cUnitCode AS cDWCode, PurBillVouch.cDepCode AS cDeptCode, PurBillVouch.cPersonCode AS cPerson,PurBillVouch.cPBVMemo AS cDigest,
PurBillVouch.dPBVDate AS dVouchDate, PurBillVouch.cPBVBillType AS cVouchType, PurBillVouch.cPBVCode AS cVouchID, PurBillVouch.cPBVMaker,
PurBillVouch.cPBVVerifier AS cCheckMan, PurBillVouch.cPayCode, PurBillVouch.cexch_name, PurBillVouch.cExchRate AS iExchRate,
PurBillVouchs.cInvCode, PurBillVouchs.iSum AS iAmount, PurBillVouchs.iOriSum AS iAmount_f,PurBillVouchs.iTotal AS iFmount,
PurBillVouchs.iOriTotal AS iFmount_f, PurBillVouchs.iPBVQuantity AS iAmount_s, PurBillVouchs.iCost AS iprice, PurBillVouchs.iTaxPrice AS ino_id,PurBillVouch.dSDate,
bNegative as bd_c,bpayment,bFirst,bOriginal,cClue,iNetLock
FROM ((((((((((((PurBillVouch LEFT JOIN Ap_VouchType ON PurBillVouch.cPBVBillType = Ap_VouchType.cTypeCode) LEFT JOIN Vendor ON PurBillVouch.cUnitCode = Vendor.cVenCode)
LEFT JOIN Department ON PurBillVouch.cDepCode = Department.cDepCode) LEFT JOIN Person ON PurBillVouch.cPersonCode = Person.cPersonCode)
LEFT JOIN PayCondition ON PurBillVouch.cPayCode = PayCondition.cPayCode) INNER JOIN (PurBillVouchs LEFT JOIN Inventory ON PurBillVouchs.cInvCode = Inventory.cInvCode)
ON PurBillVouch.PBVID = PurBillVouchs.PBVID) LEFT JOIN PayCondition AS PayCondition_1 ON Vendor.cVenPayCond = PayCondition_1.cPayCode) LEFT JOIN
VendorClass ON Vendor.cVCCode=VendorClass.cVCCode) LEFT JOIN Vendor as Vendor_1 ON Vendor.cVenHeadCode=Vendor_1.cVenCode) LEFT JOIN DistrictClass ON
Vendor.cDCCode=DistrictClass.cDCCode) LEFT JOIN Department as Department_1 ON Vendor.cVenDepart=Department_1.cDepCode) LEFT JOIN Person as Person_1 ON
Vendor.cVenPPerson=Person_1.cPersonCode) LEFT JOIN InventoryClass ON Inventory.cInvCCode=InventoryClass.cInvCCode


补丁编号:
录入日期: 2005-6-28
最后更新时间:

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

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

×
应收单据不能录入
  • 打卡等级:无名新人
  • 打卡总天数:1
  • 打卡月天数:0
  • 打卡总奖励:1
  • 最近打卡:2024-10-04 15:23:18
发表于 2024-2-25 10:59:42 | 显示全部楼层
感谢分享
回复 点赞 拍砖

使用道具 举报

  • 打卡等级:初来乍到
  • 打卡总天数:15
  • 打卡月天数:7
  • 打卡总奖励:51
  • 最近打卡:2024-11-16 13:35:24
发表于 2024-5-4 21:15:56 | 显示全部楼层
学习了,谢谢楼主
回复 点赞 拍砖

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

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

GMT+8, 2024-11-23 21:25 , Processed in 0.039929 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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