2
0
mirror of https://github.com/frappe/books.git synced 2025-02-04 21:18:32 +00:00
books/src/renderer/helpers.ts
2022-05-23 16:18:22 +05:30

14 lines
323 B
TypeScript

import { ConfigKeys } from 'fyo/core/types';
import { fyo } from 'src/initFyo';
export function incrementOpenCount() {
let openCount = fyo.config.get(ConfigKeys.OpenCount);
if (typeof openCount !== 'number') {
openCount = 1;
} else {
openCount += 1;
}
fyo.config.set(ConfigKeys.OpenCount, openCount);
}