diff --git a/mailer.js b/mailer.js
index 59cc28d..e0e9a0c 100644
--- a/mailer.js
+++ b/mailer.js
@@ -90,11 +90,12 @@ const sendEmailWithAttachment = async (toEmail, orderData, pdfBuffer, shippingLa
billingAddressHtml += `${billing.city || ''} ${billing.province || ''} ${billing.zip || ''}
`;
}
if (billing.country) billingAddressHtml += `${billing.country}
`;
- if (billing.phone || orderData.phone) {
- billingAddressHtml += `${billing.phone || orderData.phone}`;
- }
if (contactNumber) {
- billingAddressHtml += `
Contact: ${contactNumber}`;
+ billingAddressHtml += `WhatsApp: ${contactNumber}`;
+ }
+ if (billing.phone || orderData.phone) {
+ if (contactNumber) billingAddressHtml += `
`;
+ billingAddressHtml += `Contact Number: ${billing.phone || orderData.phone}`;
}
const paymentMethod = orderData.gateway || 'Request Quote';
diff --git a/pdfGenerator.js b/pdfGenerator.js
index fe430a0..d0cda6f 100644
--- a/pdfGenerator.js
+++ b/pdfGenerator.js
@@ -172,12 +172,13 @@ const generateInvoicePDF = async (orderData) => {
doc.text(orderData.email || orderData.contact_email, 40, billTextY);
billTextY += 13;
}
- if (billing.phone || orderData.phone) {
- doc.text(billing.phone || orderData.phone, 40, billTextY);
+ if (customContactNumber) {
+ doc.text(`WhatsApp: ${customContactNumber}`, 40, billTextY);
billTextY += 13;
}
- if (customContactNumber) {
- doc.text(`Contact: ${customContactNumber}`, 40, billTextY);
+ if (billing.phone || orderData.phone) {
+ doc.text(`Contact Number: ${billing.phone || orderData.phone}`, 40, billTextY);
+ billTextY += 13;
}
// Order Details (Right)