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;
|
2025-01-02 12:02:16 +05:30
|
|
|
checkDigits?: number;
|
2024-12-26 18:54:19 +05:30
|
|
|
itemCodeDigits?: number;
|
2025-01-02 12:02:16 +05:30
|
|
|
itemWeightDigits?: number;
|
2024-12-26 15:12:15 +05:30
|
|
|
|
2024-10-24 15:39:50 +05:30
|
|
|
posUI?: 'Classic' | 'Modern';
|
2024-12-23 11:35:38 +05:30
|
|
|
submitInvoice?: string;
|
2023-09-05 17:33:42 +05:30
|
|
|
|
|
|
|
static filters: FiltersMap = {
|
|
|
|
cashAccount: () => ({
|
|
|
|
rootType: AccountRootTypeEnum.Asset,
|
|
|
|
accountType: AccountTypeEnum.Cash,
|
2024-08-14 11:01:52 +05:30
|
|
|
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,
|
2025-01-02 12:02:16 +05:30
|
|
|
checkDigits: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
|
2024-12-26 18:54:19 +05:30
|
|
|
itemCodeDigits: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
|
2025-01-02 12:02:16 +05:30
|
|
|
itemWeightDigits: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
|
2024-12-26 15:12:15 +05:30
|
|
|
};
|
2023-09-05 17:33:42 +05:30
|
|
|
}
|