2
0
mirror of https://github.com/frappe/books.git synced 2025-01-28 17:48:37 +00:00
books/src/renderer/helpers.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
321 B
TypeScript
Raw Normal View History

import { fyo } from '@/initFyo';
import { ConfigKeys } from 'fyo/core/types';
2022-03-16 17:12:06 +05:30
export function incrementOpenCount() {
let openCount = fyo.config.get(ConfigKeys.OpenCount);
2022-03-16 17:12:06 +05:30
if (typeof openCount !== 'number') {
openCount = 1;
} else {
openCount += 1;
}
fyo.config.set(ConfigKeys.OpenCount, openCount);
2022-03-16 17:12:06 +05:30
}