From 085ef607234b09cebe46c987feac9ceab116fe76 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Tue, 9 Jun 2026 09:37:46 +0700 Subject: [PATCH] feat: require cashier authentication via PIN when closing POS session if HR module is enabled --- static/src/app/services/pos_store.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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);