mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
9877bf4fd3
- allow nulls in converter else not not null'll fail
26 lines
626 B
TypeScript
26 lines
626 B
TypeScript
import { Doc } from 'fyo/model/doc';
|
|
import { FiltersMap, ListsMap, ValidationMap } from 'fyo/model/types';
|
|
import { validateEmail } from 'fyo/model/validationFunction';
|
|
import { getCountryInfo } from 'utils/misc';
|
|
|
|
export class AccountingSettings extends Doc {
|
|
static filters: FiltersMap = {
|
|
writeOffAccount: () => ({
|
|
isGroup: false,
|
|
rootType: 'Expense',
|
|
}),
|
|
roundOffAccount: () => ({
|
|
isGroup: false,
|
|
rootType: 'Expense',
|
|
}),
|
|
};
|
|
|
|
validations: ValidationMap = {
|
|
email: validateEmail,
|
|
};
|
|
|
|
static lists: ListsMap = {
|
|
country: () => Object.keys(getCountryInfo()),
|
|
};
|
|
}
|