click if sent

This commit is contained in:
2026-03-25 18:01:45 -05:00
parent fe7a9f6dd4
commit 5e792ab96f

View File

@@ -246,6 +246,12 @@ function renderInvoiceRow(invoice) {
}
}
// Send Date cell — only clickable if actually sent
const sendDateClickable = sentDates.length > 0;
const sendDateCell = sendDateClickable
? `<span class="cursor-pointer hover:text-blue-600" onclick="window.invoiceView.editSentDates(${invoice.id})" title="Click to edit sent dates">${sendDateDisplay}</span>`
: sendDateDisplay;
// Amount column — show balance when partially paid
let amountDisplay;
if (partial) {
@@ -302,9 +308,7 @@ function renderInvoiceRow(invoice) {
<td class="px-4 py-3 text-sm text-gray-500">${invoice.customer_name || 'N/A'}</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">${formatDate(invoice.invoice_date)}</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">
<span class="cursor-pointer hover:text-blue-600" onclick="window.invoiceView.editSentDates(${invoice.id})" title="Click to edit sent dates">
${sendDateDisplay}
</span>
${sendDateCell}
</td> <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">${invoice.terms}</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-900 font-semibold">${amountDisplay}</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium space-x-1">