2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 03:19:01 +00:00
books/models/baseModels/LoyaltyProgram/LoyaltyProgram.ts
2024-09-04 09:08:30 +05:30

23 lines
644 B
TypeScript

import { Doc } from 'fyo/model/doc';
import { FiltersMap, ListViewSettings } from 'fyo/model/types';
import { CollectionRulesItems } from '../CollectionRulesItems/CollectionRulesItems';
import { AccountRootTypeEnum } from '../Account/types';
export class LoyaltyProgram extends Doc {
collectionRules?: CollectionRulesItems[];
expiryDuration?: number;
static filters: FiltersMap = {
expenseAccount: () => ({
rootType: AccountRootTypeEnum.Liability,
isGroup: false,
}),
};
static getListViewSettings(): ListViewSettings {
return {
columns: ['name', 'fromDate', 'toDate', 'expiryDuration'],
};
}
}