有问题文章留言 看内容决定收费与免费
另外接收数据库质疑 勒索病毒数据恢复等项目。

按供应商查询流水有数据,销售报表无数据。

【问】按供应商查询流水有数据,销售报表无数据。
【适用版本】商云8 【模块】基本档案 【点击数】103
【知识编号】P2017011900018
【问题描述】按供应商查询流水有数据,销售报表无数据。

【答】 问题原因是商品转换新供应商时没有删除掉旧供应商对应关系导致,请备份数据库后执行以下语句重新生成商品与供应商对应关系表:
use hbposv8
–删除商品与供应商关系表
delete t_bd_supcust_item 
go
–重新生成这部分商品与供应商关系表
insert into t_bd_supcust_item(item_no,branch_no,supcust_no,sale_way)
select item_no,(select sys_var_value from t_sys_system where sys_var_id like ‘%g_branch_no%’) as branch_no,main_supcust,item_sup_flag
from t_bd_item_info where
     not exists(select *  from t_bd_supcust_item where  (item_no =t_bd_item_info.item_no) 
     and (supcust_no = t_bd_item_info.main_supcust) 
     and  branch_no =(select sys_var_value from t_sys_system where sys_var_id like ‘%g_branch_no%’ ))
–更新日汇总数据
update t_rm_daysum set supcust_no=t_bd_item_info.main_supcust from t_bd_item_info
where t_rm_daysum.item_no=t_bd_item_info.item_no

赞(0)
未经允许不得转载:思迅软件知识库 » 按供应商查询流水有数据,销售报表无数据。
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址