jp-shared 1.1.16 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/utils/invoiceTemplate.js
CHANGED
|
@@ -64,6 +64,9 @@ const sendInvoice = async (invoiceInput) => {
|
|
|
64
64
|
const gstAmount = parseFloat(((amount * gstPercentage) / 100).toFixed(2));
|
|
65
65
|
const totalAmount = parseFloat((amount + gstAmount).toFixed(2));
|
|
66
66
|
|
|
67
|
+
console.log(gstAmount,"gstAmount");
|
|
68
|
+
|
|
69
|
+
|
|
67
70
|
// Check if the required environment variables are set
|
|
68
71
|
if (!process.env.EMAIL || !process.env.EMAIL_PASSWORD) {
|
|
69
72
|
const errorMsg = "Email credentials are not set in environment variables.";
|
|
@@ -91,6 +94,8 @@ const totalAmount = parseFloat((amount + gstAmount).toFixed(2));
|
|
|
91
94
|
|
|
92
95
|
// Generate the invoice HTML content
|
|
93
96
|
const invoiceHTML = invoiceEmailTemplate(invoiceData);
|
|
97
|
+
console.log(invoiceHTML,"invoiceHTML");
|
|
98
|
+
|
|
94
99
|
const pdfBuffer = await generatePDF(invoiceHTML);
|
|
95
100
|
|
|
96
101
|
// Create a transporter using your email credentials
|