[test] contact to setting modules

This commit is contained in:
Thanakorn S
2026-05-06 08:58:09 +07:00
parent 414f1cd81d
commit 6501d326ca
43 changed files with 4295 additions and 581 deletions
+1 -4
View File
@@ -202,7 +202,6 @@
<option value="0">Unpaid</option>
<option value="1">Paid</option>
<option value="2">Partial</option>
<option value="3">Refunded</option>
</select>
<button class="btn btn-sm btn-outline-primary text-nowrap"
onclick="update_payment_status()">
@@ -259,7 +258,6 @@
'0': '<span class="badge bg-warning text-dark">Unpaid</span>',
'1': '<span class="badge bg-success">Paid</span>',
'2': '<span class="badge bg-info text-white">Partial</span>',
'3': '<span class="badge bg-secondary">Refunded</span>',
};
return map[String(status)] ?? '—';
}
@@ -429,10 +427,9 @@
: '<i class="ti ti-arrow-back-up me-1"></i>Create Return');
// Proceed to Invoice
var can_invoice = status === 1 && !has_active_invoice;
var can_invoice = status >= 1 && !is_cancelled && !has_active_invoice;
var invoice_title = is_cancelled ? 'Order is cancelled'
: status < 1 ? 'Confirm the order before creating an invoice'
: status > 1 ? 'Invoice can only be created for confirmed orders'
: has_active_invoice ? 'An active invoice already exists for this order' : '';
set_btn_state('#btn_invoice', can_invoice, invoice_title);
$('#btn_invoice').html(has_active_invoice