diff --git a/packages/server/src/services/Sales/Estimates/SendSaleEstimateMail.ts b/packages/server/src/services/Sales/Estimates/SendSaleEstimateMail.ts
index b30a7a013..9ae6fa2f8 100644
--- a/packages/server/src/services/Sales/Estimates/SendSaleEstimateMail.ts
+++ b/packages/server/src/services/Sales/Estimates/SendSaleEstimateMail.ts
@@ -61,11 +61,10 @@ export class SendSaleEstimateMail {
);
return formatSmsMessage(text, {
CustomerName: estimate.customer.displayName,
- EstimateNumber: estimate.estimateNo,
- EstimateDate: estimate.estimateDateFormatted,
- EstimateAmount: estimate.totalFormatted,
- EstimateDueDate: estimate.dueDateFormatted,
- EstimateDueAmount: estimate.dueAmountFormatted,
+ EstimateNumber: estimate.estimateNumber,
+ EstimateDate: estimate.formattedEstimateDate,
+ EstimateAmount: estimate.formattedAmount,
+ EstimateExpirationDate: estimate.formattedExpirationDate,
});
};
diff --git a/packages/server/src/services/Sales/Estimates/constants.ts b/packages/server/src/services/Sales/Estimates/constants.ts
index b59350430..6b689a0e1 100644
--- a/packages/server/src/services/Sales/Estimates/constants.ts
+++ b/packages/server/src/services/Sales/Estimates/constants.ts
@@ -1,11 +1,17 @@
export const DEFAULT_ESTIMATE_REMINDER_MAIL_SUBJECT =
- 'Invoice {InvoiceNumber} reminder from {CompanyName}';
-export const DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT = `
-
Dear {CustomerName}
-You might have missed the payment date and the invoice is now overdue by {OverdueDays} days.
-Invoice #{InvoiceNumber}
-Due Date : {InvoiceDueDate}
-Amount : {InvoiceAmount}
+ 'Estimate {EstimateNumber} is awaiting your approval';
+export const DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT = `Dear {CustomerName}
+Thank you for your business, You can view or print your estimate from attachements.
+
+Estimate #{EstimateNumber}
+Expiration Date : {EstimateExpirationDate}
+Amount : {EstimateAmount}
+
+
+
+Regards
+{CompanyName}
+
`;
export const ERRORS = {
diff --git a/packages/server/src/services/Sales/PaymentReceives/PaymentReceiveMailNotification.ts b/packages/server/src/services/Sales/PaymentReceives/PaymentReceiveMailNotification.ts
index 3b92c2ece..42069c5f3 100644
--- a/packages/server/src/services/Sales/PaymentReceives/PaymentReceiveMailNotification.ts
+++ b/packages/server/src/services/Sales/PaymentReceives/PaymentReceiveMailNotification.ts
@@ -87,9 +87,9 @@ export class SendPaymentReceiveMailNotification {
return formatSmsMessage(text, {
CompanyName: organization.metadata.name,
CustomerName: payment.customer.displayName,
- PaymentNumber: payment.invoiceNo,
- PaymentDate: payment.dueAmountFormatted,
- PaymentAmount: payment.dueAmountFormatted,
+ PaymentNumber: payment.payment_receive_no,
+ PaymentDate: payment.formattedPaymentDate,
+ PaymentAmount: payment.formattedAmount,
});
};
diff --git a/packages/server/src/services/Sales/PaymentReceives/constants.ts b/packages/server/src/services/Sales/PaymentReceives/constants.ts
index e11060670..405939617 100644
--- a/packages/server/src/services/Sales/PaymentReceives/constants.ts
+++ b/packages/server/src/services/Sales/PaymentReceives/constants.ts
@@ -1,12 +1,15 @@
-export const DEFAULT_PAYMENT_MAIL_SUBJECT =
- 'Invoice {InvoiceNumber} from {CompanyName}';
+export const DEFAULT_PAYMENT_MAIL_SUBJECT = 'Payment Received by {CompanyName}';
export const DEFAULT_PAYMENT_MAIL_CONTENT = `
Dear {CustomerName}
-Thank you for your business, You can view or print your invoice from attachements.
+Thank you for your payment. It was a pleasure doing business with you. We look forward to work together again!
-Invoice #{InvoiceNumber}
-Due Date : {InvoiceDueDate}
-Amount : {InvoiceAmount}
+Payment Date : {PaymentDate}
+Amount : {PaymentAmount}
+
+
+
+Regards
+{CompanyName}
`;
@@ -24,7 +27,7 @@ export const ERRORS = {
PAYMENT_CUSTOMER_SHOULD_NOT_UPDATE: 'PAYMENT_CUSTOMER_SHOULD_NOT_UPDATE',
CUSTOMER_HAS_PAYMENT_RECEIVES: 'CUSTOMER_HAS_PAYMENT_RECEIVES',
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 = [];
diff --git a/packages/server/src/services/Sales/Receipts/SaleReceiptMailNotification.ts b/packages/server/src/services/Sales/Receipts/SaleReceiptMailNotification.ts
index bf6c4c893..0d93c2b65 100644
--- a/packages/server/src/services/Sales/Receipts/SaleReceiptMailNotification.ts
+++ b/packages/server/src/services/Sales/Receipts/SaleReceiptMailNotification.ts
@@ -8,9 +8,9 @@ import Mail from '@/lib/Mail';
import { GetSaleReceipt } from './GetSaleReceipt';
import { SaleReceiptsPdf } from './SaleReceiptsPdfService';
import {
- DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT,
- DEFAULT_ESTIMATE_REMINDER_MAIL_SUBJECT,
-} from '../Estimates/constants';
+ DEFAULT_RECEIPT_MAIL_CONTENT,
+ DEFAULT_RECEIPT_MAIL_SUBJECT,
+} from './constants';
import { ERRORS } from './constants';
import { SaleReceiptMailOpts } from '@/interfaces';
@@ -62,8 +62,8 @@ export class SaleReceiptMailNotification {
return {
attachInvoice: true,
- subject: DEFAULT_ESTIMATE_REMINDER_MAIL_SUBJECT,
- body: DEFAULT_ESTIMATE_REMINDER_MAIL_CONTENT,
+ subject: DEFAULT_RECEIPT_MAIL_SUBJECT,
+ body: DEFAULT_RECEIPT_MAIL_CONTENT,
to: saleReceipt.customer.email,
};
};
@@ -91,11 +91,9 @@ export class SaleReceiptMailNotification {
return formatSmsMessage(text, {
CompanyName: organization.metadata.name,
CustomerName: invoice.customer.displayName,
- InvoiceNumber: invoice.invoiceNo,
- InvoiceDueAmount: invoice.dueAmountFormatted,
- InvoiceDueDate: invoice.dueDateFormatted,
- InvoiceDate: invoice.invoiceDateFormatted,
- InvoiceAmount: invoice.totalFormatted,
+ ReceiptNumber: invoice.receiptNumber,
+ ReceiptDate: invoice.formattedReceiptDate,
+ ReceiptAmount: invoice.formattedAmount,
});
};
diff --git a/packages/server/src/services/Sales/Receipts/constants.ts b/packages/server/src/services/Sales/Receipts/constants.ts
index 977a5d9b1..ae1a2e388 100644
--- a/packages/server/src/services/Sales/Receipts/constants.ts
+++ b/packages/server/src/services/Sales/Receipts/constants.ts
@@ -2,11 +2,15 @@ export const DEFAULT_RECEIPT_MAIL_SUBJECT =
'Invoice {InvoiceNumber} from {CompanyName}';
export const DEFAULT_RECEIPT_MAIL_CONTENT = `
Dear {CustomerName}
-Thank you for your business, You can view or print your invoice from attachements.
+Thank you for your business, You can view or print your receipt from attachements.
-Invoice #{InvoiceNumber}
-Due Date : {InvoiceDueDate}
-Amount : {InvoiceAmount}
+Receipt #{ReceiptNumber}
+Amount : {ReceiptAmount}
+
+
+
+Regards
+{CompanyName}
`;