K3WISE15.0的即时库存是不在序时簿里面显示的
1.先给老单序时簿添加字段
这里假设为 FEntrySelfS0169
2.通过批更的方式同步库存到这个列中
update SEOrderEntry set FEntrySelfS0169=(select sum(FQty) from ICInventory where ICInventory.FItemID=SEOrderEntry.FItemID group by ICInventory.FItemID)
update SEOrderEntry set FEntrySelfS0169=’0’
where FEntrySelfS0169 is null
3.设置即时库存表的触发器
CREATE PROCEDURE jskc
as
update SEOrderEntry set FEntrySelfS0169=(select sum(FQty) from ICInventory where ICInventory.FItemID=SEOrderEntry.FItemID group by ICInventory.FItemID )
update SEOrderEntry set FEntrySelfS0169=’0’
where FEntrySelfS0169 is null
go
create trigger T_addKC
on ICInventory
for insert
as
exec jskc
go
create trigger T_delKC
on ICInventory
for delete
as
exec jskc
go
create trigger T_updateKC
on ICInventory
for update
as
exec jskc
go