2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 03:29:00 +00:00

fix: issue where setup currency is not considered

This commit is contained in:
18alantom 2022-02-26 12:52:07 +05:30
parent 8ab7356701
commit 0702ce383f

View File

@ -2,10 +2,10 @@ import config from '@/config';
import frappe from 'frappe';
import { DEFAULT_LOCALE } from 'frappe/utils/consts';
import countryList from '~/fixtures/countryInfo.json';
import importCharts from '../../../accounting/importCOA';
import generateTaxes from '../../../models/doctype/Tax/RegionalEntries';
import regionalModelUpdates from '../../../models/regionalModelUpdates';
import { callInitializeMoneyMaker } from '../../utils';
import importCharts from '../../../accounting/importCOA';
export default async function setupCompany(setupWizardValues) {
const {
@ -15,13 +15,14 @@ export default async function setupCompany(setupWizardValues) {
name,
email,
bankName,
currency: companyCurrency,
fiscalYearStart,
fiscalYearEnd,
chartOfAccounts,
} = setupWizardValues;
const accountingSettings = frappe.AccountingSettings;
const currency = countryList[country]['currency'];
const currency = companyCurrency || countryList[country]['currency'];
const locale = countryList[country]['locale'] ?? DEFAULT_LOCALE;
await callInitializeMoneyMaker(currency);