click if sent
This commit is contained in:
@@ -245,6 +245,12 @@ function renderInvoiceRow(invoice) {
|
||||
else if (daysUntil <= 3) sendDateDisplay += ` <span class="text-xs text-yellow-600">(in ${daysUntil}d)</span>`;
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user