If your NetSuite account uses OneWorld, you likely deal with multiple subsidiaries, currencies, and tax regulations. Advanced PDF allows you to customize templates so each subsidiary shows the correct branding, bank details, tax IDs, and currency formatting.
This page covers how to dynamically adjust your PDFs for multi-subsidiary and multi-currency environments.
πΉ Showing Different Subsidiary Logos
<#if record.subsidiary == "1">
<img src="https://system.netsuite.com/core/media/media.nl?id=1234&c=TSTDRV12345&h=abc12345" width="200"/>
<#elseif record.subsidiary == "2">
<img src="https://system.netsuite.com/core/media/media.nl?id=5678&c=TSTDRV12345&h=xyz98765" width="200"/>
<#else>
<img src="${record.logo}" width="200"/>
</#if>
βοΈ Each subsidiary uses a different File Cabinet logo.
βοΈ Defaults to ${record.logo} if no match.
πΉ Displaying Subsidiary Tax Information
<#if record.subsidiary == "1">
<p>VAT: GB123456789</p>
<#elseif record.subsidiary == "2">
<p>GST/HST: 789456123RT0001</p>
<#else>
<p>Tax ID: ${record.custbody_tax_id!"Not Available"}</p>
</#if>
βοΈ Each subsidiary can show a unique tax ID.
πΉ Multi-Currency Formatting
Use FreeMarkerβs ?string to format amounts:
<p>Total: ${record.total?string["#,##0.00"]} ${record.currency}</p>
βοΈ Displays both number formatting and currency code.
For currency symbols:
<#switch record.currency>
<#case "USD">
<p>Total: $${record.total?string["#,##0.00"]}</p>
<#break>
<#case "EUR">
<p>Total: β¬${record.total?string["#,##0.00"]}</p>
<#break>
<#default>
<p>Total: ${record.total?string["#,##0.00"]} ${record.currency}</p>
</#switch>
βοΈ Dynamically inserts symbols for USD, EUR, etc.
πΉ Example: Subsidiary-Specific Bank Details
<#switch record.subsidiary>
<#case "1">
<p>Bank: HSBC London</p>
<p>IBAN: GB29 NWBK 6016 1331 9268 19</p>
<#break>
<#case "2">
<p>Bank: RBC Toronto</p>
<p>Transit: 12345</p>
<#break>
<#default>
<p>Bank: Default Account</p>
</#switch>
βοΈ Ensures customers receive correct payment instructions.
πΉ Combining Multi-Subsidiary + Multi-Currency
<p><b>Invoice #: ${record.tranid}</b></p>
<p>Date: ${record.trandate?string("dd-MMM-yyyy")}</p>
<p>Subsidiary: ${record.subsidiary@label}</p>
<p>Total Due:
<#if record.currency == "USD">
$${record.total?string["#,##0.00"]}
<#elseif record.currency == "CAD">
C$${record.total?string["#,##0.00"]}
<#else>
${record.total?string["#,##0.00"]} ${record.currency}
</#if>
</p>
βοΈ Prints subsidiary name (label) + correctly formatted currency.
β Best Practices
- Always use
@labelfor subsidiaries β${record.subsidiary@label} - Keep logos and bank info in File Cabinet with naming conventions (e.g.,
logo_sub1.png,logo_sub2.png). - Use
<#switch>for currencies rather than multiple<#if>conditions. - Test with sample records per subsidiary and currency.
β Summary β What You Learned
By the end of this page, you know how to:
- β Dynamically show subsidiary-specific logos.
- β Insert tax IDs per subsidiary.
- β Format totals with currency codes and symbols.
- β Display bank/payment details by subsidiary.
- β Combine logic to handle both subsidiary and currency rules.
This sets you up for the next page: Styling with CSS, where youβll learn how to make your PDFs modern, clean, and professional.
Leave a Reply