金蝶K3WISE 销售订单序时簿即时库存的开发

  • Post author:
  • Post category:其他


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



版权声明:本文为qq_33981438原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。