Fix item counts, PR/QT conversions, validation and department loss
This commit is contained in:
@@ -158,7 +158,7 @@
|
||||
var body = '';
|
||||
|
||||
$.each(page_data, function(i, r) {
|
||||
var items = JSON.parse(r.items || '[]');
|
||||
var item_count = parseInt(r.item_count) || 0;
|
||||
var can_cancel = parseInt(r.status) >= 0 && parseInt(r.status) <= 1;
|
||||
|
||||
body += `<tr>
|
||||
@@ -167,7 +167,7 @@
|
||||
<td class="py-3">${r.contact_name || '<span class="text-muted">—</span>'}</td>
|
||||
<td class="py-3">${get_dept_label(r.department_id)}</td>
|
||||
<td class="py-3">${format_date(r.return_date)}</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(r.refund_amount, 2)}</td>
|
||||
<td class="py-3">${return_status_badge(r.status)}</td>
|
||||
<td class="py-3">${receipt_status_badge(r.receipt_status)}</td>
|
||||
|
||||
Reference in New Issue
Block a user