How to display names of the fields in invoice for company details?

Hello everybody,

Is it possible to display/show names of the fields in invoice for company details?

The all invoice templates are showing just like numbers without saying which is which for example:
“ID number” as 123456
“VAT number” as DE123456

Is there a setting that can be enabled to show “full” meaning as shown bellow(or simillar)?:
“ID number” as ID: 123456
“VAT number” as VAT: DE123456

2023-05-28 23_57_33-Invoice Ninja

Or I have to deal with this manually with the creation of my own invoice design in HTML/CSS for this “feature”.

Thanks. !

Hi,

@david what’s the best option for this?

Not currently supported, sorry.

Thanks for the answer. I’ll do it as a custom template for now. Maybe later when i have more time (i will be bored) I will look at the code itself if I can do something :slight_smile:

1 Like

That would be awesome!

FYI… the way we handle this in v4 is that we check if a custom label has been configured for the field, if it has we prepend it to the value on the PDF.

Hello!
I have the exact same need, is there a simple way to do this with v5?
I am using 5.11.x self-hosted, I checked templating I could not find a way outside of changing the PHP source code in app/Services/PdfMaker/Design.php.
David

Currently, there might not be a direct setting for this, but customizing the invoice template using HTML/CSS could be the best workaround. You can manually add labels like “ID:” and “VAT:” within the template code to ensure clarity. Hopefully, a future update will include a built-in option for this! Has anyone else found an alternative way to handle this? Let’s share insights!

The whole block is generated by PHP code, I didn’t manage to make this work (side note: I am pretty bad with CSS).

wich template do you use?

I am using the “Modern” template

You can make your own Design based on modern template.
After that, you can edit the header-Section like this…

<div id="header">
  <div id="company-name-wrapper">
    <h1 class="company-name">$company.name</h1>
  </div>
  <div id="entity-details-wrapper">
    <table id="entity-details" cellspacing="0" cellpadding="0" dir="$dir">
    <tr><th data-ref="client_details-client.vat_number-label">Kunden-USt.-ID</th><th data-ref="client_details-client.vat_number">$client.vat_number</th></tr>
    <tr><th data-ref="client_details-client.number-label">ID</th><th data-ref="client_details-client.number">$client.number</th></tr>
    </table>
  </div>
</div>

if you like to have this information in the customer block, you can add this same way in the body section (id=“client-details”). Then you must remove this items from the content of the invoice Desing to prevent duplicate display.
Find under Settings - Invoice Desing - Company

1 Like