How to change invoice column names

But they are treating us like we don’t know what we are asking for. 5 days no clear answer.

You didnt check. And if they gave you why do you insist on zimra link when you had got the question and invoices

I think you have received several clear answers. In post #30 above, @eko said:

In post #38 above I provided a link to another topic in which I shared the code I used in a custom theme to change the column headers.

In post #43 above @Mabaega shared a custom theme that they created to match the sample invoice.

As a fellow Zimbabwean trying to achieve the same things you are, I am also frustrated. But my frustrations at this point are with Zimra and Axis Solutions, not Manager, @lubos, or any of the forum users.

The only guidance I have been able to find from Zimra about the specific requirements for the invoices is:

  1. All registered operators with Points of Sale Systems operating on centralized server/data storage facilities with ICT capability to develop APIs, has an option to utilize the virtual fiscalisation platform through direct interface with the ZIMRA FDMS system using APIs for server-to-server integrations as a way of complying with fiscalisation requirements
  2. All Point of Sale (POS) Systems should be installed with upgraded approved Fiscal Devices or
    Virtual Applications which are compatible with FDMS systems, with ability to print Fiscal Tax
    Invoice/Receipt/Debit/Credit Notes:
    a) Bearing all the features required by the legislation (Section 20/21 of the VAT Act) including TIN and VAT numbers generated from TaRMS for both the buyer and the seller
    b) Verifiable using QR Codes and Authentication Codes generated from FDMS
    c) With transaction and tax totals rounded to two (2) decimal places
    d) Brief explanation of the circumstances giving rise to the issuing of the credit note
  3. Registered Operators are advised that compliance with FDMS will be one of the requirements in
    issuance of Tax Clearance Certificates (ITF263), effective 1 January 2024

The above is taken from Public Notice 92 of 2023 Compliance with Fiscalisation Data Management System [FDMS], available to download as PDF from https://www.zimra.co.zw/public-notices.

The template that you (and I) have received from Axis Solutions is their way of implementing the requirements set out by Zimra. Another service provider may have created different invoices that also meet Zimra’s rather opaque requirements, so I don’t think we can expect @lubos to make changes to Manager just to satisfy Axis Solutions. We don’t know, for example, that Zimra requires specific column headers. We do know that they require “transaction and tax totals rounded to two (2) decimal places”. Manager already allows for this. But the column headers may just be Axis Solutions’ choice of words.

As I mentioned in my first post above, I am still awaiting feedback from Axis Solutions on the sample invoices I sent to them. I may be proven wrong about some of what I have said. But my experience with Axis Solutions and our fiscal device so far makes me think that Axis is quite capable of “training” their software to work with various data formats that don’t exactly match the template and wording that they have provided, although you may struggle to get that concession from the technical assistant you are dealing with.

However, I hope that we have shown here and in my related topic that users of Manager in Zimbabwe do at least need a way to keep column headers consistent. Until that is possible, we are dependant on a custom theme to make our invoices compliant with our fiscal device. And if we are using custom themes, then you have been shown two solutions above to your question that started this whole discussion about how to edit the column names.

6 Likes

This code has helped. thanks everyone who tried to help

@Mabaega one remaining this is where it says invoice number, it should say “document number”. crazy minor requirements. can you help here?

<table style="padding: 30px; width: 100%">
    <thead>
        <tr>
            <td colspan="99">
                <table style="margin-bottom: 20px; width: 100%"><tr>
                    <td style="font-weight: bold; font-size: 32px; vertical-align: top">{{ title }}</td>
                    {% if business.logo != null %}<td style="text-align: end"><img src="{{ business.logo }}" style="max-height: 150px; max-width: 300px; display: inline" /></td>{% endif %}
                </tr></table>
                
                <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="text-align: end; vertical-align: top">
                       
                        {% 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 %}
                            
                        
                        <div style="font-weight: bold">{{ updatedLabel }}</div>
                        <div style="margin-bottom: 4px">{{ field.text }}</div>
                        {% endfor %}
                        
                        {% for field in custom_fields %}
                            {% if field.label == "Customer ID." %}
                            <div style="font-weight: bold">{{ field.label }}</div>
                            <div style="margin-bottom: 4px">{{  field.text | newline_to_br }}</div>
                            {% endif %}
                        {% endfor %}
        
                    </td>
                    {% if business.address != null %}
                    <td style="width: 20px"></td>
                    <td style="width: 1px; border-left-width: 1px; border-left-color: #000; border-left-style: solid"></td>
                    <td style="width: 20px"></td>
                    <td style="width: 1px; white-space: nowrap; vertical-align: top">
                        <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 %}
                    </td>
                    {% endif %}
                </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 == "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 TOTAL" %}
                {% elsif lowercaseLabel == "total" %}
                    {% assign updatedLabel = "TOTAL (incl) VAT USD" %}
                {% 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>
</table>
1 Like

@Mabaega …Thank you so much for the code. I have, however, been struggling to implement the code. Guides on this are no longer available. Please assist.