外购入库触发器
金蝶云社区-奈何桥头奈诺何
奈何桥头奈诺何
0人赞赏了该文章 1,341次浏览 未经作者许可,禁止转载编辑于2017年03月28日 09:20:50
各位大神我有个K3、wise的问题。 我在核算项目下面自定义了一个项目A,然后在外购入库单,单据体也做了一个自定义字段(取值对应开始定义的核算项目A的值)。接下来在做外购入库单时想把这个A的值填写到外购入库单的批号上面。但是再单据保留时没有反应。触发器入下、
create trigger icstockbillentry_up on icstockbillentry
for update,insert
as
declare @finterid int,@ftrantype int
select @finterid=FInterID from inserted
select @ftrantype=FTranType from ICStockBill where FInterID=@finterid
if @ftrantype=1
begin
update a set FBatchNo=b.FName from ICStockBillEntry a,t_Item b where a.FEntrySelfA0159=b.FItemID and FInterID=@finterid
end