kimai / Paid-plugins

Support for paid Kimai plugins: Discussions and feature requests
https://www.kimai.org/store/
11 stars 1 forks source link

Access to META-Fields in Invoices / pdf.twig #82

Closed wobouser closed 1 year ago

wobouser commented 1 year ago

Hi,

Kimai: 2.0.26 PHP-Version: 8.1.20 OS: Debian 10 / OnPrem Plugins: Invoicing enhanced 2.0.3

my old pdf.twig for invoices (from Kimai 1.30.11) wont work anymore with META-fields in Kimai 2.0.26

old way: Definiton {% set metaDummy = entry.getMetaFieldValue('dummy_field') %}

Output: {% if metaDummy is not null %} {{ metaDummy }} {% endif %}

Error: image

from -> https://www.kimai.org/documentation/invoices.html#twig-templates

{% if line['entry.meta.dummy_field'] is defined %} Foo: {{ line['entry.meta.dummy_field'] }} {% endif %}

the output is empty.

where is my mistake ?

kevinpapst commented 1 year ago

I need to see at least the entire loop over all invoice rows. It looks okay to me at the first glance.

Please install the debug template: copy & paste from the docs at: https://www.kimai.org/documentation/invoices.html#twig-templates And check the output.

wobouser commented 1 year ago

has helped :-) thank you.

ticket can be closed ^^