Merge pull request #36596 from Nihantra-Patel/pos_receipt_mail
fix: POS Invoice Email Receipt Mail
diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js
index be75bd6..d341d23 100644
--- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js
+++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js
@@ -48,8 +48,8 @@
const email_dialog = new frappe.ui.Dialog({
title: 'Email Receipt',
fields: [
- {fieldname: 'email_id', fieldtype: 'Data', options: 'Email', label: 'Email ID'},
- // {fieldname:'remarks', fieldtype:'Text', label:'Remarks (if any)'}
+ {fieldname: 'email_id', fieldtype: 'Data', options: 'Email', label: 'Email ID', reqd: 1},
+ {fieldname:'content', fieldtype:'Small Text', label:'Message (if any)'}
],
primary_action: () => {
this.send_email();
@@ -243,6 +243,7 @@
send_email() {
const frm = this.events.get_frm();
const recipients = this.email_dialog.get_values().email_id;
+ const content = this.email_dialog.get_values().content;
const doc = this.doc || frm.doc;
const print_format = frm.pos_print_format;
@@ -251,6 +252,7 @@
args: {
recipients: recipients,
subject: __(frm.meta.name) + ': ' + doc.name,
+ content: content ? content : __(frm.meta.name) + ': ' + doc.name,
doctype: doc.doctype,
name: doc.name,
send_email: 1,