2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 01:14:03 +00:00
books/models/inventory/InventorySettings.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
818 B
TypeScript
Raw Normal View History

2022-11-18 08:44:29 +00:00
import { Doc } from 'fyo/model/doc';
import { FiltersMap } from 'fyo/model/types';
import { AccountTypeEnum } from 'models/baseModels/Account/types';
import { ValuationMethod } from './types';
2022-11-18 08:44:29 +00:00
export class InventorySettings extends Doc {
2022-11-21 07:15:57 +00:00
defaultLocation?: string;
2022-11-18 08:44:29 +00:00
stockInHand?: string;
valuationMethod?: ValuationMethod;
stockReceivedButNotBilled?: string;
costOfGoodsSold?: string;
2023-01-16 05:31:12 +00:00
enableBarcodes?: boolean;
2022-11-18 08:44:29 +00:00
static filters: FiltersMap = {
stockInHand: () => ({
isGroup: false,
accountType: AccountTypeEnum.Stock,
}),
stockReceivedButNotBilled: () => ({
isGroup: false,
accountType: AccountTypeEnum['Stock Received But Not Billed'],
}),
costOfGoodsSold: () => ({
isGroup: false,
accountType: AccountTypeEnum['Cost of Goods Sold'],
}),
2022-11-18 08:44:29 +00:00
};
}