Custom field for Invoice


I have edited the default invoice template and have it all working well, however i would like to change the “Discount” column to a custom field “Size” but this custom field is under Inventory… I have tried everything suggested on the forums but ain’t having any luck. please find code below.

{{ inventory.custom_fields['Size'] }}

Where am i going wrong please?

I guess basically what i need please is the code to call my custom field “size” from inventory to show on invoices. hope that makes sense.

Not sure if this will help or is still valid but search for and read this.

1 Like

that worked perfectly thank you!

but created one more small issue… the “Total” at the bottom of the table now sits below the “Unit Price” column where i need it to be under the “Amount” column…

Loving the operation simplicity of this program! almost completed with my custom table… thanks a million guys!

Just need a hand with the above last issue. Thanks again!

Count the number of <td> tags in a table row tag <tr> and adjust the “colspan” attribute for the totals accordingly.

The default template has 6 <TD> tags (columns) per <TR> tag (rows) for the line items table.
The totals are also part of the same table, but only need 2 columns. So the last few lines are made up of 2 <TD> tags, but the table requires 6. So here you see the colspan=5 attribute being used within a <TD> tag. Which means that that <TD> tag will span 5 tags, plus 1 equals 6.

Hope this helpes. Good luck.

1 Like

Your a legend thank you! worked perfectly :slight_smile: