mirror of
https://github.com/frappe/books.git
synced 2024-11-12 16:36:27 +00:00
feat: add locales, reword a get started
This commit is contained in:
parent
ec3558f513
commit
facf5dbfb6
File diff suppressed because it is too large
Load Diff
@ -134,7 +134,7 @@ export default {
|
|||||||
label: _('System'),
|
label: _('System'),
|
||||||
icon: 'system',
|
icon: 'system',
|
||||||
description:
|
description:
|
||||||
'Setup system defaults like date format and currency precision',
|
'Setup system defaults like date format and display precision',
|
||||||
fieldname: 'systemSetup',
|
fieldname: 'systemSetup',
|
||||||
action() {
|
action() {
|
||||||
openSettings('System');
|
openSettings('System');
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import config from '@/config';
|
import config from '@/config';
|
||||||
import frappe from 'frappejs';
|
import frappe from 'frappejs';
|
||||||
|
import { DEFAULT_LOCALE } from 'frappejs/utils/consts';
|
||||||
import countryList from '~/fixtures/countryInfo.json';
|
import countryList from '~/fixtures/countryInfo.json';
|
||||||
import generateTaxes from '../../../models/doctype/Tax/RegionalEntries';
|
import generateTaxes from '../../../models/doctype/Tax/RegionalEntries';
|
||||||
import regionalModelUpdates from '../../../models/regionalModelUpdates';
|
import regionalModelUpdates from '../../../models/regionalModelUpdates';
|
||||||
@ -19,6 +20,7 @@ export default async function setupCompany(setupWizardValues) {
|
|||||||
|
|
||||||
const accountingSettings = frappe.AccountingSettings;
|
const accountingSettings = frappe.AccountingSettings;
|
||||||
const currency = countryList[country]['currency'];
|
const currency = countryList[country]['currency'];
|
||||||
|
const locale = countryList[country]['locale'] ?? DEFAULT_LOCALE;
|
||||||
await callInitializeMoneyMaker(currency);
|
await callInitializeMoneyMaker(currency);
|
||||||
|
|
||||||
await accountingSettings.update({
|
await accountingSettings.update({
|
||||||
@ -47,6 +49,8 @@ export default async function setupCompany(setupWizardValues) {
|
|||||||
|
|
||||||
await accountingSettings.update({ setupComplete: 1 });
|
await accountingSettings.update({ setupComplete: 1 });
|
||||||
frappe.AccountingSettings = accountingSettings;
|
frappe.AccountingSettings = accountingSettings;
|
||||||
|
|
||||||
|
(await frappe.getSingle('SystemSettings')).update({ locale });
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setupGlobalCurrencies(countries) {
|
async function setupGlobalCurrencies(countries) {
|
||||||
|
Loading…
Reference in New Issue
Block a user