Fixed issue with Customer Contacts in Transaction Documents

This commit is contained in:
Neil Trini Lasrado 2015-07-07 16:41:37 +05:30
parent ed8cecbdd8
commit 09a66c4201
5 changed files with 13 additions and 9 deletions

View File

@ -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))

View File

@ -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();
},

View File

@ -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;

View File

@ -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();
},

View File

@ -66,5 +66,4 @@ def get_contact_details(contact):
"contact_designation": contact.get("designation"),
"contact_department": contact.get("department")
}
return out