2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 19:09:01 +00:00

fix: enable POS only if discounts enabled

This commit is contained in:
akshayitzme 2023-08-24 17:55:23 +05:30 committed by akshayitzme
parent a04e2af555
commit b072253755

View File

@ -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
);
},
};
}