mirror of
https://github.com/frappe/books.git
synced 2025-02-02 20:18:26 +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;
|
)) as string;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setCurrencySymbols(fyo: Fyo) {
|
export async function setCurrencySymbols(fyo: Fyo) {
|
||||||
const currencies = (await fyo.db.getAll(ModelNameEnum.Currency, {
|
const currencies = (await fyo.db.getAll(ModelNameEnum.Currency, {
|
||||||
fields: ['name', 'symbol'],
|
fields: ['name', 'symbol'],
|
||||||
})) as { name: string; symbol: string }[];
|
})) as { name: string; symbol: string }[];
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
import { AccountRootTypeEnum } from 'models/baseModels/Account/types';
|
import { AccountRootTypeEnum } from 'models/baseModels/Account/types';
|
||||||
import { AccountingSettings } from 'models/baseModels/AccountingSettings/AccountingSettings';
|
import { AccountingSettings } from 'models/baseModels/AccountingSettings/AccountingSettings';
|
||||||
import { ModelNameEnum } from 'models/types';
|
import { ModelNameEnum } from 'models/types';
|
||||||
import { initializeInstance } from 'src/initFyo';
|
import { initializeInstance, setCurrencySymbols } from 'src/initFyo';
|
||||||
import { createRegionalRecords } from 'src/regional';
|
import { createRegionalRecords } from 'src/regional';
|
||||||
import { getRandomString } from 'utils';
|
import { getRandomString } from 'utils';
|
||||||
import { defaultUOMs } from 'utils/defaults';
|
import { defaultUOMs } from 'utils/defaults';
|
||||||
@ -40,6 +40,10 @@ export default async function setupInstance(
|
|||||||
await createDefaultNumberSeries(fyo);
|
await createDefaultNumberSeries(fyo);
|
||||||
|
|
||||||
await completeSetup(companyName, fyo);
|
await completeSetup(companyName, fyo);
|
||||||
|
if (!Object.keys(fyo.currencySymbols).length) {
|
||||||
|
await setCurrencySymbols(fyo);
|
||||||
|
}
|
||||||
|
|
||||||
fyo.store.skipTelemetryLogging = false;
|
fyo.store.skipTelemetryLogging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user