open, sent status

This commit is contained in:
Andreas Knuth 2026-02-24 17:46:27 -06:00
parent 503dd4051f
commit 851ca7a037
1 changed files with 4 additions and 4 deletions

View File

@ -239,14 +239,14 @@ function renderInvoiceRow(invoice) {
paidBtn = `<button onclick="window.paymentModal.open([${invoice.id}])" class="text-emerald-600 hover:text-emerald-800" title="Record Payment in QBO">💰 Payment</button>`; paidBtn = `<button onclick="window.paymentModal.open([${invoice.id}])" class="text-emerald-600 hover:text-emerald-800" title="Record Payment in QBO">💰 Payment</button>`;
} }
// Send status button — only for QBO invoices // Send status — only for QBO invoices not yet paid/partial
let sendBtn = ''; let sendBtn = '';
if (hasQbo && !paid) { if (hasQbo && !paid && !partial) {
const isSent = invoice.email_status === 'sent'; const isSent = invoice.email_status === 'sent';
if (isSent) { if (isSent) {
sendBtn = `<span class="text-green-600 text-xs" title="Marked as sent">✉️ Sent</span>`; sendBtn = `<span class="inline-block px-2 py-0.5 text-xs font-semibold rounded-full bg-green-100 text-green-800">Sent</span>`;
} else { } else {
sendBtn = `<button onclick="window.invoiceView.setEmailStatus(${invoice.id}, 'sent')" class="text-indigo-600 hover:text-indigo-800 text-xs" title="Mark as sent to customer">📤 Mark Sent</button>`; sendBtn = `<button onclick="window.invoiceView.setEmailStatus(${invoice.id}, 'sent')" class="inline-block px-2 py-0.5 text-xs font-semibold rounded-full bg-blue-100 text-blue-800 hover:bg-blue-200 cursor-pointer" title="Mark as sent to customer">📤 Mark Sent</button>`;
} }
} }