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..8e3b6df7 100644 --- a/schemas/app/PrintSettings.json +++ b/schemas/app/PrintSettings.json @@ -133,6 +133,18 @@ "fieldtype": "Check", "section": "Customizations" }, + { + "fieldname": "displaytermsandconditions", + "label": "Display Terms and Conditions", + "fieldtype": "Check", + "section": "Customizations" + }, + { + "fieldname": "termsAndConditions", + "label": "Terms and Conditions", + "fieldtype": "Text", + "section": "Customizations" + }, { "fieldname": "posPrintWidth", "label": "Pos Print Width", diff --git a/src/pages/TemplateBuilder/PrintContainer.vue b/src/pages/TemplateBuilder/PrintContainer.vue index 711ff437..5c315c63 100644 --- a/src/pages/TemplateBuilder/PrintContainer.vue +++ b/src/pages/TemplateBuilder/PrintContainer.vue @@ -4,6 +4,7 @@ :scale="Math.max(scale, 0.1)" :width="width" :height="height" + :show-overflow="true" class="mx-auto shadow-lg border" >
diff --git a/src/utils/printTemplates.ts b/src/utils/printTemplates.ts index f6916540..757fd294 100644 --- a/src/utils/printTemplates.ts +++ b/src/utils/printTemplates.ts @@ -38,6 +38,8 @@ const printSettingsFields = [ 'address', 'companyName', 'amountInWords', + 'displaytermsandconditions', + 'termsAndConditions', ]; const accountingSettingsFields = ['gstin', 'taxId']; diff --git a/templates/Basic.template.html b/templates/Basic.template.html index 6c5f533b..8402f928 100644 --- a/templates/Basic.template.html +++ b/templates/Basic.template.html @@ -153,4 +153,15 @@ + + +
+

{{ t`Terms and Conditions` }}

+

+ {{ print.termsAndConditions }} +

+
diff --git a/templates/Business.Payment.template.html b/templates/Business.Payment.template.html index 2e33b70b..355073a5 100644 --- a/templates/Business.Payment.template.html +++ b/templates/Business.Payment.template.html @@ -122,5 +122,16 @@

{{ doc.terms }}

+ + +
+

{{t`Terms and Conditions`}}

+

+ {{ print.termsAndConditions }} +

+
diff --git a/templates/Business.Shipment.template.html b/templates/Business.Shipment.template.html index 7371bc61..d897d278 100644 --- a/templates/Business.Shipment.template.html +++ b/templates/Business.Shipment.template.html @@ -107,5 +107,16 @@

{{ doc.terms }}

+ + +
+

{{t`Terms and Conditions`}}

+

+ {{ print.termsAndConditions }} +

+
diff --git a/templates/Business.template.html b/templates/Business.template.html index 4b52564b..57122c0a 100644 --- a/templates/Business.template.html +++ b/templates/Business.template.html @@ -132,9 +132,21 @@

{{t`Notes`}}

{{ doc.terms }}

+

{{t`Grand Total In Words`}}:

{{doc.grandTotalInWords}}

+ + +
+

{{t`Terms and Conditions`}}

+

+ {{ print.termsAndConditions }} +

+
diff --git a/templates/Minimal.template.html b/templates/Minimal.template.html index 15e013e5..b8282358 100644 --- a/templates/Minimal.template.html +++ b/templates/Minimal.template.html @@ -177,4 +177,17 @@ + + +
+

+ {{ t`Terms and Conditions` }} +

+

+ {{ print.termsAndConditions }} +

+