Email Variables not resolving

Having an issue with some variables being shown as $xxxx in the emails.

Initially I thought this may have been the 2nd one in each line causing issues, but I’ve tried separating them into different paragraphs and still have the same issue.
The variables are being created by clicking the variable links in Settings > Templates and Reminders > Edit.
The variables appear correctly in the preview for each template, but not in the sent emails.

Any ideas?

Edit: This is in the partial payment and full payment email. The correct $balance_due value is shown in the invoice pdf.
Will test further.
Hosting is on Unraid / Docker


@david @ben any thoughts?

The issue here is in the payment, you only have a reference to the client balance, not the invoice balance.

This is because some payments can be made without an invoice present or even with multiple invoices present,

Hi there,
Thanks for getting back to me.
Still al little confused, though.

Is there a list of email variables somewhere?
I’ve been using the ones presented in the list below the editor window and they work as expected in teh preview windows, just not in the emails that are sent.
I was trying the pdf variables shown here: Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja but they seem not to work either…
Using $invoice.balance_due but that we rendered as “Invoice #21-0021.balance_due” in the email.

The code from the editor is:

<p>Dear $contact.first_name,</p>
<p>Thank you for your payment of $amount on $date </p>
<p>This has been credited against invoice number $number and the remaining balance is $balance </p>
<div class="center">$view_link</div>

This is where we generate the payment variables

Of interest, you may want to use the following:

$invoices - a list showing $invoice.number and $invoice.amount
$invoice_references - a list showing $invoice.po_number $invoice.number $invoice.amount $invoice.balance
$invoice - a list of invoice.numbers this payment applies to

Thanks David.

I’ve managed to get the payment date working using $ but still struggling with the invoice balance.
I could see the kays and values show up using $invoice_references but $invoice.balance still shows as “Invoice #21-0021.balance” in the email.

Is there something going strange with my setup? Surely this should be achievable using the variables presented under the editor?