2
0
mirror of https://github.com/frappe/books.git synced 2025-01-25 16:18:33 +00:00

37 lines
1.0 KiB
TypeScript
Raw Normal View History

2023-09-05 17:33:42 +05:30
import { Doc } from 'fyo/model/doc';
2024-12-26 15:12:15 +05:30
import { FiltersMap, HiddenMap } from 'fyo/model/types';
2023-09-05 17:33:42 +05:30
import {
AccountRootTypeEnum,
AccountTypeEnum,
} from 'models/baseModels/Account/types';
export class POSSettings extends Doc {
2024-12-24 22:17:40 +05:30
isShiftOpen?: boolean;
2023-09-05 17:33:42 +05:30
inventory?: string;
cashAccount?: string;
writeOffAccount?: string;
2024-12-26 15:12:15 +05:30
weightEnabledBarcode?: boolean;
checkDigits?: number;
2024-12-26 18:54:19 +05:30
itemCodeDigits?: number;
itemWeightDigits?: number;
2024-12-26 15:12:15 +05:30
posUI?: 'Classic' | 'Modern';
submitInvoice?:string;
2023-09-05 17:33:42 +05:30
static filters: FiltersMap = {
cashAccount: () => ({
rootType: AccountRootTypeEnum.Asset,
accountType: AccountTypeEnum.Cash,
isGroup: false,
2023-09-05 17:33:42 +05:30
}),
};
2024-12-26 15:12:15 +05:30
hidden: HiddenMap = {
weightEnabledBarcode: () =>
!this.fyo.singles.InventorySettings?.enableBarcodes,
checkDigits: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
2024-12-26 18:54:19 +05:30
itemCodeDigits: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
itemWeightDigits: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
2024-12-26 15:12:15 +05:30
};
2023-09-05 17:33:42 +05:30
}