1 问题描述
会计科目进行直接修改时提示被引用,无法准确定位到被什么数据引用。
2 解决方法
通过查询分析器快速查询被引用的数据:
步骤一:查询科目表id,获取对应科目表id。
select * from T_BD_Accounttable where fnumber ='科目表编码'
步骤二:将查询到的科目表id,和被引用的会计科目继续查询业务引用。
select forgid,faccountid from t_gl_balance where faccountid in (select fmasterid from t_bd_account where faccounttableid={科目表id} and fnumber='{科目编码}');--余额表
select forgid,faccountid,fperiodid from t_gl_balance_log where fcalculated = '0' and faccountid in (select fmasterid from t_bd_account where faccounttableid={科目表id} and fnumber='{科目编码}');--凭证科目发生日志
select forgid,faccountid from t_gl_voucherentry where faccountid in (select fid from t_bd_account where faccounttableid={科目表id} and fnumber='{科目编码}'); --凭证分录
select forgid,faccountid from t_gl_tempvoucher_index where faccountid in (select fid from t_bd_account where faccounttableid={科目表id} and fnumber='{科目编码}');--暂存凭证索引
select forgid,faccountid from t_gl_initbalance where faccountid in (select fid from t_bd_account where faccounttableid={科目表id} and fnumber='{科目编码}');--科目余额初始化
select forgid,faccountid from t_gl_initacccurrent where faccountid in (select fid from t_bd_account where faccounttableid={科目表id} and fnumber='{科目编码}');--往来余额初始化
select forgid,faccountid from t_gl_reci_init_state where faccountid in (select fid from t_bd_account where faccounttableid={科目表id} and fnumber='{科目编码}'); --往来余额初始化状态
步骤三:根据步骤二定位到对应业务单元和被引用业务,前往对应单据删除引用数据。
3 适用版本
金蝶云·星瀚全版本适用。
推荐阅读