Hide a field on print or pdf output

how to hide a field on printed or pdf output. i.e i want for some reasons that withholding tax field should be on system but not to be shown on printed or pdf output any suggestion?

There is no way to hide any portion of what shows on the view screen on the output.

Why would you want to? If you hide the withholding tax information on a sales invoice, your customer will not know the tax must be withheld. And the sales invoice will be incorrect. The customer will overpay you, not pay the government, and you will not have fulfilled your obligations under law.

If the information is hidden on a purchase invoice, you would be hiding information from yourself to no purpose.

all of the customers in pakistan knows that they have to withheld a uniform percentage of invoice. but sorry to say people here in government are very dumb this printed amount confuses them and they ask us to remove this amount. we tried many times to convice them but they reject our invoice thus creating delay of times of usnthat is why we want that our system should calculate all withholdings for our reference but it should not be printed on pdf or printed output currently we are manually editing all pdf’s of invoices but in long run it is not viable solution as it will create additional jobs in our workflow

now when we are in process of making manager centralized solution in our company by buying server version instead of single use so we need modification or function needed to be added to cater our problems.

I suspect that if you remove it, they will find something else to delay the payment

1 Like

it is always the way for them but from our side we need to make it sure

apparently i have found the some way to hide info by editing the theme but that is not reliable as it is not flexible also by doing that hidden data also not shown on view screen. i think print and pdf button action needs to edit so that we can see data on view screen but not shown on printed documents. every other solution i.e quickbooks have these kind of options. but i love manager for its simplicity.

finally resolve the error cosmetically by adding this code to theme
{% for total in table.totals %}

{% unless total.label == “Less: Withholding tax 4.5%” -%}{% unless total.label == “Balance due” -%}{{ total.label }}{% endunless %}{% endunless %}

{% unless total.label == "Less: Withholding tax 4.5%" -%}{% unless total.label == "Balance due" -%}{{ total.text }}{% endunless %}{% endunless %} {% endfor %}
 {% for total in table.totals %}
        <tr>
            <td colspan="{{ table.columns | size | minus:1 }}" style="padding: 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold; font-size: 16px{% endif %}">{% unless total.label == "Less: Withholding tax 4.5%" -%}{% unless total.label == "Balance due" -%}{{ total.label }}{% endunless %}{% endunless %}
</td>
            <td style="border-bottom-width: 1px; border-color: #DBDBDB; white-space: nowrap; padding: 10px; padding-left: 30px; text-align: right; padding-right: 30px{% if total.emphasis == true %}; font-weight: bold; color: #ffffff; background-color: #184551; font-size: 16px{% endif %}{% if total.label =="Less: Withholding tax 4.5%" -%}; border-bottom-width: 0px; color: #ffffff; background-color: #ffffff; font-size: 0px{% endif %}{% if total.label =="Balance due" -%}; border-bottom-width: 0px; color: #ffffff; background-color: #ffffff; font-size: 0px{% endif %}">{% unless total.label == "Less: Withholding tax 4.5%" -%}{% unless total.label == "Balance due" -%}{{ total.text }}{% endunless %}{% endunless %}</td>
        </tr>
        {% endfor %}

There is no error to resolve. All you are doing is hiding essential information, a very poor accounting practice.

my bad it was not error but requirement according to my country’s bureaucracy.

It is still bad accounting practice. You should not hope for Manager to be modified to support hiding information with accounting implications. Withholding tax affects the balance due on an invoice. Excluding that information corrupts the record.

no thats the case my modification just hides it on printed documents but at backend all information is stored correctly for our records

But when your authority asks for printed confirmation of a transaction in question, you will be providing corrupted information.

no we can provide withholding tax report filtered by customer for that purpose

And where do you think you will get that report? No such report exists in Manager. Besides, when they want to confirm one transaction, your printed transaction form will be wrong.

@uzair94, of the many, many users in Pakistan, you are the only one who has ever requested this. Whether customers know they must withhold tax or not, the printed invoice should match the accounting. Do not expect an accounting program to be modified to match what you say is ignorance of government personnel.

no i didnot means that that why iam making change on my own sir. and after some thinking iam also coming to same conclusion that it should be contained in the invoice

Hi! I agree with your cosmetic solution. I inserted the code at the end of the custom theme (“Invoice with Line number” before and also after and before . Also tried changing 4.5% to 10% which is the case for me. None of these worked. If at all the Witholding tax stays, I would like to rename it as TDS in the invoice. Is it possible?