Get customer balance of specific cost center using method erpnext.accounts.utils.get_balance_on

I want to show the balance of customer in specific cost center but i am not able to retrieve it, it gives me the total balance in all cost centers, my custom javascript code is below,
Please help me If anyone have idea to do that. will be thankful…
rappe.provide(‘frappe’);
frappe.ui.form.on(‘Sales Invoice’, {
refresh(frm) {
cur_frm.cscript.customer = function(doc) {
return frappe.call({
method: “erpnext.accounts.utils.get_balance_on”,
args: {company: doc.company, cost_center: doc.cost_center, account:‘DEBTORS - WF’, date: doc.posting_date, party_type: ‘Customer’, party: doc.customer},
callback: function(r) {
console.log(r.message);
doc.outstanding_balance = format_currency(r.message, erpnext.get_currency(doc.company));
refresh_field(‘outstanding_balance’, ‘accounts’);
}
});
}
},
validate: function(frm) {
frm.set_value(‘remarks’, ‘’);
frm.doc.items.forEach(function(item) {
frm.doc.remarks += ${item.item_name} = ${item.qty} @ ${item.rate}\n;
});
}
});

You will have to write a custom whitelisted method and then pass the parameters like Company, Cost Center etc.