diff --git a/accounting/gst.js b/accounting/gst.js index 05dc389e..486ec8c6 100644 --- a/accounting/gst.js +++ b/accounting/gst.js @@ -4,7 +4,7 @@ import { IPC_ACTIONS } from '@/messages'; import { ipcRenderer } from 'electron'; import { DateTime } from 'luxon'; import { sleep } from 'frappejs/utils'; -import { makeJSON, promptWhenGstUnavailable } from '@/utils'; +import { makeJSON, showMessageDialog } from '@/utils'; /** * GST is a map which gives a final rate for any given gst item @@ -174,3 +174,22 @@ async function getSavePath(name = 'gstr1') { return filePath; } + +export function promptWhenGstUnavailable() { + return new Promise((resolve) => { + showMessageDialog({ + message: _('Export failed!'), + description: _( + 'Report cannot be exported if company gst details are not configured' + ), + buttons: [ + { + label: _('Ok'), + action() { + resolve(true); + }, + }, + ], + }); + }); +} diff --git a/src/utils.js b/src/utils.js index 9959f7fb..a9748fc7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -306,20 +306,3 @@ export function fuzzyMatch(keyword, candidate) { export function openSettings(tab) { routeTo({ path: '/settings', query: { tab } }); } - -export function promptWhenGstUnavailable() { - return new Promise((resolve) => { - showMessageDialog({ - message: _('Export failed!'), - description: _('Report cannot be exported if company gst details are not configured'), - buttons: [ - { - label: _('Ok'), - action() { - resolve(true); - }, - }, - ], - }); - }); -} \ No newline at end of file