This commit is contained in:
2026-02-25 10:42:28 -06:00
parent 053f01c5ec
commit 55b4cba35a
2 changed files with 20 additions and 1 deletions

View File

@@ -211,7 +211,7 @@ function renderInvoiceRow(invoice) {
const today = new Date(); today.setHours(0, 0, 0, 0);
const daysUntil = Math.floor((sendDate - today) / 86400000);
sendDateDisplay = formatDate(invoice.scheduled_send_date);
if (!paid) {
if (!paid && invoice.email_status !== 'sent') {
if (daysUntil < 0) sendDateDisplay += ` <span class="text-xs text-red-500">(${Math.abs(daysUntil)}d ago)</span>`;
else if (daysUntil === 0) sendDateDisplay += ` <span class="text-xs text-orange-500 font-semibold">(today)</span>`;
else if (daysUntil <= 3) sendDateDisplay += ` <span class="text-xs text-yellow-600">(in ${daysUntil}d)</span>`;