diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 2acb5ef1d6..bd10d6cfe5 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -622,7 +622,7 @@ def send_notification(new_rv):
Invoice Date : %s Invoice Period : %s to %s Due Date : %s |
- ''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"), \
+ ''' % (com, new_rv.doc.name, new_rv.doc.customer_name, new_rv.doc.address_display, getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"), \
getdate(new_rv.doc.invoice_period_from_date).strftime("%d-%m-%Y"), getdate(new_rv.doc.invoice_period_to_date).strftime("%d-%m-%Y"),\
getdate(new_rv.doc.due_date).strftime("%d-%m-%Y"))
diff --git a/erpnext/support/doctype/communication/communication.js b/erpnext/support/doctype/communication/communication.js
index d6af592048..59e2ee9c55 100644
--- a/erpnext/support/doctype/communication/communication.js
+++ b/erpnext/support/doctype/communication/communication.js
@@ -64,7 +64,7 @@ cur_frm.cscript.render_communication_list = function(doc, dt, dn) {
ListView, function(doctype) {
var new_doc = LocalDB.create(doctype);
new_doc = locals[doctype][new_doc];
- new_doc[doc.doctype.toLowerCase()] = doc.name;
+ new_doc[doc.doctype.toLowerCase().replace(" ", "_")] = doc.name;
loaddoc(new_doc.doctype, new_doc.name);
});
}
@@ -79,7 +79,7 @@ cur_frm.cscript.render_list = function(doc, doctype, wrapper, ListView, make_new
var RecordListView = wn.views.RecordListView.extend({
default_docstatus: ['0', '1', '2'],
default_filters: [
- [doctype, doc.doctype.toLowerCase(), '=', doc.name],
+ [doctype, doc.doctype.toLowerCase().replace(" ", "_"), '=', doc.name],
],
});