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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp-shared",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -16,6 +16,8 @@ module.exports.invoiceEmailTemplate = ({
16
16
  termsUrl,
17
17
 
18
18
  }) => {
19
+ console.log(gstAmount,"gstAmount");
20
+
19
21
  return `
20
22
  <!DOCTYPE html>
21
23
  <html lang="en">
@@ -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