Script to hide specific totals with one design


I’m wondering of someone could offer me some help.
I would like to work with one design for invoice and quote, like i was doing in V4.
V4 automatically hides “totals_table-paid_to_date-label” & =“totals_table-paid_to_date” for quotes.
v5 apparently doesn’t do that by itself.

I would like to add a script in the footer tab with some logic: if $entity_label = Quote then hide [data-ref=“totals_table-paid_to_date”] & [data-ref=“totals_table-paid_to_date-label”]

But how do i make this work?

I asked this to invoiceninja via mail but the answer was:

This may be possible, in the footer tab there is a script tab there where you may be able to add this logic. I would not be sure the exact code required for this however.



@david should this be adjusted?


The suggested path here would be to create a custom design for the quotes, however, injecting some javascript could be used here to hide this label also depending on the entity type.


We’ll remove this from quotes by default, so there will be nothing required for you to do on your side. This will be available in the next release which will be in a weeks time.


Awesome! Thanks!

Just saw this too:

On the invoice the prepayment that is needed is filled with grey background:

I use the same design for the quote and there the prepayment (in dutch that is ‘voorschot’) that is needed is not with gray background: