diff --git a/fyo/models/SystemSettings.ts b/fyo/models/SystemSettings.ts index 71a83769..31161997 100644 --- a/fyo/models/SystemSettings.ts +++ b/fyo/models/SystemSettings.ts @@ -17,6 +17,7 @@ export default class SystemSettings extends Doc { version?: string; instanceId?: string; darkMode?: boolean; + displayTermsAndConditions?: boolean; validations: ValidationMap = { displayPrecision(value: DocValue) { diff --git a/models/baseModels/PrintSettings/PrintSettings.ts b/models/baseModels/PrintSettings/PrintSettings.ts index 706435ab..f416d140 100644 --- a/models/baseModels/PrintSettings/PrintSettings.ts +++ b/models/baseModels/PrintSettings/PrintSettings.ts @@ -13,7 +13,11 @@ export class PrintSettings extends Doc { displayLogo?: boolean; displayTime?: boolean; displayDescription?: boolean; + displaytermsandconditions?: boolean; + termsAndConditions?: string; posPrintWidth?: number; amountInWords?: boolean; - override hidden: HiddenMap = {}; + override hidden: HiddenMap = { + termsAndConditions: () => !this.displaytermsandconditions, + }; } diff --git a/schemas/app/PrintSettings.json b/schemas/app/PrintSettings.json index 65382558..fae03e26 100644 --- a/schemas/app/PrintSettings.json +++ b/schemas/app/PrintSettings.json @@ -133,12 +133,24 @@ "fieldtype": "Check", "section": "Customizations" }, + { + "fieldname": "displaytermsandconditions", + "label": "Display Terms and Conditions", + "fieldtype": "Check", + "section": "Customizations" + }, { "fieldname": "posPrintWidth", "label": "Pos Print Width", "fieldtype": "Float", "default": 8, "section": "Customizations" + }, + { + "fieldname": "termsAndConditions", + "label": "Terms and Conditions", + "fieldtype": "Text", + "section": "Customizations" } ] } diff --git a/schemas/core/SystemSettings.json b/schemas/core/SystemSettings.json index d58da4fd..4ab79529 100644 --- a/schemas/core/SystemSettings.json +++ b/schemas/core/SystemSettings.json @@ -141,6 +141,13 @@ "default": false, "description": "Sets the theme of the app.", "section": "Theme" + }, + { + "fieldname": "displayTermsAndConditions", + "label": "Display Terms and Conditions", + "fieldtype": "Check", + "default": false, + "section": "Customizations" } ], "quickEditFields": [ diff --git a/src/pages/CommonForm/CommonFormSection.vue b/src/pages/CommonForm/CommonFormSection.vue index a373f9b2..a4c7b8a8 100644 --- a/src/pages/CommonForm/CommonFormSection.vue +++ b/src/pages/CommonForm/CommonFormSection.vue @@ -23,6 +23,7 @@ field.fieldtype === 'Table' ? 'col-span-2 text-base' : '', field.fieldtype === 'AttachImage' ? 'row-span-2' : '', field.fieldtype === 'Check' ? 'mt-auto' : 'mb-auto', + field.fieldname === 'termsAndConditions' ? 'col-span-2' : '', ]" >