Use of jinja tags

hello All,
Please i need assistance in the use o Jinja tags. I am not a programmer, but i use examples on jinja tags as guide on doctype when i want to get an info dynamically.

Now, i want to develop a template for sales template terms and conditions for quotation.
The terms and conditions template for the quotation would require me to use customer name, address, contact person,item name, quantity, cost of item but the item table is linked to opportunity doc type.
How do i generate the “fields values” using jinja tags from the items table on quotation since its linked to another doctype

@absmachin you should add your terms directly to your print format, not Terms and Conditions!

Thanks for the response, however, i dont understand.

When i want to create a quotation, would i not add terms and condtions to it from the selection of terms and conditions?

Warm Regards,
Abraham

I too have a doubt in using the jinja tag in the below code.

I have already written code for BOM doctype items child table where I can fetch the remarks filed eventhough it is partially filled.

table, th, td { background-color: white; margin-top: 6px; font-size: 11px; } table { border-collapse: collapse;

}
td:nth-child(1),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6) {
text-align: center;

}

td:nth-child(1),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8),
td:nth-child(9),
{

vertical-align: middle;

}

{%- for row in doc.items-%} {% if row.remarks %} {% else %} {% endif %} {%- endfor -%}
SI No Item Description Req.Qty BIN Qty Scrap Qty UOM Remarks Rate Amount
{{ row.idx }} {{row.item_code}}

{{row.item_name}}
{{ row.qty}} {{ row.bin_qty}} {{ row.scrap_qty}} {{ row.uom}} {{ row.remarks }} {{ row.get_formatted("rate", doc) }} {{ row.get_formatted("amount", doc) }}

Now i have made few changes in the above code because in some documents in BOm doctype the remarks feld is totally in such case I want to eliminate the Remarks column .
This below code is showing error .
The code is

table, th, td { background-color: white; margin-top: 6px; font-size: 11px; } table { border-collapse: collapse;

}
td:nth-child(1),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6) {
text-align: center;

}

td:nth-child(1),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8),
td:nth-child(9),
{

vertical-align: middle;

}

{% set remarks_exist = false %}
{%- for row in doc.items-%}
{% if row.remarks %}
{% set remarks_exist = true %}
{% break %}
{% endif %}
{% endfor %}

{% if remarks_exist %}















{%- for row in doc.items-%}






            {% if row.remarks %}
                <td>{{ row.remarks }}</td>
            {% else %}
                <td></td>
            {% endif %}

            <td style="text-align:left">{{ row.remarks}}</td>
            <td style="text-align:left">{{ row.get_formatted("rate", doc) }}</td>
            <td  style="text-align:left">{{ row.get_formatted("amount", doc) }}</td>
        </tr>{%- endfor -%}
    </tbody>
</table>

{% endif %}

The error message is

SI No Item Description Req.Qty BIN Qty Scrap Qty UOM Remarks Rate Amount
{{ row.idx }} {{row.item_code}}

{{row.item_name}}
{{ row.qty}} {{ row.bin_qty}} {{ row.scrap_qty}} {{ row.uom}}