Merge pull request #24817 from AfshanKhan/fix-get_round_off_applicable_accounts-arguments

fix: call get_round_off_applicable_accounts() function when arguments available
This commit is contained in:
Deepesh Garg 2021-03-08 22:20:25 +05:30 committed by GitHub
commit 98cc7b1751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,16 +158,18 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
let me = this;
frappe.flags.round_off_applicable_accounts = [];
return frappe.call({
"method": "erpnext.controllers.taxes_and_totals.get_round_off_applicable_accounts",
"args": {
"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);
}
});
if (me.frm.doc.company) {
return frappe.call({
"method": "erpnext.controllers.taxes_and_totals.get_round_off_applicable_accounts",
"args": {
"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);
}
});
}
},
determine_exclusive_rate: function() {