2
0
mirror of https://github.com/frappe/books.git synced 2025-01-25 16:18:33 +00:00
2024-12-31 15:49:13 +05:30

30 lines
695 B
TypeScript

import { Doc } from 'fyo/model/doc';
import { FiltersMap, HiddenMap } from 'fyo/model/types';
import {
AccountRootTypeEnum,
AccountTypeEnum,
} from 'models/baseModels/Account/types';
export class POSSettings extends Doc {
isShiftOpen?: boolean;
inventory?: string;
cashAccount?: string;
writeOffAccount?: string;
weightEnabledBarcode?: boolean;
posUI?: 'Classic' | 'Modern';
static filters: FiltersMap = {
cashAccount: () => ({
rootType: AccountRootTypeEnum.Asset,
accountType: AccountTypeEnum.Cash,
isGroup: false,
}),
};
hidden: HiddenMap = {
weightEnabledBarcode: () =>
!this.fyo.singles.InventorySettings?.enableBarcodes,
};
}