Conditional display of bank account depending on currency

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 5k18a
    Junior Member
    • Jul 2025
    • 25

    #1

    Conditional display of bank account depending on currency

    I want to show different bank accounts in invoice PDF depending on the invoice currency (amountCurrency). Example:
    • 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)?
Working...