Add regional schemas for Switzerland.

This commit is contained in:
Konstantin Sharlaimov
2023-11-28 22:14:35 +01:00
parent e86778f09e
commit 6ec7a1b9a1
5 changed files with 32 additions and 2 deletions
+1
View File
@@ -23,6 +23,7 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?
*.code-workspace
#Electron-builder output
/dist_electron
@@ -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
View File
@@ -0,0 +1,4 @@
import { SchemaStub } from '../../types';
import AccountingSettings from './AccountingSettings.json';
export default [AccountingSettings] as SchemaStub[];
+5 -1
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[]
>;
+1 -1
View File
@@ -29,7 +29,7 @@ const printSettingsFields = [
'address',
'companyName',
];
const accountingSettingsFields = ['gstin'];
const accountingSettingsFields = ['gstin', 'taxId'];
export async function getPrintTemplatePropValues(
doc: Doc