mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: set currency after setup
This commit is contained in:
parent
c0c3046c20
commit
fe35a043f8
@ -89,7 +89,7 @@ async function setInstanceId(fyo: Fyo) {
|
||||
)) as string;
|
||||
}
|
||||
|
||||
async function setCurrencySymbols(fyo: Fyo) {
|
||||
export async function setCurrencySymbols(fyo: Fyo) {
|
||||
const currencies = (await fyo.db.getAll(ModelNameEnum.Currency, {
|
||||
fields: ['name', 'symbol'],
|
||||
})) as { name: string; symbol: string }[];
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
import { AccountRootTypeEnum } from 'models/baseModels/Account/types';
|
||||
import { AccountingSettings } from 'models/baseModels/AccountingSettings/AccountingSettings';
|
||||
import { ModelNameEnum } from 'models/types';
|
||||
import { initializeInstance } from 'src/initFyo';
|
||||
import { initializeInstance, setCurrencySymbols } from 'src/initFyo';
|
||||
import { createRegionalRecords } from 'src/regional';
|
||||
import { getRandomString } from 'utils';
|
||||
import { defaultUOMs } from 'utils/defaults';
|
||||
@ -40,6 +40,10 @@ export default async function setupInstance(
|
||||
await createDefaultNumberSeries(fyo);
|
||||
|
||||
await completeSetup(companyName, fyo);
|
||||
if (!Object.keys(fyo.currencySymbols).length) {
|
||||
await setCurrencySymbols(fyo);
|
||||
}
|
||||
|
||||
fyo.store.skipTelemetryLogging = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user