单据头添加值更新事件计算单据体金额报错。
2,310次浏览
编辑于2015年04月21日 11:42:25
单据头有字段:奖金金额(金额字段),发放比例(小数字段)
单据体字段:发放金额(金额字段),总系数(小数字段)
在单据头“发放比例”、“奖金金额”中都有添加值更新事件:发放金额=奖金金额*发放比例*总系数
其中"奖金金额"的值更新事件无效,“发放比例”的值更新事件报错,填写发放比例后报如下图的错误。
请问是什么原因?该怎么设置这个才能实现更改单据头的“奖金金额”、“发放比例”后单据体中各行的“发放金额”自动更新?
5.0
谢谢
发生时间:11:32:19
错误来源: Anonymously Hosted DynamicMethods Assembly
错误信息:unsupported operand type(s) for *: 'Decimal' and 'LazyCollection[object, object]'
===================================================
调用堆栈:
at CallSite.Target(Closure , CallSite , Object , Object )
at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at Kingdee.BOS.Scripting.PyExpressionEvaluator.Run(Expression expression, ExpressionContext context)
at Kingdee.BOS.Business.DynamicForm.BusinessService.Calculate.DoAction(FormBusinessServiceArgs e)
at Kingdee.BOS.Core.DynamicForm.FormBusinessServiceUtil.InvokeServices(IDynamicFormView view, Object source, IEnumerable`1 services, Int32 actionType, String activeEntity, DynamicObject activeRow, Int32 rowIndex)
at Kingdee.BOS.Web.DynamicForm.BusinessServiceCaller.InvokeFormBusiness(IDynamicFormView view, Object source, List`1 formBusinessServices, Int32 actionType, String entityKey, Int32 row)
at Kingdee.BOS.Web.DynamicForm.BusinessServiceCaller.CallUpdateBusinessService(FieldAppearance fieldAppearance, Int32 row)
at Kingdee.BOS.Web.DynamicForm.DynamicWebFormView.UpdateValue(String key, Int32 row, Object value)
at Kingdee.BOS.Web.Bill.BillView.UpdateValue(String key, Int32 row, Object value)
at Kingdee.BOS.Web.DynamicForm.DynamicWebFormController.UpdateValue(String key, Object value, Int32 row, JSONArray postDatas)
错误数据: System.Collections.ListDictionaryInternal
推荐阅读