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';
|
2022-11-18 17:31:50 +00:00
|
|
|
import { ValuationMethod } from './types';
|
2022-11-18 08:44:29 +00:00
|
|
|
|
|
|
|
export class InventorySettings extends Doc {
|
|
|
|
stockInHand?: string;
|
2022-11-18 17:31:50 +00:00
|
|
|
valuationMethod?: ValuationMethod;
|
|
|
|
stockReceivedButNotBilled?: string;
|
|
|
|
costOfGoodsSold?: string;
|
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'],
|
|
|
|
}),
|
2022-11-18 17:31:50 +00:00
|
|
|
costOfGoodsSold: () => ({
|
|
|
|
isGroup: false,
|
|
|
|
accountType: AccountTypeEnum['Cost of Goods Sold'],
|
|
|
|
}),
|
2022-11-18 08:44:29 +00:00
|
|
|
};
|
|
|
|
}
|