diff --git a/electron-builder.yml b/electron-builder.yml index 5cbe2e42..bed25e95 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -5,7 +5,7 @@ extraResources: [ { from: 'log_creds.txt', to: '../creds/log_creds.txt' }, { from: 'translations', to: '../translations' }, - { from: 'translations', to: '../translations' }, + { from: 'templates', to: '../templates' }, ] mac: type: distribution diff --git a/src/utils/printTemplates.ts b/src/utils/printTemplates.ts index 70bca572..7130a0a0 100644 --- a/src/utils/printTemplates.ts +++ b/src/utils/printTemplates.ts @@ -116,9 +116,9 @@ function getPrintTemplateDocHints( schema: Schema, fyo: Fyo, fieldnames?: string[], - isLink?: boolean + linkLevel?: number ): PrintTemplateData { - isLink ??= false; + linkLevel ??= 0; const hints: PrintTemplateData = {}; const links: PrintTemplateData = {}; @@ -134,17 +134,14 @@ function getPrintTemplateDocHints( } hints[fieldname] = label ?? fieldname; - if (fieldtype === FieldTypeEnum.Table) { - } - const { target } = field as TargetField; const targetSchema = fyo.schemaMap[target]; - if (fieldtype === FieldTypeEnum.Link && targetSchema && !isLink) { + if (fieldtype === FieldTypeEnum.Link && targetSchema && linkLevel < 2) { links[fieldname] = getPrintTemplateDocHints( targetSchema, fyo, undefined, - true + linkLevel + 1 ); } diff --git a/templates/Basic.template.html b/templates/Basic.template.html index d36c76a8..1ac7a80f 100644 --- a/templates/Basic.template.html +++ b/templates/Basic.template.html @@ -56,11 +56,13 @@
-
Item
-
HSN/SAC
-
Quantity
-
Rate
-
Amount
+
{{ t`Item` }}
+
+ {{ t`HSN/SAC` }} +
+
{{ t`Quantity` }}
+
{{ t`Rate` }}
+
{{ t`Amount` }}
@@ -84,7 +86,7 @@

- Notes + {{ t`Notes` }}

{{ doc.terms }}

diff --git a/templates/Business.template.html b/templates/Business.template.html index ffbf2329..ae3138a0 100644 --- a/templates/Business.template.html +++ b/templates/Business.template.html @@ -56,11 +56,11 @@
-
Item
-
HSN/SAC
-
Quantity
-
Rate
-
Amount
+
{{ t`Item` }}
+
{{ t`HSN/SAC` }}
+
{{ t`Quantity` }}
+
{{ t`Rate` }}
+
{{ t`Amount` }}
diff --git a/templates/Minimal.template.html b/templates/Minimal.template.html index 8806e775..6b158bb4 100644 --- a/templates/Minimal.template.html +++ b/templates/Minimal.template.html @@ -94,11 +94,11 @@ text-gray-800 " > -
Item
-
HSN/SAC
-
Quantity
-
Rate
-
Amount
+
{{ t`Item` }}
+
{{ t`HSN/SAC` }}
+
{{ t`Quantity` }}
+
{{ t`Rate` }}
+
{{ t`Amount`}}
@@ -116,7 +116,7 @@

- Notes + {{ t`Notes` }}

{{ doc.terms }}