for each="party, letter in letters.items()"
replace text:p="set_lang(party.lang)"
if test="party.addresses"
for each="line in party.address_get().full_address.splitlines()"
line
/for
/if
Reminder Notice
Date: format_date(today, party.lang)
if test="letter.fees"
Fees: ', '.join(format_currency(amount, party.lang, cur) for cur, amount in letter.fees.items())
/if
Description	Reference	Date	Amount	Due Date
for each="dunning in letter.dunnings"
dunning.line.description if dunning.line else ''	dunning.line.origin_rec_name	format_date(dunning.line.date, party.lang) if dunning.line else ''	format_currency(dunning.amount_second_currency, party.lang, dunning.second_currency) if dunning.amount_second_currency else ''	format_date(dunning.maturity_date, party.lang) if dunning.maturity_date else ''
/for
if test="letter.payments"
Pending Payments Received
Date	Amount
for each="payment in letter.payments"
format_date(payment.date, party.lang)	format_currency(get_payment_amount(payment), party.lang, get_payment_currency(payment))
/for
/if
/for
if test="company and company.header"
for each="line in company.header_used.split('\n')"
line
/for
/if
choose
when test="company and company.logo"
/when
when test="company"
company.rec_name
/choose
if test="company and company.footer"
for each="line in company.footer_used.split('\n')"