From 7e344685043bfba06ed4c74f7c3b006d87ffaa9c Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Fri, 11 Aug 2023 12:27:18 +0530 Subject: [PATCH 1/2] fix: POS Invoice Email Receipt Mail --- erpnext/selling/page/point_of_sale/pos_past_order_summary.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 be75bd64cf..cfad587098 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 @@ -49,7 +49,7 @@ erpnext.PointOfSale.PastOrderSummary = class { title: 'Email Receipt', fields: [ {fieldname: 'email_id', fieldtype: 'Data', options: 'Email', label: 'Email ID'}, - // {fieldname:'remarks', fieldtype:'Text', label:'Remarks (if any)'} + {fieldname:'content', fieldtype:'Small Text', label:'Message (if any)'} ], primary_action: () => { this.send_email(); @@ -243,6 +243,7 @@ erpnext.PointOfSale.PastOrderSummary = class { 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 @@ erpnext.PointOfSale.PastOrderSummary = class { 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, From dd91a77fdd3ea6ed88d9afd02285bfe38e90a717 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Fri, 11 Aug 2023 13:19:09 +0530 Subject: [PATCH 2/2] fix: POS Invoice Email Receipt Mail --- erpnext/selling/page/point_of_sale/pos_past_order_summary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 cfad587098..d341d23bd3 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,7 +48,7 @@ erpnext.PointOfSale.PastOrderSummary = class { const email_dialog = new frappe.ui.Dialog({ title: 'Email Receipt', fields: [ - {fieldname: 'email_id', fieldtype: 'Data', options: 'Email', label: 'Email ID'}, + {fieldname: 'email_id', fieldtype: 'Data', options: 'Email', label: 'Email ID', reqd: 1}, {fieldname:'content', fieldtype:'Small Text', label:'Message (if any)'} ], primary_action: () => {