Hide Tax Code Column

Hi all
I know that this was last asked a while ago. See one of the links below.
Hiding tax column - Manager Forum
But it is BECAUSE it was asked a long while ago that I am asking again now.

Is there a way to hide/remove the Tax Code column from a Sales Invoice? The methods mentioned in the link above are outdated and no longer possible.

The Zimbabwean tax authority ZIMRA is trying to get everyone to submit standardised sales invoices, credit notes etc. We were told that they don’t want the Tax Code column in the templates as their program will ‘work out’ the tax % being applied per line item.

I also know - as it has been iterated several times in the forum in different topics - that people using custom themes are advised to try get help from a programmer.
Unfortunately however, the programmer I have approached has said that the code for the Tax Code Column code is not exposed?

Any assistance with this matter would be greatly appreciated. Thanks in advance.

This how to hide column Tax in custom Themes

{% assign taxColumnIdx = -1 %}
{% for col in table.columns %}
    {% if col.label == 'Tax' %}
        {% assign taxColumnIdx = forloop.index0 %}
        {% break %}
    {% endif %}
{% endfor %}

{% assign mins = 1 %}
{% if taxColumnIdx != -1 %} {% assign mins = 2 %} {% endif %} 

<!-- column Header -->
{% for column in table.columns %}
    {% if forloop.index0 != taxColumnIdx %}
        <td >{{ column.label }}</td>
    {% endif %}
{% endfor %}

<!-- Cells Rows -->
{% for row in table.rows %}
<tr>
    {% for cell in row.cells %}
        {% if forloop.index0 != taxColumnIdx %}
            <td >{{ cell.text | newline_to_br }}</td>
        {% endif %}
    {% endfor %}
</tr>
{% endfor %}

<!-- Spacer Row -->
{% for column in table.columns %}
    {% if forloop.index0 != taxColumnIdx %}
        <td>&nbsp;</td>
    {% endif %}
{% endfor %}

<!-- Total Rows -->
{% for total in table.totals %}
    <tr>
        <td colspan="{{ table.columns | size | minus: mins }}">{{ total.label }}</td>
        <td>{{ total.text }}</td>
    </tr>
{% endfor %}

But it seems like your problem (Zimbabwean) is that when Tax Amount is zero or empty, the Tax and Tax Amount columns are not exposed in custom themes. Even though you have checked the Show tax amount column on the Invoice Form.

It seems that only developer @lubos can help you with this problem.

@RKzw but I assume that ZIMRA will be some kind of digital submission system. They won’t be looking at the actual layout of invoices. Either way, can you show an example of invoice where you do not show Tax Code column?

Hi @lubos, thanks for your response.

ZIMRA’s new system in 2024 involves implementing individual QR codes for each sales invoice, credit note etc. In order for this to be standardised across all the different accounting packages that are being used in the country, they have stipulated we all need to comply with their ‘templates’, which dictate terminology used, layout etc.

Unfortunately, they haven’t given us these templates as a simple, unambiguous example, and instead have relied on intermediary fiscalisation companies (one of which is called Axis) to communicate the ZIMRA requirements. So I can’t give you their OFFICIAL document stating what they require.

However, from multiple ‘back-and-forths’ with informed persons at Axis, we have narrowed it down to needing a template such as the sample that I’ve included immediately below:

I have 2 different sets of custom theme code that almost fulfil these requirements.

@Mabaega is referring to an issue we encountered and got stuck on (via forum private messages) in one of these series of code.

In this, somehow the Tax Code Column is initially hidden (which is great and fits ZIMRA requirements), but there is an issue whenever the Tax Code is set to 0% - demonstrated as follows:

  • if the Tax Code % on any invoice/credit note using this custom theme has the Tax Code value set to 0%, the right side of the table disappears, as well as the amount column etc. The Tax Code column itself also reappears (please see screenshot below where I have used an arrow to highlight the issue):

  • It repeats this ‘glitch’ if the Quantity of items with 15% is set to zero on an invoice that has a 0% Tax Code on it (see screenshot):

  • It does not appear to do this when including one item with a Tax Code value of a whole number greater than 0%, e.g 14.5% or 15% (please see screenshot below).

I have not changed anything on the edit screens besides the tax codes selected or the quantity as mentioned.

I have debugged it down to the issue being due to something in the ‘For loops’ in the code, but I cannot figure out how to solve it and @Mabaega has suggested that it is more complicated than that and needs your attention.

Given that there are quite a few products in Zimbabwe that are zero tax rated, it is necessary to make it work with 0% as well as with the more standard 15% tax etc.

I hope I have given you what you asked for - apologies if it was a bit long-winded.

The code used for the custom theme above is as follows:

{% if business.logo != null %}{% endif %}
{{ title }}
            <table style="margin-bottom: 20px; width: 100%"><tr>
                <td style="vertical-align: top">
                    <div style="font-weight: bold">Bill To:</div>
                    <div style="font-weight: bold">{{ recipient.name }}</div>
                    <div>{{ recipient.address | newline_to_br }}</div>
                    <div>{{ recipient.identifier }}</div>
                </td>

                <td style="width: 1px; white-space: nowrap; vertical-align: top">
                    {% if business.address != null %}
                    <div style="font-weight: bold">{{ business.name }}</div>
                    <div>{{ business.address | newline_to_br }}</div>
                    {% for field in business.custom_fields %}
                    <div>{{ field.label }} {{ field.text }}</div>
                    {% endfor %}
                    {% endif %}
                </td>
                <td style="width: 100px; white-space: nowrap; vertical-align: top">
                <td style="width: 150px; white-space: nowrap; vertical-align: top">
                    <table>
                   {% for field in fields %}
                        {% assign lowercaseLabel = field.label | downcase %}
        
                        {% if lowercaseLabel == "invoice date" %}
                            {% assign updatedLabel = "Date" %}
                        {% elsif lowercaseLabel == "invoice number" %}
                            {% assign updatedLabel = "Document No." %}
                        {% elsif lowercaseLabel == "due date" %}
                            {% assign updatedLabel = "Due Date" %}
                        {% else %}
                            {% assign updatedLabel = field.label %}
                        {% endif %}

                        <tr>
                            <td><div style="font-weight: bold">{{ updatedLabel }}</div></td>
                             <td> &nbsp;:&nbsp;</td>
                            <td><div style="margin-bottom: 4px">{{ field.text }}</div></td>
                        </tr>

                    {% endfor %}
                    
                    {% if custom_fields["Customer ID."] != null %}
                    <tr >
                            <td><div style="font-weight: bold">Customer ID.</div></td>
                            <td> &nbsp;:&nbsp;</td>
                            <td><div style="margin-bottom: 4px">{{ custom_fields["Customer ID."] }}</div></td>
                        </tr>
                    {% endif %}
                    
                    </table>
                </td>

            </tr>
            </table>

            <div style="font-size: 14px; font-weight: bold; margin-bottom: 20px">{{ description }}</div>
        </td>
    </tr>
   <tr>
        {% for column in table.columns %}
            {% assign lowercaseLabel = column.label | downcase %}
            {% if lowercaseLabel == "unit price" %}
                {% assign updatedLabel = "Price" %}
            {% elsif lowercaseLabel == "qty" %}
                {% assign updatedLabel = "QTY" %}
            {% elsif lowercaseLabel == "amount" %}
                {% assign updatedLabel = "Amount(excl)" %}
            {% elsif lowercaseLabel == "tax amount" %}
                {% assign updatedLabel = "VAT" %}
            {% elsif lowercaseLabel == "tax" %}
                {% assign updatedLabel = "Tax code Column" %}
            {% elsif lowercaseLabel == "total" %}
                {% assign updatedLabel = "Amount(incl)" %}
            {% else %}
                {% assign updatedLabel = column.label %}
            {% endif %}
            {% if forloop.index0 != 4 %}
                <td style="writing-mode: horizontal-tb; border-inline-start-width: 1px; border-inline-start-style: solid; border-inline-start-color: #000; {% if forloop.last == true %} border-inline-end-width: 1px; border-inline-end-style: solid; border-inline-end-color: #000{% endif %}; text-align: {{ column.align }}; font-weight: bold; padding: 5px 10px; border-bottom-width: 1px; border-bottom-color: #000; border-top-width: 1px; border-top-color: #000; border-top-style: solid; border-bottom-style: solid{% if column.nowrap %}; width: 80px{% endif %}">
                    {{ updatedLabel }}
                </td>
            {% endif %}
        {% endfor %}
    </tr>

</thead>
<tbody>
    {% for row in table.rows %}
    <tr>
        {% for cell in row.cells %}
            {% if forloop.index0 != 4 %}
                <td style="writing-mode: horizontal-tb; border-inline-start-width: 1px; border-inline-start-style: solid; border-inline-start-color: #000; {% if forloop.last == true %} border-inline-end-width: 1px; border-inline-end-style: solid; border-inline-end-color: #000{% endif %}; padding: 5px 10px; text-align: {{ table.columns[forloop.index0].align }}; {% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ cell.text | newline_to_br }}</td>
            {% endif %}
        {% endfor %}
    </tr>
    {% endfor %}
    <tr>
    {% for column in table.columns %}
        
        {% if forloop.index0 != 4 %}
        
            <td style="writing-mode: horizontal-tb; border-inline-start-width: 1px; border-inline-start-style: solid; border-inline-start-color: #000; {% if forloop.last == true %} border-inline-end-width: 1px; border-inline-end-style: solid; border-inline-end-color: #000{% endif %}; border-bottom-width: 1px; border-bottom-color: #000000; border-bottom-style: solid">&nbsp;</td>
        {% endif %}
    {% endfor %}
    </tr>
    
    {% for total in table.totals %}
    <tr>
            {% assign lowercaseLabel = total.label | downcase %}
        
            {% if lowercaseLabel == "sub-total" %}
                {% assign updatedLabel = "Total Excl VAT" %}
            {% elsif lowercaseLabel == "vat" %}
                {% assign updatedLabel = "VAT" %}
            {% elsif lowercaseLabel == "total" %}
                {% assign updatedLabel = "TOTAL" %}
            {% else %}
                {% assign updatedLabel = total.label %}
            {% endif %}

        <td colspan="{{ table.columns | size | minus:2 }}" style="text-align: end; padding: 5px 10px{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ updatedLabel }}</td>
        <td style="border-left-width: 1px; border-left-style: solid; border-left-color: #000; border-right-width: 1px; border-right-style: solid; border-right-color: #000; text-align: right; white-space: nowrap; border-bottom-width: 1px; border-bottom-color: #000000; border-bottom-style: solid; padding: 5px 10px{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.text }}</td>
    </tr>
    {% endfor %}

    {% for field in custom_fields %}
        {% if field.label != "Customer ID." %}
            <tr>
                <td colspan="99">
                    <div style="font-weight: bold; padding-top: 20px">{{ field.label }}</div>
                    <div>{{ field.text | newline_to_br }}</div>
                </td>
            </tr>
        {% endif %}
    {% endfor %}

    <tr>
        <td colspan="99">
            {% if emphasis.text != null and emphasis.positive %}
            <div style="text-align: center; margin-top: 40px"><span style="color: #006400; border-width: 5px; border-color: #006400; border-style: solid; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div>
            {% endif %}

            {% if emphasis.text != null and emphasis.negative %}
            <div style="text-align: center; margin-top: 40px"><span style="color: #FF0000; border-width: 5px; border-color: #FF0000; border-style: solid; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div>
            {% endif %}
        </td>
    </tr>
</tbody>

@RKzw country-specific requirements are not meant to be solved by custom themes. The screenshots you have posted are confusing to me because of custom theme use.

Can we take a step back. Do not use custom themes. Show the invoice examples without custom themes and let’s figure out from there what’s needed.

@lubos yes, of course to taking a step back - absolutely!

I’m actually very relieved to hear you say that “country-specific requirements are not meant to be solved by custom themes” because of course they are an obsolete feature and could be phased out.

So, now moving forward - sorry to seem a bit obtuse - but how would you like me to show the invoice example?

Use the default theme, so in edit screen of invoice deselect the use of custom theme.

Is there an official tax authority link or document which specifies what is and what is not required to interface to your tax authority? Information passed from person to person can introduce distortions.

@lubos These are the sample template examples and criteria we’ve been given to adhere to. Please see attached images and pdf files. We have been told to submit our templates for approval once they fit the criteria.

[THINGS REQUIRED ON AN INVOICE - TEMPLATES Rank you so much for looking at this issue - if this can be resolved, it should solve the issue for at least all Zimbabwean companies using Manager. Manager is a fantastic programme and incredibly versatile. I am thoroughly enjoying using it.

I can not understand why a template would wrongly spell Fiscal, in your screenshots it says Fical. Is this genuine?

@RKzw, I deleted PDF links. They are security risks for other users. Either post images or URLs for source documents.

It most certainly is. I had to wait 2 hours in their offices on Saturday morning to get the soft copy documents sent to me, because up until that point, I only had hard copies.

That’s one example of the ridiculousness we deal with here. The bureaucracy insists that our templates are ‘perfect’ and yet they don’t even spell check their samples.

Ok noted, sorry about that. I’ll put them up as URLs

Thank you for your assistance and input over this very frustrating issue.

  1. I did respond to the question from Patch - I replied and I sent the sample images. I had also uploaded pdf documents but as these are considered a security risk, they have been removed.
    We have not been provided these documents online so there is no way to send a URL for them. I have been trying to get access to them as such, but the tax authority has simply referred me back to the pdf documents, image files and this link which is not in much depth.
    Zimbabwe Revenue Authority (zimra.co.zw)

Regarding your points 2, 3, 4 and 5: I have indeed been trying to use custom themes, and have been in contact with Mabaega directly since the beginning of March (@Mabaega has been a great help), as well as a local programmer over this issue.

Regardless of that, @lubos very specifically said above in this thread that:

I haven’t tried your code yet because of lubos’ above comment, but will do today - thank you. As I understand it, custom themes are an obsolete feature and going to be phased out eventually.

I am waiting to hear back from @lubos over this issue,

Finally! I have just been sent URL links to some sample documents:
@Patch @Mark

A URL sample invoice

Sample_Template_Exclusive_1_.pdf (mcusercontent.com)

A URL to a sample credit note

Sample_Credit_Note_Exclusive_1_.pdf (mcusercontent.com)

Official tax authority documentation of the requirements are the valuable links

1 Like

I still don’t understand what an invoice should look like.
The theme that I have created should be able to display invoices like in the example you show from the link.

My previous code only worked for one condition, where the item on the invoice had a Tax Amount. If the item in the invoice does not have a tax amount, such as for an item with 0% Vat, the item is exempt, the theme cannot work properly.

This example should be similar to the invoice you sent previously.

I also see, there is Vat 9% in your country.
How the Invoice should look like. are like this?

https://www.zimra.co.zw/downloads/category/9-domestic-taxes?download=3807:fiscalisation-api-documentation

There is an official api for the local tax system on this thread Invoice Label Changes - Manager Forum

In fact I have seen that it is where the 2 screenshots I sent previously (with the ‘Fical’ typo!) originate from.

I cannot post it on here as the api is in pdf format.

Hi @Mabaega

We tend to use 0% and 15% VAT tax here.

With the custom theme we were working through together, I was advised that the result was almost perfect for submission, except for the tax code issue and the table ‘breaking’ when a 0% tax code was used.

These links (they say pdf in the name but are weblinks) give an idea of what is required:

Sample_Template_Exclusive_1_.pdf (mcusercontent.com)

Sample_Credit_Note_Exclusive_1_.pdf (mcusercontent.com)