mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
fix: extra resources build link
- display links upto two levels - mark template strings for translation
This commit is contained in:
parent
8ff4a97790
commit
7a22ab8946
@ -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
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -56,11 +56,13 @@
|
||||
<section class="mt-8 text-base">
|
||||
<!-- Heading Row -->
|
||||
<section class="text-gray-600 w-full flex border-b">
|
||||
<div class="py-4 w-5/12">Item</div>
|
||||
<div class="py-4 text-right w-2/12" v-if="doc.showHSN">HSN/SAC</div>
|
||||
<div class="py-4 text-right w-1/12">Quantity</div>
|
||||
<div class="py-4 text-right w-3/12">Rate</div>
|
||||
<div class="py-4 text-right w-3/12">Amount</div>
|
||||
<div class="py-4 w-5/12">{{ t`Item` }}</div>
|
||||
<div class="py-4 text-right w-2/12" v-if="doc.showHSN">
|
||||
{{ t`HSN/SAC` }}
|
||||
</div>
|
||||
<div class="py-4 text-right w-1/12">{{ t`Quantity` }}</div>
|
||||
<div class="py-4 text-right w-3/12">{{ t`Rate` }}</div>
|
||||
<div class="py-4 text-right w-3/12">{{ t`Amount` }}</div>
|
||||
</section>
|
||||
|
||||
<!-- Body Rows -->
|
||||
@ -84,7 +86,7 @@
|
||||
<!-- Invoice Terms -->
|
||||
<section class="w-1/2">
|
||||
<h3 class="text-sm tracking-widest text-gray-600 mt-2" v-if="doc.terms">
|
||||
Notes
|
||||
{{ t`Notes` }}
|
||||
</h3>
|
||||
<p class="my-4 text-lg whitespace-pre-line">{{ doc.terms }}</p>
|
||||
</section>
|
||||
|
@ -56,11 +56,11 @@
|
||||
<section class="px-12 pt-12 text-lg">
|
||||
<!-- Heading Row -->
|
||||
<section class="mb-4 flex font-semibold">
|
||||
<div class="w-4/12">Item</div>
|
||||
<div class="w-2/12 text-right" v-if="doc.showHSN">HSN/SAC</div>
|
||||
<div class="w-2/12 text-right">Quantity</div>
|
||||
<div class="w-3/12 text-right">Rate</div>
|
||||
<div class="w-3/12 text-right">Amount</div>
|
||||
<div class="w-4/12">{{ t`Item` }}</div>
|
||||
<div class="w-2/12 text-right" v-if="doc.showHSN">{{ t`HSN/SAC` }}</div>
|
||||
<div class="w-2/12 text-right">{{ t`Quantity` }}</div>
|
||||
<div class="w-3/12 text-right">{{ t`Rate` }}</div>
|
||||
<div class="w-3/12 text-right">{{ t`Amount` }}</div>
|
||||
</section>
|
||||
|
||||
<!-- Body Rows -->
|
||||
|
@ -94,11 +94,11 @@
|
||||
text-gray-800
|
||||
"
|
||||
>
|
||||
<div class="w-4/12 text-left">Item</div>
|
||||
<div class="w-2/12 text-right" v-if="doc.showHSN">HSN/SAC</div>
|
||||
<div class="w-2/12 text-right">Quantity</div>
|
||||
<div class="w-3/12 text-right">Rate</div>
|
||||
<div class="w-3/12 text-right">Amount</div>
|
||||
<div class="w-4/12 text-left">{{ t`Item` }}</div>
|
||||
<div class="w-2/12 text-right" v-if="doc.showHSN">{{ t`HSN/SAC` }}</div>
|
||||
<div class="w-2/12 text-right">{{ t`Quantity` }}</div>
|
||||
<div class="w-3/12 text-right">{{ t`Rate` }}</div>
|
||||
<div class="w-3/12 text-right">{{ t`Amount`}}</div>
|
||||
</section>
|
||||
|
||||
<!-- Body Rows -->
|
||||
@ -116,7 +116,7 @@
|
||||
<!-- Invoice Terms -->
|
||||
<section class="w-1/2" v-if="doc.terms">
|
||||
<h3 class="uppercase text-sm tracking-widest font-semibold text-gray-800">
|
||||
Notes
|
||||
{{ t`Notes` }}
|
||||
</h3>
|
||||
<p class="mt-4 text-lg whitespace-pre-line">{{ doc.terms }}</p>
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user