步骤:
1、设置前提条件:
FRealQty<>null and F_YT_WLBM<>null and F_YT_JSHJ<>0
(数量与物料、金额)
2、设置条件成立后执行的动作:
F_ZN_TK =sum(map(lambda x:(x.F_YT_JSHJ if(x. FRealQty<0) else 0), FEntity))
(单据体数量小于0的,对应价税合计进行求和赋值到应退款字段)
补充知识点:
(可以加空值判断)F_ZN_MD =sum(map(lambda x:(x.F_ZN_YSJE if((x.FNote if(x.fnote<>null) else '1').__contains__
('买断')) else 0), FEntity))
(可以加基础资料的属性判断) F_ZN_MD =sum(map(lambda x:(x.F_ZN_YSJE if(x.f_zn_base.fname.__contains__
('买断')) else 0), FEntity))
截图: