[refactor] party.js get_party_details (#9888)
This commit is contained in:
parent
ea4497c8d2
commit
dab1172a18
@ -42,12 +42,16 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) {
|
||||
callback: function(r) {
|
||||
if(r.message) {
|
||||
frm.updating_party_details = true;
|
||||
frm.set_value(r.message);
|
||||
frappe.run_serially([
|
||||
() => frm.set_value(r.message),
|
||||
() => {
|
||||
frm.updating_party_details = false;
|
||||
if(callback) callback();
|
||||
frm.refresh();
|
||||
erpnext.utils.add_item(frm);
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -89,7 +89,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
|
||||
customer: function() {
|
||||
var me = this;
|
||||
erpnext.utils.get_party_details(this.frm, null, null, function(){me.apply_pricing_rule()});
|
||||
erpnext.utils.get_party_details(this.frm, null, null,
|
||||
function(){ me.apply_pricing_rule() });
|
||||
},
|
||||
|
||||
customer_address: function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user