mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix(preferences): currencies preferences.
This commit is contained in:
@@ -41,7 +41,7 @@ export default class SettingsController extends BaseController {
|
||||
return [
|
||||
body('options').isArray({ min: 1 }),
|
||||
body('options.*.key').exists().trim().isLength({ min: 1 }),
|
||||
body('options.*.value').exists().trim().isLength({ min: 1 }),
|
||||
body('options.*.value').exists().trim(),
|
||||
body('options.*.group').exists().trim().isLength({ min: 1 }),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,6 +5,12 @@ exports.up = (knex) => {
|
||||
const tenancyService = Container.get(TenancyService);
|
||||
const settings = tenancyService.settings(knex.userParams.tenantId);
|
||||
|
||||
// Orgnization settings.
|
||||
settings.set({ group: 'organization', key: 'accounting_basis', value: 'accural' });
|
||||
|
||||
// Accounts settings.
|
||||
settings.set({ group: 'accounts', key: 'account_code_unique', value: true });
|
||||
|
||||
// Manual journals settings.
|
||||
settings.set({ group: 'manual_journals', key: 'next_number', value: '00001' });
|
||||
settings.set({ group: 'manual_journals', key: 'auto_increment', value: true });
|
||||
|
||||
@@ -261,6 +261,7 @@ export default class CurrenciesService implements ICurrenciesService {
|
||||
await Currency.query().insert({
|
||||
currency_code: currencyMeta.code,
|
||||
currency_name: currencyMeta.name,
|
||||
currency_sign: currencyMeta.symbol,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user