This commit is contained in:
2026-05-25 15:23:50 -05:00
parent dc778d2f5f
commit ecb18547c0
2 changed files with 6 additions and 6 deletions

View File

@@ -229,11 +229,11 @@ function renderModalContent() {
// Dynamischer Text für die Fälligkeit // Dynamischer Text für die Fälligkeit
let paymentText = ''; let paymentText = '';
if (currentInvoice.terms && currentInvoice.terms.toLowerCase().includes('receipt')) { if (currentInvoice.terms && currentInvoice.terms.toLowerCase().includes('receipt')) {
paymentText = 'Our terms are Net 30.'; paymentText = 'Our terms are Net 14.';
} else if (dueDateStr !== 'Upon Receipt') { } else if (dueDateStr !== 'Upon Receipt') {
paymentText = `payable by <strong>${dueDateStr}</strong>.`; paymentText = `payable by <strong>${dueDateStr}</strong>.`;
} else { } else {
paymentText = 'Our terms are Net 30.'; paymentText = 'Our terms are Net 14.';
} }
let defaultHtml = ''; let defaultHtml = '';
@@ -256,7 +256,7 @@ function renderModalContent() {
// Standard template // Standard template
defaultHtml = ` defaultHtml = `
<p>Dear ${customerName},</p> <p>Dear ${customerName},</p>
<p>Attached is invoice <strong>#${invoiceNum}</strong> for service performed at your location. The total amount due is <strong>$${totalDue}</strong>, ${paymentText}</p> <p>Attached is invoice <strong>#${invoiceNum}</strong> for service performed at your location. The total amount due is <strong>$${totalDue}</strong>., ${paymentText}</p>
<p>Please pay at your earliest convenience. We appreciate your continued business.</p> <p>Please pay at your earliest convenience. We appreciate your continued business.</p>
<p>If you have any questions about the invoice, feel free to reply to this email.</p> <p>If you have any questions about the invoice, feel free to reply to this email.</p>
<p>Best regards,</p> <p>Best regards,</p>

View File

@@ -117,8 +117,8 @@ function getTermDays(inv) {
return parseInt(match[1], 10); return parseInt(match[1], 10);
} }
// Default in deiner App ist Net 30 // Default in deiner App ist Net 14
return 30; return 14;
} }
function addDays(dateValue, days) { function addDays(dateValue, days) {
@@ -150,7 +150,7 @@ function getEffectiveDueDate(inv) {
// WICHTIG: // WICHTIG:
// Für Overdue zählt der erste tatsächliche Versand. // Für Overdue zählt der erste tatsächliche Versand.
// Bei Net 30 also first_sent_date + 30 Tage. // Bei Net 14 also first_sent_date + 30 Tage.
return addDays(firstSentDate, getTermDays(inv)); return addDays(firstSentDate, getTermDays(inv));
} }