mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 15:50:32 +00:00
feat: tweak mail notifications content
This commit is contained in:
@@ -61,11 +61,10 @@ export class SendSaleEstimateMail {
|
|||||||
);
|
);
|
||||||
return formatSmsMessage(text, {
|
return formatSmsMessage(text, {
|
||||||
CustomerName: estimate.customer.displayName,
|
CustomerName: estimate.customer.displayName,
|
||||||
EstimateNumber: estimate.estimateNo,
|
EstimateNumber: estimate.estimateNumber,
|
||||||
EstimateDate: estimate.estimateDateFormatted,
|
EstimateDate: estimate.formattedEstimateDate,
|
||||||
EstimateAmount: estimate.totalFormatted,
|
EstimateAmount: estimate.formattedAmount,
|
||||||
EstimateDueDate: estimate.dueDateFormatted,
|
EstimateExpirationDate: estimate.formattedExpirationDate,
|
||||||
EstimateDueAmount: estimate.dueAmountFormatted,
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
export const DEFAULT_ESTIMATE_REMINDER_MAIL_SUBJECT =
|
export const DEFAULT_ESTIMATE_REMINDER_MAIL_SUBJECT =
|
||||||
'Invoice {InvoiceNumber} reminder from {CompanyName}';
|
'Estimate {EstimateNumber} is awaiting your approval';
|
||||||
export const DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT = `
|
export const DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT = `<p>Dear {CustomerName}</p>
|
||||||
<p>Dear {CustomerName}</p>
|
<p>Thank you for your business, You can view or print your estimate from attachements.</p>
|
||||||
<p>You might have missed the payment date and the invoice is now overdue by {OverdueDays} days.</p>
|
<p>
|
||||||
<p>Invoice <strong>#{InvoiceNumber}</strong><br />
|
Estimate <strong>#{EstimateNumber}</strong><br />
|
||||||
Due Date : <strong>{InvoiceDueDate}</strong><br />
|
Expiration Date : <strong>{EstimateExpirationDate}</strong><br />
|
||||||
Amount : <strong>{InvoiceAmount}</strong></p>
|
Amount : <strong>{EstimateAmount}</strong></br />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<i>Regards</i><br />
|
||||||
|
<i>{CompanyName}</i>
|
||||||
|
</p>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const ERRORS = {
|
export const ERRORS = {
|
||||||
|
|||||||
@@ -87,9 +87,9 @@ export class SendPaymentReceiveMailNotification {
|
|||||||
return formatSmsMessage(text, {
|
return formatSmsMessage(text, {
|
||||||
CompanyName: organization.metadata.name,
|
CompanyName: organization.metadata.name,
|
||||||
CustomerName: payment.customer.displayName,
|
CustomerName: payment.customer.displayName,
|
||||||
PaymentNumber: payment.invoiceNo,
|
PaymentNumber: payment.payment_receive_no,
|
||||||
PaymentDate: payment.dueAmountFormatted,
|
PaymentDate: payment.formattedPaymentDate,
|
||||||
PaymentAmount: payment.dueAmountFormatted,
|
PaymentAmount: payment.formattedAmount,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
export const DEFAULT_PAYMENT_MAIL_SUBJECT =
|
export const DEFAULT_PAYMENT_MAIL_SUBJECT = 'Payment Received by {CompanyName}';
|
||||||
'Invoice {InvoiceNumber} from {CompanyName}';
|
|
||||||
export const DEFAULT_PAYMENT_MAIL_CONTENT = `
|
export const DEFAULT_PAYMENT_MAIL_CONTENT = `
|
||||||
<p>Dear {CustomerName}</p>
|
<p>Dear {CustomerName}</p>
|
||||||
<p>Thank you for your business, You can view or print your invoice from attachements.</p>
|
<p>Thank you for your payment. It was a pleasure doing business with you. We look forward to work together again!</p>
|
||||||
<p>
|
<p>
|
||||||
Invoice <strong>#{InvoiceNumber}</strong><br />
|
Payment Date : <strong>{PaymentDate}</strong><br />
|
||||||
Due Date : <strong>{InvoiceDueDate}</strong><br />
|
Amount : <strong>{PaymentAmount}</strong></br />
|
||||||
Amount : <strong>{InvoiceAmount}</strong></br />
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<i>Regards</i><br />
|
||||||
|
<i>{CompanyName}</i>
|
||||||
</p>
|
</p>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -24,7 +27,7 @@ export const ERRORS = {
|
|||||||
PAYMENT_CUSTOMER_SHOULD_NOT_UPDATE: 'PAYMENT_CUSTOMER_SHOULD_NOT_UPDATE',
|
PAYMENT_CUSTOMER_SHOULD_NOT_UPDATE: 'PAYMENT_CUSTOMER_SHOULD_NOT_UPDATE',
|
||||||
CUSTOMER_HAS_PAYMENT_RECEIVES: 'CUSTOMER_HAS_PAYMENT_RECEIVES',
|
CUSTOMER_HAS_PAYMENT_RECEIVES: 'CUSTOMER_HAS_PAYMENT_RECEIVES',
|
||||||
PAYMENT_ACCOUNT_CURRENCY_INVALID: 'PAYMENT_ACCOUNT_CURRENCY_INVALID',
|
PAYMENT_ACCOUNT_CURRENCY_INVALID: 'PAYMENT_ACCOUNT_CURRENCY_INVALID',
|
||||||
NO_INVOICE_CUSTOMER_EMAIL_ADDR: 'NO_INVOICE_CUSTOMER_EMAIL_ADDR'
|
NO_INVOICE_CUSTOMER_EMAIL_ADDR: 'NO_INVOICE_CUSTOMER_EMAIL_ADDR',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DEFAULT_VIEWS = [];
|
export const DEFAULT_VIEWS = [];
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import Mail from '@/lib/Mail';
|
|||||||
import { GetSaleReceipt } from './GetSaleReceipt';
|
import { GetSaleReceipt } from './GetSaleReceipt';
|
||||||
import { SaleReceiptsPdf } from './SaleReceiptsPdfService';
|
import { SaleReceiptsPdf } from './SaleReceiptsPdfService';
|
||||||
import {
|
import {
|
||||||
DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT,
|
DEFAULT_RECEIPT_MAIL_CONTENT,
|
||||||
DEFAULT_ESTIMATE_REMINDER_MAIL_SUBJECT,
|
DEFAULT_RECEIPT_MAIL_SUBJECT,
|
||||||
} from '../Estimates/constants';
|
} from './constants';
|
||||||
import { ERRORS } from './constants';
|
import { ERRORS } from './constants';
|
||||||
import { SaleReceiptMailOpts } from '@/interfaces';
|
import { SaleReceiptMailOpts } from '@/interfaces';
|
||||||
|
|
||||||
@@ -62,8 +62,8 @@ export class SaleReceiptMailNotification {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
attachInvoice: true,
|
attachInvoice: true,
|
||||||
subject: DEFAULT_ESTIMATE_REMINDER_MAIL_SUBJECT,
|
subject: DEFAULT_RECEIPT_MAIL_SUBJECT,
|
||||||
body: DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT,
|
body: DEFAULT_RECEIPT_MAIL_CONTENT,
|
||||||
to: saleReceipt.customer.email,
|
to: saleReceipt.customer.email,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -91,11 +91,9 @@ export class SaleReceiptMailNotification {
|
|||||||
return formatSmsMessage(text, {
|
return formatSmsMessage(text, {
|
||||||
CompanyName: organization.metadata.name,
|
CompanyName: organization.metadata.name,
|
||||||
CustomerName: invoice.customer.displayName,
|
CustomerName: invoice.customer.displayName,
|
||||||
InvoiceNumber: invoice.invoiceNo,
|
ReceiptNumber: invoice.receiptNumber,
|
||||||
InvoiceDueAmount: invoice.dueAmountFormatted,
|
ReceiptDate: invoice.formattedReceiptDate,
|
||||||
InvoiceDueDate: invoice.dueDateFormatted,
|
ReceiptAmount: invoice.formattedAmount,
|
||||||
InvoiceDate: invoice.invoiceDateFormatted,
|
|
||||||
InvoiceAmount: invoice.totalFormatted,
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,15 @@ export const DEFAULT_RECEIPT_MAIL_SUBJECT =
|
|||||||
'Invoice {InvoiceNumber} from {CompanyName}';
|
'Invoice {InvoiceNumber} from {CompanyName}';
|
||||||
export const DEFAULT_RECEIPT_MAIL_CONTENT = `
|
export const DEFAULT_RECEIPT_MAIL_CONTENT = `
|
||||||
<p>Dear {CustomerName}</p>
|
<p>Dear {CustomerName}</p>
|
||||||
<p>Thank you for your business, You can view or print your invoice from attachements.</p>
|
<p>Thank you for your business, You can view or print your receipt from attachements.</p>
|
||||||
<p>
|
<p>
|
||||||
Invoice <strong>#{InvoiceNumber}</strong><br />
|
Receipt <strong>#{ReceiptNumber}</strong><br />
|
||||||
Due Date : <strong>{InvoiceDueDate}</strong><br />
|
Amount : <strong>{ReceiptAmount}</strong></br />
|
||||||
Amount : <strong>{InvoiceAmount}</strong></br />
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<i>Regards</i><br />
|
||||||
|
<i>{CompanyName}</i>
|
||||||
</p>
|
</p>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user