<% if (user.profileImage) { %> <% } %>
<%= user.companyName %>
<% if (user.licenseNumber && user.licenseNumber !== "-") { %> License No: <%= user.licenseNumber %>
<% } %> <% if (user.email && user.email !== "-") { %> <%= user.email %>
<% } %> <% if (user.phone && user.phone !== "-") { %> <%= user.phone %>
<% } %> <% const fullAddress = [ user.address, user.city, user.state, user.zipCode, user.country ].filter(val => val && val !== "-").join(', '); %> <% if (fullAddress) { %> <%= fullAddress %> <% } %>
<% if (EstimateNo) { %>
Estimate #: <%= EstimateNo %>
Date: <%= date %>
Valid Till: <%= dueDate %>
<% } else { %>
Invoice #: <%= invoiceNo %>
Issued Date: <%= date %>
Due Date: <%= dueDate %>
<% } %>
To :
<%= client.name %>
<% if (client.email && client.email !== "-") { %> <%= client.email %>
<% } %> <% if (client.phone && client.phone !== "-") { %> <%= client.phone %> <% } %>
<% if (taxType === "on_total") { %> <% } else { %> <% } %> <% items.forEach(item => { %> <% }) %>
Description Qty Price DiscountTaxableTaxTotal
<%= item.name %>
<%= item.description %>
<%= item.quantity %> <%= user.currencySymbol %><%= item.price.toFixed(2) %> <%= user.currencySymbol %><%= item.discountAmount.toFixed(2) %> <% if (taxType === "on_total") { %> <%= item.isTaxable ? "✔" : "✖" %> <% } else { %> <%= user.currencySymbol %><%= item.taxAmount.toFixed(2) %> <% } %> <%= user.currencySymbol %><%= item.lineTotal.toFixed(2) %>
Sub Total <%= user.currencySymbol %><%= summary.subTotal.toFixed(2) %>
Discount - <%= user.currencySymbol %> <%= (summary.invoiceDiscountAmount || summary.estimateDiscountAmount || 0).toFixed(2) %>
Tax <%= taxType === "on_total" ? "on Total" : "Per Item" %> <%= user.currencySymbol %><%= summary.taxTotal.toFixed(2) %>
Grand Total <%= user.currencySymbol %><%= summary.grandTotal.toFixed(2) %>
<% if (user.terms && user.terms.trim() !== "") { %>
Terms & Conditions
<%= user.terms %>
* Please review all terms carefully before proceeding.
<% } %> <% if (attachments && attachments.length) { %>
<% attachments.forEach(att => { %>
<% if (att.type && att.type.startsWith("image")) { %> <% } else if (att.type && att.type.includes("pdf")) { %>
📄 <%= att.name %>
PDF Document
View PDF
<% } else { %>
Attachment: <%= att.name %>
<% } %>
<% }) %>
<% } %>