2022-04-24 06:48:44 +00:00
|
|
|
import { Doc } from 'fyo/model/doc';
|
2022-04-22 11:02:03 +00:00
|
|
|
import { FiltersMap, ListsMap, ValidationMap } from 'fyo/model/types';
|
|
|
|
import { validateEmail } from 'fyo/model/validationFunction';
|
2022-04-23 09:23:44 +00:00
|
|
|
import { getCountryInfo } from 'utils/misc';
|
2022-04-11 09:41:49 +00:00
|
|
|
|
|
|
|
export class AccountingSettings extends Doc {
|
|
|
|
static filters: FiltersMap = {
|
|
|
|
writeOffAccount: () => ({
|
|
|
|
isGroup: false,
|
|
|
|
rootType: 'Expense',
|
|
|
|
}),
|
|
|
|
roundOffAccount: () => ({
|
|
|
|
isGroup: false,
|
|
|
|
rootType: 'Expense',
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
|
2022-04-22 11:02:03 +00:00
|
|
|
validations: ValidationMap = {
|
|
|
|
email: validateEmail,
|
|
|
|
};
|
|
|
|
|
2022-04-11 09:41:49 +00:00
|
|
|
static lists: ListsMap = {
|
2022-04-23 09:23:44 +00:00
|
|
|
country: () => Object.keys(getCountryInfo()),
|
2022-04-11 09:41:49 +00:00
|
|
|
};
|
|
|
|
}
|