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

feat: add locales, reword a get started

This commit is contained in:
18alantom 2021-12-23 18:07:50 +05:30
parent ec3558f513
commit facf5dbfb6
3 changed files with 1333 additions and 714 deletions

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@ export default {
label: _('System'),
icon: 'system',
description:
'Setup system defaults like date format and currency precision',
'Setup system defaults like date format and display precision',
fieldname: 'systemSetup',
action() {
openSettings('System');

View File

@ -1,5 +1,6 @@
import config from '@/config';
import frappe from 'frappejs';
import { DEFAULT_LOCALE } from 'frappejs/utils/consts';
import countryList from '~/fixtures/countryInfo.json';
import generateTaxes from '../../../models/doctype/Tax/RegionalEntries';
import regionalModelUpdates from '../../../models/regionalModelUpdates';
@ -19,6 +20,7 @@ export default async function setupCompany(setupWizardValues) {
const accountingSettings = frappe.AccountingSettings;
const currency = countryList[country]['currency'];
const locale = countryList[country]['locale'] ?? DEFAULT_LOCALE;
await callInitializeMoneyMaker(currency);
await accountingSettings.update({
@ -47,6 +49,8 @@ export default async function setupCompany(setupWizardValues) {
await accountingSettings.update({ setupComplete: 1 });
frappe.AccountingSettings = accountingSettings;
(await frappe.getSingle('SystemSettings')).update({ locale });
}
async function setupGlobalCurrencies(countries) {