Invoice Design - Edit sections

Hi there,

i want to customise my invoice design to match my latest design from Lexware. Based on DIN5008 Normbrief…
So i understood, that i can customize the appearance of the sections by css or putting the sections to other locations.
But the html layout of the sections themself (id=“company-details”, id=“company-address”, id=“product-table” …) is not editable from the front end.
Where are these ids defined? Probably if i would change then, they would be applied to all orginizations?
If i would customize the html of this ids, would they be update resistent or would my work always be overwritten?
Is there further info to find on this toppic?
The code editor of the invoice designer has the problem, that the mouse pointer does not set the cursor to the clicked position. It is positioned to or more line above. If i select text, text from another positionen gets selected. Not usable, i have to backspace to see where text dissapears.

Ok the sections are functions defined in ./app/Services/PdfMaker/Design.php
I defined a new function returnAdress() which delivers a section which i bound to the content by <div id="return-address"></div>

These functions are the dataproviders which are used in all design templates, so if i make changes, it has effect in all templates and all organizations. As all my companies use a german letter layout, this is acceptable.
Furthermore probably a git pull overwrites the changes or prints an error about local changes.

As i am a software developer, i had no problem in understanding the method of operation, but php is not a language i am used to. Maybe i call a php-developer for help.

If there are some tips like building own design templates, that would be interessting. Saw the examples in ./tests/Feature/PdfMaker/ but had no idea how to implement a new design to the existing installation…

The design code editor acts strange to mouse/keyboard inputs!

Hey there :wave:

At the moment IDs are hardcoded, you can find a list of them here:

Can you post an example of your customization, maybe it doesn’t need a total major change to get what you want?

All right, I see your example.

Can I know what’s example value of #return-address div?

I will upload an example invoice later. The bold template is a good starting point.
The address field needs in first line the return address in one small line.
The client-details in the addressfield should not list vat id or account nr.
The product-table should list product and note in one wider column, as texts are mostly longer.
Product in first line bold and notes in normal below.
Company info, ceo, vat id, tax id, register court, bank account info in four blocks on the footer of the first page. Could also be an footer-image
So nothing special, but some tweeks needed.

As in Germany every aspect of making moneys is heavily overregulated by law a tax compliant template could expand your possibilities for german users.

company name, street, house number, zip, city
Client company name
contact name
street, number

zip, location

first line is the return address.
Normaly invoices are folded two times and put in evelopes with a adress viewing window.
The return address is 5,5cm from the top, that the address is seen through this window. DIN5008

Okay, so, here’s my question.

Can’t you edit of one of the stock templates and add #return-address. Inside it, just put your details? As far as I know, all variables are available to you, so you should be able to do something like:

<div id="return-address">

At the moment, we don’t have a list of all variables (we’re working on docs), but you can find them here:

@hillel is there something we can do about shaky design code editor?

Which OS are you using, the desktop app should work better.

Also please check you’re using the latest v5, we made some recent changes related to keyboard/mouse input.

I am using v5.0.43-C37 with firefox on linux mint and on win10, both have this strange behaviour.
There is no Problem with Edge on win10, so it seems to be only a problem with FireFox.

I tried already the desktop app in mint. There was an error regarding selfsigned certificate so i configured certbot to deploy letsencrypt certs to the nginx. This error was gone, but after logging in, the window was empty. I did not tried to work on this.

The empty screen may be caused if you aren’t using the app in English, it should be fixed with the next Linux build.

At Invoice Design, eg. Product Column the order of fields should be modifieable by drag´n´drop at the icon in front of the fieldname? This does not work. I removed all columns and added them in the right order.

If i define a custom field 1 at company. That should be listed in the #company-address if i define at Invoice Design / Company Address the Custom 1 field. But on the invoice it prints $company.custom1
not my custom value!

If i define a custom field of type Multi-Line how to get to the second line? Enter, Alt+Enter, Shift+Enter does not create a line break.

Hmmm… issues 1 and 3 should be fixed, which version is this in?

I updated to v5.0.44-C37 (Edge 87, Firefox 84), but drag´n´drop the columns is not possible. Dragging the Page left/right is possible.

Entering a linebreak in multi-column custom fields does not work.

Here some variables, that are not filled in invoice editor: $company.custom1, $company.custom2, $public_notes, $user.first_name, $user.last_name

Do you see the problems in the demo?

@ben any thoughts on the fields?

Thanks for reporting an issue with custom fields. Can you give me exact steps so I can try to replicate this!

Thank you.

  1. Not possible to Enter a Linebreak in Multi-line text

  2. Custom field not shown in invoice

For #1 I’ve tried testing this, when setting a custom company field I expect there to be custom fields on the company details page but they aren’t there. I’ll need to look into it.

I see the problem, custom company fields aren’t shown. We’ll include a fix with the next release.