Added ability to use merge tags in footers

The latest version (24.4.1) adds ability to use merge tags in footers.

When you are in Edit screen of footer, you will see list of available merge tags in the bottom:

For example, here are the merge tags for sales invoices:

image

You can use any of these merge tags in your footer. For example:

image

When this footer is used on the invoice, you will see:

Footers also support custom fields which allow you to display contents of custom fields your own way.

Merge tags for custom fields have slightly different format:

image

But they work the same way and the main benefit is that now you can show contents of your custom fields in more compact way.

7 Likes


Footers span is reduced. Is this a bug or its going to be like this from now on?

looks good here.

There is one problem, how to display the image?

Yes somewhat fixed in new version 1388. Still text align etc is not working.

After the recent changes in the footer,
my this footer:


become like this:

I tried to bring apart by editing the html, but no success

@Shan can you share your HTML?

looks like @Shan Added ability to use merge tags in footers - #5 by Shan and @shahabb Added ability to use merge tags in footers - #2 by shahabb are showing the same unexpected behaviour.

<table style="width:100%">
  <tr>
    <td style="text-align: left;"><div style="position:relative;text-align:center;border-bottom:1px solid black; width:150px; height:100px; ">
      <div style="position: absolute; bottom: -20%;right:0; left:0;"><i>Received by</i></div>
    </div></td>
    <td style="text-align: center;"><div style="position:relative;text-align:center;border-bottom:1px solid black; width:150px; margin: auto; height:100px; ">
      <div style="position: absolute; bottom: -20%;right:0; left:0;"><i>Prepared by</i></div>
    </div></td>
    <td style="text-align: right;"><div style="position:relative;text-align:center;border-bottom:1px solid black; width:150px; float:right; height:100px; ">
      <div style="position: absolute; bottom: -20%;right:0; left:0;"><i>Approved by</i></div>
    </div></td>
  </tr>
</table>

Just now I tried this one too, but the result is same:

<div style="display: flex; justify-content: space-between; width: 100%;">
    <div style="text-align: left; flex: 1;"><div style="position:relative;text-align:center;border-bottom:1px solid black; width:150px; height:100px; ">
      <div style="position: absolute; bottom: -20%;right:0; left:0;"><i>Received by</i></div>
    </div></div>
    <div style="text-align: center; flex: 1;"><div style="position:relative;text-align:center;border-bottom:1px solid black; width:150px; margin: auto; height:100px; ">
      <div style="position: absolute; bottom: -20%;right:0; left:0;"><i>Prepared by</i></div>
    </div></div>
    <div style="text-align: right; flex: 1;"><div style="position:relative;text-align:center;border-bottom:1px solid black; width:150px; float:right; height:100px; ">
      <div style="position: absolute; bottom: -20%;right:0; left:0;"><i>Approved by</i></div>
    </div></div>
</div>

Temporally solved by adding some padding on the left for center and right s

1 Like

this code work fine here

I also tried it on a custom theme, results looked good.

I have the same issue here

Yes, that works.
thanks

@shan you are right, the results I got from your code were good because I had another <div> element above your code.

Update :

@lubos, I see the footer problem is caused by this element:

<div class="prose max-w-max text-black prose-hr:hidden" style="font-size: 12px">
...footer code...
</div>

The footer appears as it should if I remove class="prose max-w-max text-black prose-hr:hidden"

1 Like