From f3f2ecf9688a1d857de869b6c14cc48081aaabe4 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 25 Mar 2016 12:54:03 +0530 Subject: [PATCH] [fixes] Set default company's letter head in purchase flow --- erpnext/buying/doctype/purchase_common/purchase_common.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 9a9a865233..6dcc8653e0 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -178,6 +178,9 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ && !this.frm.doc.shipping_address) { erpnext.utils.get_shipping_address(this.frm) } + + var company_doc = frappe.get_doc(":Company", me.frm.doc.company); + me.frm.set_value("letter_head", company_doc.default_letter_head); }, shipping_address: function(){