fix: disable table checker button when order is empty or contains unsent items

This commit is contained in:
Suherdy Yacob 2026-06-01 22:26:39 +07:00
parent ecb1a242f3
commit d124a934ca

View File

@ -35,12 +35,12 @@
Table Checker button:
- Only displayed if basic_receipt is enabled.
- Cashier role must be 'waiter' or 'cashier'.
- Disabled when order is empty.
- Disabled when order is empty or has unsent items (not yet saved/sent).
-->
<button
t-if="pos.config.basic_receipt and pos.cashier and (pos.cashier.pos_role == 'waiter' or pos.cashier.pos_role == 'cashier')"
class="btn btn-secondary portrait-print-btn"
t-att-disabled="currentOrder.isEmpty()"
t-att-disabled="currentOrder.isEmpty() or nbrOfChanges"
t-on-click="() => this.pos.printReceipt({ order: this.currentOrder, basic: true, printBillActionTriggered: true })">
<i class="fa fa-print me-1"/>Checker
</button>