Skip to content

Commit

Permalink
Merge pull request #769 from digitalentity/de_add_swiss_regional_sett…
Browse files Browse the repository at this point in the history
…ings

Add regional schema for Switzerland
  • Loading branch information
mildred authored Dec 2, 2023
2 parents 814845f + 6ec7a1b commit f946ce8
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?
*.code-workspace

#Electron-builder output
/dist_electron
Expand Down
21 changes: 21 additions & 0 deletions schemas/regional/ch/AccountingSettings.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
4 changes: 4 additions & 0 deletions schemas/regional/ch/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { SchemaStub } from '../../types';
import AccountingSettings from './AccountingSettings.json';

export default [AccountingSettings] as SchemaStub[];
6 changes: 5 additions & 1 deletion schemas/regional/index.ts
Original file line number Diff line number Diff line change
@@ -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[]
>;
2 changes: 1 addition & 1 deletion src/utils/printTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const printSettingsFields = [
'address',
'companyName',
];
const accountingSettingsFields = ['gstin'];
const accountingSettingsFields = ['gstin', 'taxId'];

export async function getPrintTemplatePropValues(
doc: Doc
Expand Down

0 comments on commit f946ce8

Please sign in to comment.