mjml EMail

This commit is contained in:
2026-03-16 18:00:32 -05:00
parent b9f9df74c0
commit 5a7ba66c27
9 changed files with 3248 additions and 24 deletions

View File

@@ -258,10 +258,18 @@ function renderInvoiceRow(invoice) {
// Mark Sent button (right side) — only when open, not paid/partial
let sendBtn = '';
if (hasQbo && !paid && !overdue && invoice.email_status !== 'sent') {
sendBtn = `<button onclick="window.invoiceView.setEmailStatus(${invoice.id}, 'sent')" class="text-indigo-600 hover:text-indigo-800 text-xs font-medium" title="Mark as sent to customer">📤 Mark Sent</button>`;
}
// if (hasQbo && !paid && !overdue && invoice.email_status !== 'sent') {
// sendBtn = `<button onclick="window.invoiceView.setEmailStatus(${invoice.id}, 'sent')" class="text-indigo-600 hover:text-indigo-800 text-xs font-medium" title="Mark as sent to customer">📤 Mark Sent</button>`;
// }
if (hasQbo && !paid && !overdue) {
sendBtn = `
<button onclick="window.invoiceView.setEmailStatus(${invoice.id}, 'sent')" class="text-gray-600 hover:text-gray-900 text-xs font-medium mr-4" title="Nur Status ändern">
✔️ Mark Sent
</button>
<button onclick="window.emailModal.open(${invoice.id})" class="text-indigo-600 hover:text-indigo-800 text-xs font-medium" title="E-Mail via SES versenden">
📧 Send Email
</button>
`; }
const delBtn = `<button onclick="window.invoiceView.remove(${invoice.id})" class="text-red-600 hover:text-red-900">Del</button>`;
const rowClass = paid ? (invoice.payment_status === 'Deposited' ? 'bg-blue-50/50' : 'bg-green-50/50') : partial ? 'bg-yellow-50/30' : overdue ? 'bg-red-50/50' : '';