How to remove attributes from invoice template

Hi,
Could someone advice how I can remove the “Less: Receipt” & “Less: Credit Note” from the sales invoice template.

1 Like

There is no GUI method to do that at the moment.

You can, however, create a custom theme to exclude total lines.

Actually. I am trying to workout with the custom theme, but there is no resource on how to work with the reserved functions.

After digging in the forums I managed to get the following code which I believe is the solution.

{% if (total.label == 'Less: Credit Note') %}{% continue %}{% endif %}

but it does not seem to work.
Can someone please advise?

That code does not include the entire total.label. You must be complete and precise.

I just want the invoices to display only the invoice value, not the credit note detail nor the overpayments etc.

So could you advise how I could remove the last two lines of the invoice along with the value?

This is not a coding forum. If you do not have the skills personally to write a custom theme in Liquid, hire a local programmer. Many competent web designers have the necessary skills.

You have to leave out the ( and ) . You could use the operator ‘contains’:
{% if total.label contains ‘Less’ %}{% continue %}{% endif %}

1 Like

Spot On.
Thank you Mark.

I am well aware that this is not a coding forum. But the code mentioned above is related to the app the programmers of “Manager.io” has developed therefore there is no way anybody could magically code this out of imagination.

Secondly I am not talking about the theme. I am talking about the code that retrieves data to the theme.

You should read the post before rushing for reply if you dont understand the question you shouldnt reply!

It would not be magic. Liquid is such a straightforward templating language, a competent programmer will very quickly understand what a Manager theme is doing and how to modify the results. The language was designed for maintaining shopping websites without high levels of skill.

You misunderstand what you are looking at. @Mark’s suggested code was for the theme. Nothing you can change will modify how the program populates the variable arrays for each transaction type. Themes only control what is displayed based on those variables.

I did.

Would it be an option to save the original invoice as a .pdf on your harddisk? From then you can use it anytime. But maybe I am missing your point…

I wanted to remove the credit notes & receipts data from the invoice, this was a “Themes” Oriented issue. @Mark understood my problem and gave me the solution. its now working. :slight_smile: