2
0
mirror of https://github.com/frappe/books.git synced 2025-01-23 23:28:24 +00:00

feat: hide weight enabled barcode

This commit is contained in:
AbleKSaju 2024-12-26 15:12:15 +05:30
parent 627924d9af
commit 364173101b

View File

@ -1,5 +1,5 @@
import { Doc } from 'fyo/model/doc'; import { Doc } from 'fyo/model/doc';
import { FiltersMap } from 'fyo/model/types'; import { FiltersMap, HiddenMap } from 'fyo/model/types';
import { import {
AccountRootTypeEnum, AccountRootTypeEnum,
AccountTypeEnum, AccountTypeEnum,
@ -10,6 +10,8 @@ export class POSSettings extends Doc {
inventory?: string; inventory?: string;
cashAccount?: string; cashAccount?: string;
writeOffAccount?: string; writeOffAccount?: string;
weightEnabledBarcode?: boolean;
posUI?: 'Classic' | 'Modern'; posUI?: 'Classic' | 'Modern';
static filters: FiltersMap = { static filters: FiltersMap = {
@ -19,4 +21,9 @@ export class POSSettings extends Doc {
isGroup: false, isGroup: false,
}), }),
}; };
hidden: HiddenMap = {
weightEnabledBarcode: () =>
!this.fyo.singles.InventorySettings?.enableBarcodes,
};
} }