Skip to content

Commit

Permalink
fix: issue where setup currency is not considered
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Feb 26, 2022
1 parent 8ab7356 commit 0702ce3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/SetupWizard/setupCompany.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);

Expand Down

0 comments on commit 0702ce3

Please sign in to comment.