Print format - Payment entries

Hey there!

we are trying to implement the paid tax for multiple payment entries (advance payments) on a print format of a sales invoice.
Our latest try with following code resulted in empty fields.

        <td style="width: 10%;">{{ row.get_formatted("total_taxes_and_charges", doc.payment_entry) }}</td>

Maybe someone got an idea how we could solve that problem?

On a side note:
Could anyone tell me where we can edit the generated reference in those payment entries?
Amount EUR – received from —
Transaction reference no – dated 2021-09-20
Amount EUR – against Sales Invoice —

Thank you in advance!