Merge pull request #36596 from Nihantra-Patel/pos_receipt_mail
fix: POS Invoice Email Receipt Mail
This commit is contained in:
commit
8ed8698fdf
@ -48,8 +48,8 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
const email_dialog = new frappe.ui.Dialog({
|
const email_dialog = new frappe.ui.Dialog({
|
||||||
title: 'Email Receipt',
|
title: 'Email Receipt',
|
||||||
fields: [
|
fields: [
|
||||||
{fieldname: 'email_id', fieldtype: 'Data', options: 'Email', label: 'Email ID'},
|
{fieldname: 'email_id', fieldtype: 'Data', options: 'Email', label: 'Email ID', reqd: 1},
|
||||||
// {fieldname:'remarks', fieldtype:'Text', label:'Remarks (if any)'}
|
{fieldname:'content', fieldtype:'Small Text', label:'Message (if any)'}
|
||||||
],
|
],
|
||||||
primary_action: () => {
|
primary_action: () => {
|
||||||
this.send_email();
|
this.send_email();
|
||||||
@ -243,6 +243,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
send_email() {
|
send_email() {
|
||||||
const frm = this.events.get_frm();
|
const frm = this.events.get_frm();
|
||||||
const recipients = this.email_dialog.get_values().email_id;
|
const recipients = this.email_dialog.get_values().email_id;
|
||||||
|
const content = this.email_dialog.get_values().content;
|
||||||
const doc = this.doc || frm.doc;
|
const doc = this.doc || frm.doc;
|
||||||
const print_format = frm.pos_print_format;
|
const print_format = frm.pos_print_format;
|
||||||
|
|
||||||
@ -251,6 +252,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
args: {
|
args: {
|
||||||
recipients: recipients,
|
recipients: recipients,
|
||||||
subject: __(frm.meta.name) + ': ' + doc.name,
|
subject: __(frm.meta.name) + ': ' + doc.name,
|
||||||
|
content: content ? content : __(frm.meta.name) + ': ' + doc.name,
|
||||||
doctype: doc.doctype,
|
doctype: doc.doctype,
|
||||||
name: doc.name,
|
name: doc.name,
|
||||||
send_email: 1,
|
send_email: 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user