问题描述
我正在自定义现有的 DocType(quotation),并且我已将字段添加到 Quotation Item
子表中,这些字段会影响项目的 amount
字段。默认情况下,即在自定义之前,只要 Item 更改,就会计算 Grand_total 和 Quotation net_totals。但是现在我有了自定义字段,我该如何调用进行默认计算的假设“刷新”函数?
这是我当前更新 Quotation Item
子表上的项目数量的自定义脚本:
frappe.ui.form.on("Quotation Item","paint",function(frm,doctype,name) {
let row = locals[doctype][name];
let rate = row.labour + row.trim + row.paint + row.spares;
row.rate = rate;
let total = rate * row.qty
row.amount = total;
refresh_field("items");
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)