【问题描述】
软件只是显示一个商品
【问题答案】
该问题为部分商品没有发生业务的情况下,没有库存记录,所以获取不到数据,可使用以下语句进行处理:
use hbposev9
go
INSERT INTO [t_im_branch_stock]([item_no],[branch_no],[stock_qty],[route_qty],[fifo_cost],[avg_cost]
,[cost_amt] ,[last_inprice] ,[last_baseprice] ,[min_qty],[max_qty],[oper_date],[com_flag])
select distinct a.item_no,b.branch_no,’0.0000′,’0.0000′,a.price,a.price,’0.0000′,a.price,’0.0000′,’0.0000′,’0.0000′,getdate(),’0′
from t_bd_item_info a ,t_im_flow b
where a.item_no not in
(select distinct item_no from t_im_flow )
and a.item_no not in
(select item_no from t_im_branch_stock)
and a.item_stock=’0′
—–生成管理库存,但是没有业务发生商品的库存记录