Adding Columns to Print Report

Hello, Everyone
from the screenshot below there are two tables in this print format i want to add the gst column to main table to get rid of the second table. would be glad if some body explain how to achieve this. thanks

@Pirated You will have to add custom fields in the Item child table for the taxes and link them to the respective fields in the Taxes child table, this way you can add the custom fields in the Print format.

For adding custom fields refer: https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-field

For print format customisation : https://erpnext.com/docs/user/manual/en/customize-erpnext/print-format#custom-print-format

1 Like

@Pirated, In code of Print Format,where you have looped the Item data in that you can take another loop and on condition where your item code matches with the taxes item code there you can add a td tag for item details and mention GST from tax child table.

For Example,
{%- for row in doc.items -%}
{%- for row1 in doc.taxes -%}
{% if row.item_code == row1.item_code %}
print item details here including taxes GST for the item code
{%- endif -%}
{%- endfor -%}
{%- endfor -%}

1 Like

@Mitali_Deshpande thanks for the idea i think i can somehow achieve this as i am not very expert.
@radhika.g thanks for the help but i didnt got your point as this was above my head :sweat_smile:. pardon for my less knowledge.

@Pirated You can just follow the reference links for the customisation.

@Mitali_Deshpande
@radhika.g
can you help me with something here thanks