diff --git a/static/src/app/services/pos_store.js b/static/src/app/services/pos_store.js index cb7ab35..45e3b44 100644 --- a/static/src/app/services/pos_store.js +++ b/static/src/app/services/pos_store.js @@ -7,6 +7,17 @@ import { NumberPopup } from "@point_of_sale/app/components/popups/number_popup/n import { makeAwaitable } from "@point_of_sale/app/utils/make_awaitable_dialog"; patch(PosStore.prototype, { + async closeSession() { + if (this.config.module_pos_hr) { + const cashier = await this._selectCashierByPin(); + if (!cashier) { + return; + } + this.setCashier(cashier); + } + return super.closeSession(...arguments); + }, + async transferOrder(orderUuid, destinationTable = null, destinationOrder = null) { this.transferDestinationTable = destinationTable; return super.transferOrder(...arguments);