2
0
mirror of https://github.com/frappe/books.git synced 2025-01-27 09:08:24 +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
323 B
TypeScript
Raw Normal View History

import { ConfigKeys } from 'fyo/core/types';
2022-04-20 12:08:47 +05:30
import { fyo } from 'src/initFyo';
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
}