2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 02:49:03 +00:00

Add regional schemas for Switzerland.

This commit is contained in:
Konstantin Sharlaimov 2023-11-02 22:21:12 +01:00
parent e86778f09e
commit 6ec7a1b9a1
5 changed files with 32 additions and 2 deletions

1
.gitignore vendored
View File

@ -23,6 +23,7 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?
*.code-workspace
#Electron-builder output
/dist_electron

View File

@ -0,0 +1,21 @@
{
"name": "AccountingSettings",
"fields": [
{
"fieldname": "taxId",
"label": "Tax ID",
"fieldtype": "Data",
"placeholder": "CHE-123.456.789",
"section": "Default"
}
],
"quickEditFields": [
"fullname",
"email",
"companyName",
"country",
"fiscalYearStart",
"fiscalYearEnd",
"taxId"
]
}

View File

@ -0,0 +1,4 @@
import { SchemaStub } from '../../types';
import AccountingSettings from './AccountingSettings.json';
export default [AccountingSettings] as SchemaStub[];

View File

@ -1,7 +1,11 @@
import { SchemaStub } from 'schemas/types';
import IndianSchemas from './in';
import SwissSchemas from './ch';
/**
* Regional Schemas are exported by country code.
*/
export default { in: IndianSchemas } as Record<string, SchemaStub[]>;
export default { in: IndianSchemas, ch: SwissSchemas } as Record<
string,
SchemaStub[]
>;

View File

@ -29,7 +29,7 @@ const printSettingsFields = [
'address',
'companyName',
];
const accountingSettingsFields = ['gstin'];
const accountingSettingsFields = ['gstin', 'taxId'];
export async function getPrintTemplatePropValues(
doc: Doc