Fixed issue with Customer Contacts in Transaction Documents
This commit is contained in:
parent
ed8cecbdd8
commit
09a66c4201
@ -74,6 +74,15 @@ def set_contact_details(out, party, party_type):
|
||||
{party_type.lower(): party.name, "is_primary_contact":1}, "name")
|
||||
|
||||
if not out.contact_person:
|
||||
out.update({
|
||||
"contact_person": None,
|
||||
"contact_display": None,
|
||||
"contact_email": None,
|
||||
"contact_mobile": None,
|
||||
"contact_phone": None,
|
||||
"contact_designation": None,
|
||||
"contact_department": None
|
||||
})
|
||||
return
|
||||
|
||||
out.update(get_contact_details(out.contact_person))
|
||||
|
@ -70,10 +70,6 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
erpnext.utils.get_address_display(this.frm);
|
||||
},
|
||||
|
||||
contact_person: function() {
|
||||
erpnext.utils.get_contact_details(this.frm);
|
||||
},
|
||||
|
||||
buying_price_list: function() {
|
||||
this.apply_price_list();
|
||||
},
|
||||
|
@ -282,6 +282,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
get_company_currency: function() {
|
||||
return erpnext.get_currency(this.frm.doc.company);
|
||||
},
|
||||
|
||||
contact_person: function() {
|
||||
erpnext.utils.get_contact_details(this.frm);
|
||||
},
|
||||
|
||||
currency: function() {
|
||||
var me = this;
|
||||
|
@ -112,10 +112,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
erpnext.utils.get_address_display(this.frm, "shipping_address_name", "shipping_address");
|
||||
},
|
||||
|
||||
contact_person: function() {
|
||||
erpnext.utils.get_contact_details(this.frm);
|
||||
},
|
||||
|
||||
sales_partner: function() {
|
||||
this.apply_pricing_rule();
|
||||
},
|
||||
|
@ -66,5 +66,4 @@ def get_contact_details(contact):
|
||||
"contact_designation": contact.get("designation"),
|
||||
"contact_department": contact.get("department")
|
||||
}
|
||||
|
||||
return out
|
||||
|
Loading…
Reference in New Issue
Block a user