I want to show different bank accounts in invoice PDF depending on the invoice currency (amountCurrency). Example:
I tried directly in the template:
{{#if (eq amountCurrency "PLN")}}
Konto [PLN]: xxxxxxxxxx
{{else}}
Konto [EUR]: xxxxxxxxxx
{{/if}}
Also tried with nested {{#if}} blocks and with a formula:
if (amountCurrency == 'PLN') {
cBankAccount = 'xxxxxxxxxx';
} else {
cBankAccount = 'xxxxxxxxxx';
}
But none of these worked - in PDF it either shows both accounts, or the field stays empty.What is the correct way to make conditions based on amountCurrency in PDF templates (or via formula)?
- if currency = PLN → show PLN account
- if currency = EUR → show EUR account
I tried directly in the template:
{{#if (eq amountCurrency "PLN")}}
Konto [PLN]: xxxxxxxxxx
{{else}}
Konto [EUR]: xxxxxxxxxx
{{/if}}
Also tried with nested {{#if}} blocks and with a formula:
if (amountCurrency == 'PLN') {
cBankAccount = 'xxxxxxxxxx';
} else {
cBankAccount = 'xxxxxxxxxx';
}
But none of these worked - in PDF it either shows both accounts, or the field stays empty.What is the correct way to make conditions based on amountCurrency in PDF templates (or via formula)?
Comment