mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: issue where setup currency is not considered
This commit is contained in:
parent
8ab7356701
commit
0702ce383f
@ -2,10 +2,10 @@ import config from '@/config';
|
|||||||
import frappe from 'frappe';
|
import frappe from 'frappe';
|
||||||
import { DEFAULT_LOCALE } from 'frappe/utils/consts';
|
import { DEFAULT_LOCALE } from 'frappe/utils/consts';
|
||||||
import countryList from '~/fixtures/countryInfo.json';
|
import countryList from '~/fixtures/countryInfo.json';
|
||||||
|
import importCharts from '../../../accounting/importCOA';
|
||||||
import generateTaxes from '../../../models/doctype/Tax/RegionalEntries';
|
import generateTaxes from '../../../models/doctype/Tax/RegionalEntries';
|
||||||
import regionalModelUpdates from '../../../models/regionalModelUpdates';
|
import regionalModelUpdates from '../../../models/regionalModelUpdates';
|
||||||
import { callInitializeMoneyMaker } from '../../utils';
|
import { callInitializeMoneyMaker } from '../../utils';
|
||||||
import importCharts from '../../../accounting/importCOA';
|
|
||||||
|
|
||||||
export default async function setupCompany(setupWizardValues) {
|
export default async function setupCompany(setupWizardValues) {
|
||||||
const {
|
const {
|
||||||
@ -15,13 +15,14 @@ export default async function setupCompany(setupWizardValues) {
|
|||||||
name,
|
name,
|
||||||
email,
|
email,
|
||||||
bankName,
|
bankName,
|
||||||
|
currency: companyCurrency,
|
||||||
fiscalYearStart,
|
fiscalYearStart,
|
||||||
fiscalYearEnd,
|
fiscalYearEnd,
|
||||||
chartOfAccounts,
|
chartOfAccounts,
|
||||||
} = setupWizardValues;
|
} = setupWizardValues;
|
||||||
|
|
||||||
const accountingSettings = frappe.AccountingSettings;
|
const accountingSettings = frappe.AccountingSettings;
|
||||||
const currency = countryList[country]['currency'];
|
const currency = companyCurrency || countryList[country]['currency'];
|
||||||
const locale = countryList[country]['locale'] ?? DEFAULT_LOCALE;
|
const locale = countryList[country]['locale'] ?? DEFAULT_LOCALE;
|
||||||
await callInitializeMoneyMaker(currency);
|
await callInitializeMoneyMaker(currency);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user