From b0722537555f14adeca751fa754f2f29a76712e2 Mon Sep 17 00:00:00 2001 From: akshayitzme Date: Thu, 24 Aug 2023 17:55:23 +0530 Subject: [PATCH] fix: enable POS only if discounts enabled --- models/inventory/InventorySettings.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models/inventory/InventorySettings.ts b/models/inventory/InventorySettings.ts index 8cb64bce..d2d1439d 100644 --- a/models/inventory/InventorySettings.ts +++ b/models/inventory/InventorySettings.ts @@ -46,7 +46,10 @@ export class InventorySettings extends Doc { return !!this.enableStockReturns; }, enablePointOfSale: () => { - return !!this.fyo.singles.POSShift?.isShiftOpen; + return ( + !!this.fyo.singles.POSShift?.isShiftOpen && + !!this.fyo.singles.AccountingSettings?.enableDiscounting + ); }, }; }