Invoice and Taxes - small piece of code that does not work (!?)


I am rebuilding the invoice and am getting on quite good.
There is however a small piece of code in the standard template InvoicePlane.php which I would like to work but does not work. In the printout of all available fields I cannot find the ones used here.
A summ for each taxrate in the invoice should be listed, is this the piece fo code that should do it?


    <?php foreach ($invoice_tax_rates as $invoice_tax_rate) : ?>
            <td <?php echo($show_item_discounts ? 'colspan="4"' : 'colspan="3"'); ?> class="text-right">
                <?php echo htmlsc($invoice_tax_rate->invoice_tax_rate_name) . ' (' . format_amount($invoice_tax_rate->invoice_tax_rate_percent) . '%)'; ?>
            <td class="text-right">
                <?php echo format_currency($invoice_tax_rate->invoice_tax_rate_amount); ?>
    <?php endforeach ?>