fix: call function when arguments available
This commit is contained in:
parent
48b0f0da96
commit
d95b59e90c
@ -158,16 +158,18 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
let me = this;
|
let me = this;
|
||||||
frappe.flags.round_off_applicable_accounts = [];
|
frappe.flags.round_off_applicable_accounts = [];
|
||||||
|
|
||||||
return frappe.call({
|
if (me.frm.doc.company) {
|
||||||
"method": "erpnext.controllers.taxes_and_totals.get_round_off_applicable_accounts",
|
return frappe.call({
|
||||||
"args": {
|
"method": "erpnext.controllers.taxes_and_totals.get_round_off_applicable_accounts",
|
||||||
"company": me.frm.doc.company,
|
"args": {
|
||||||
"account_list": frappe.flags.round_off_applicable_accounts
|
"company": me.frm.doc.company,
|
||||||
},
|
"account_list": frappe.flags.round_off_applicable_accounts
|
||||||
callback: function(r) {
|
},
|
||||||
frappe.flags.round_off_applicable_accounts.push(...r.message);
|
callback: function(r) {
|
||||||
}
|
frappe.flags.round_off_applicable_accounts.push(...r.message);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
determine_exclusive_rate: function() {
|
determine_exclusive_rate: function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user