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
@label
for 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