fux
March 17, 2017, 4:40pm
1
Hi there,
I try to change the “Sr” column name in the item table of the print formats. I guess there are ways to change the labels of other columns but how can I change the Sr without having to write my own item table format?
Thanks and nice weekend for you…
rmehta
March 17, 2017, 9:54pm
2
I don’t think there is a configurable way of doing it yet.
Oops, seems its not translated either. Will push a fix later.
doc.print_templates.get(df.fieldname) -%}
{% include doc.print_templates[df.fieldname] %}
{%- else -%}
{{ render_field_with_label(df, doc, no_of_cols) }}
{%- endif -%}
{%- else -%}
{{ render_field_with_label(df, doc, no_of_cols) }}
{%- endif -%}
{%- endmacro -%}
{%- macro render_table(df, doc) -%}
{%- set table_meta = frappe.get_meta(df.options) -%}
{%- set data = doc.get(df.fieldname)[df.start:df.end] -%}
{%- if doc.print_templates and
doc.print_templates.get(df.fieldname) -%}
{% include doc.print_templates[df.fieldname] %}
{%- else -%}
{%- if data -%}
{%- set visible_columns = get_visible_columns(doc.get(df.fieldname),
table_meta, df) -%}
<div {{ fieldmeta(df) }}>
@rmehta Is this fixed? I want to change the translation too. Also the amount of the item table. Thanks.
rmehta
July 18, 2017, 4:53am
4
@Robert1112 can you check? Maybe send a Pull Request?
@rmehta Hi Thanks for your reply. Where should I check? And what does pull mean? I am not a technical. Sorry for the stupid question. thanks,
rmehta
July 18, 2017, 6:51am
6
@Robert1112 just checked. The issue has been fixed.
@rmehta Hi I run ERPNext using Bitnami image on Google Cloud platform. Does it mean I need to update my ERPNext version? Thanks.
Hi
How we can change Table header only in Print out for items table
{%- for row in doc.items -%}
<td style="width: 3%;">{{ row.idx }}</td>
<td style="width: 20%;">
{{ row.item_name }}
{% if row.item_code != row.item_name -%}
<br>Item Code: {{ row.item_code}}
{%- endif %}
</td>
<td style="width: 37%;">
<div style="border: 0px;">{{ row.description }}</div></td>
<td style="width: 10%; text-align: right;">{{ row.qty }} </td>
<td style="width: 15%; text-align: right;">{{
row.rate}}</td>
<td style="width: 15%; text-align: right;">{{
row.amount}}</td>
</tr>
{%- endfor -%}
ID
Material
Description
Quantity (PCS)
Rate(AED)
Amount(AED)
Please try this code
In standard format itself Replace the Items table and Add Custom HTML and insert this query