Fix item counts, PR/QT conversions, validation and department loss
This commit is contained in:
@@ -212,14 +212,14 @@
|
||||
var body = '';
|
||||
|
||||
$.each(page_data, function(i, q) {
|
||||
var items = typeof q.items === 'string' ? JSON.parse(q.items || '[]') : (q.items || []);
|
||||
var item_count = parseInt(q.item_count) || 0;
|
||||
body += `<tr>
|
||||
<td class="py-3 fw-semibold">${escape_html(q.quotation_number)}</td>
|
||||
<td class="py-3">${format_date(q.quotation_date)}</td>
|
||||
<td class="py-3">${q.valid_until ? format_date(q.valid_until) : '<span class="text-muted">—</span>'}</td>
|
||||
<td class="py-3">${escape_html(q.contact_name || '—')}</td>
|
||||
<td class="py-3">${get_dept_label(q.department_id)}</td>
|
||||
<td class="py-3">${items.length} item${items.length !== 1 ? 's' : ''}</td>
|
||||
<td class="py-3">${item_count} item${item_count !== 1 ? 's' : ''}</td>
|
||||
<td class="py-3 fw-semibold">${format_number(q.grand_total, 2)}</td>
|
||||
<td class="py-3">${status_badge[String(q.status)] || q.status}</td>
|
||||
<td class="py-3">
|
||||
|
||||
Reference in New Issue
Block a user