both contact number display

This commit is contained in:
Selvi 2026-06-23 10:33:39 +05:30
parent a47974b536
commit 89218f5fb7
2 changed files with 10 additions and 8 deletions

View File

@ -90,11 +90,12 @@ const sendEmailWithAttachment = async (toEmail, orderData, pdfBuffer, shippingLa
billingAddressHtml += `${billing.city || ''} ${billing.province || ''} ${billing.zip || ''}<br/>`;
}
if (billing.country) billingAddressHtml += `${billing.country}<br/>`;
if (billing.phone || orderData.phone) {
billingAddressHtml += `${billing.phone || orderData.phone}`;
}
if (contactNumber) {
billingAddressHtml += `<br/>Contact: ${contactNumber}`;
billingAddressHtml += `WhatsApp: ${contactNumber}`;
}
if (billing.phone || orderData.phone) {
if (contactNumber) billingAddressHtml += `<br/>`;
billingAddressHtml += `Contact Number: ${billing.phone || orderData.phone}`;
}
const paymentMethod = orderData.gateway || 'Request Quote';

View File

@ -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)