In Advanced PDF customization, we have certain amount fields where we have to print the currency symbol along with it. But while fetching from the field the currency symbol will be missing. So we should give the currency symbols used by them as dynamically.We have to use the following code
<#assign currencySymbol = {“USD”:”$”, “EUR”:”€”, “GBP”:”£”, “CAD”:”$”}>
<#assign currentCurrency = record.currency.symbol?string>
${currencySymbol[currentCurrency]}${apply.disc?string(“,##0.00;(##0.00))”)}
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>
<link name="NotoSans" type="font" subtype="truetype" src="${nsfont.NotoSans_Regular}" src-bold="${nsfont.NotoSans_Bold}" src-italic="${nsfont.NotoSans_Italic}" src-bolditalic="${nsfont.NotoSans_BoldItalic}" bytes="2" />
<#if .locale == "zh_CN">
<link name="NotoSansCJKsc" type="font" subtype="opentype" src="${nsfont.NotoSansCJKsc_Regular}" src-bold="${nsfont.NotoSansCJKsc_Bold}" bytes="2" />
<#elseif .locale == "zh_TW">
<link name="NotoSansCJKtc" type="font" subtype="opentype" src="${nsfont.NotoSansCJKtc_Regular}" src-bold="${nsfont.NotoSansCJKtc_Bold}" bytes="2" />
<#elseif .locale == "ja_JP">
<link name="NotoSansCJKjp" type="font" subtype="opentype" src="${nsfont.NotoSansCJKjp_Regular}" src-bold="${nsfont.NotoSansCJKjp_Bold}" bytes="2" />
<#elseif .locale == "ko_KR">
<link name="NotoSansCJKkr" type="font" subtype="opentype" src="${nsfont.NotoSansCJKkr_Regular}" src-bold="${nsfont.NotoSansCJKkr_Bold}" bytes="2" />
<#elseif .locale == "th_TH">
<link name="NotoSansThai" type="font" subtype="opentype" src="${nsfont.NotoSansThai_Regular}" src-bold="${nsfont.NotoSansThai_Bold}" bytes="2" />
</#if>
<macrolist>
<macro id="nlheader">
<table class="header" style="width: 100%;"><tr>
<td rowspan="5" style="width: 460px; height: 102px;vertical-align: top;"><#if companyInformation.logoUrl?length != 0><img src="https://4071463.app.netsuite.com/core/media/media.nl?id=115&c=4071463&h=5BCaIbVmBVvYwlftkE2ZHfeVMV17754z0FMkc2gL3O_jL-Wf&fcts=20200325100811&whence=" style="float: left; margin: 7px; height: 60px; width: 350px;" /> </#if> <!--<span class="nameandaddress">${companyInformation.companyName}</span><br /><span class="nameandaddress">${companyInformation.addressText}</span>--></td>
<td align="left" style="width: 334px;vertical-align: bottom;"><span class="title"><b>Payment Receipt</b></span></td>
</tr>
<tr>
<td align="left" style="width: 344px; height: 7px;"> </td>
</tr>
<tr>
<td align="left" style="width: 344px; height: 14px;">
<p><b>Date </b>${record.trandate}</p>
</td>
</tr></table>
</macro>
<macro id="nlfooter">
<table class="footer" style="width: 100%;"><tr>
<td align="right"><pagenumber/> of <totalpages/></td>
</tr></table>
</macro>
</macrolist>
<style type="text/css">* {
<#if .locale == "zh_CN">
font-family: NotoSans, NotoSansCJKsc, sans-serif;
<#elseif .locale == "zh_TW">
font-family: NotoSans, NotoSansCJKtc, sans-serif;
<#elseif .locale == "ja_JP">
font-family: NotoSans, NotoSansCJKjp, sans-serif;
<#elseif .locale == "ko_KR">
font-family: NotoSans, NotoSansCJKkr, sans-serif;
<#elseif .locale == "th_TH">
font-family: NotoSans, NotoSansThai, sans-serif;
<#else>
font-family: NotoSans, sans-serif;
</#if>
}
table {
font-size: 9pt;
table-layout: fixed;
}
th {
font-weight: bold;
font-size: 8pt;
vertical-align: middle;
padding: 5px 6px 3px;
background-color: #A1A0A0;
}
td {
padding: 4px 6px;
}
td p { align:left }
b {
font-weight: bold;
color: #333333;
}
/* b1 {
font-weight: bold;
color: #ffffff;
}*/
table.header td {
padding: 0;
font-size: 10pt;
}
table.footer td {
padding: 0;
font-size: 8pt;
}
table.itemtable th {
padding-bottom: 3px;
padding-top: 3px;
}
table.body td {
padding-top: 2px;
}
table.total {
page-break-inside: avoid;
}
tr.totalrow {
line-height: 200%;
}
td.totalboxtop {
font-size: 12pt;
}
td.addressheader {
font-size: 8pt;
padding-top: 6px;
padding-bottom: 2px;
}
td.address {
padding-top: 0;
}
td.totalboxmid {
font-size: 28pt;
padding-top: 20px;
}
span.title {
font-size: 18pt;
}
span.number {
font-size: 16pt;
}
hr {
width: 100%;
color: #d3d3d3;
background-color: #d3d3d3;
height: 1px;
}
</style>
</head>
<body header="nlheader" header-height="10%" footer="nlfooter" footer-height="10pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
<table style="width: 816px;"><tr>
<td style="width: 377px; height: 97px;">
<table cellpadding="0" cellspacing="0"><tr>
<td align="left" style="font-family: Calibri ;font-size: 11px;width: 162px; height: 10px;">${companyInformation.companyName}</td>
</tr>
<tr>
<td align="left" style="font-family: Calibri ;font-size: 11px;width: 162px; height: 10px;">${companyInformation.addressText}</td>
</tr>
<tr>
<td align="left" style="font-family: Calibri ;font-size: 11px;width: 162px; height: 10px;">Phone# 1 888 435 6466</td>
</tr>
<tr>
<td align="left" style="font-family: Calibri ;font-size: 11px;width: 162px; height: 10px;">GST# 839979275</td>
</tr></table>
</td>
<td style="width: 402px; height: 80px;">
<table cellpadding="0" cellspacing="0" style="width:332px;">
<tr style="padding-top: 3px;">
<td align="left" style="width: 120px; height: 16px;"><b>Payment Method</b></td>
<td align="left" style="width: 202px; height: 16px;">${record.paymentmethod}</td>
</tr>
<tr style="padding-top: 3px;">
<td align="left" style="width: 120px; height: 16px;"><b>Auth Code</b></td>
<td align="left" style="width: 202px; height: 16px;">#${record.authcode}</td>
</tr>
<tr style="padding-top: 3px;">
<td align="left" style="width: 150px; height: 22px;"><b>Payment Processed By</b></td>
<td align="left" style="width: 202px; height: 22px;padding-bottom: 5px;">${record.creditcardprocessor}</td>
</tr>
<tr style="padding-top: 6px;">
<td align="left" style="width: 120px; height: 22px;"><b>Credit Card number</b></td>
<td align="left" style="width: 202px; height: 22px;">${record.ccnumber}</td>
</tr>
<tr style="padding-top: 2px;">
<td align="left" style="width: 120px; height: 25px;"><b>Cheque #</b></td>
<td align="left" style="width: 202px; height: 25px;">${record.checknum}</td>
</tr></table>
</td>
</tr></table>
<table><tr>
<td><strong>Bill To</strong></td>
</tr>
<tr>
<td style="font-family: Calibri ;font-size: 11px;">${record.customer.billaddress}</td>
</tr></table>
<br /><#if record.apply?has_content>
<#assign currencySymbol = {"USD":"$", "EUR":"€", "GBP":"£", "CAD":"$"}>
<#assign currentCurrency = record.currency.symbol?string>
<table border=".25" cellspacing="0" class="itemtable" style="margin-top:10px;width:100%;border-color: #706E6E;"><tr height="5px" style="background-color: #706E6E;color: #ffffff">
<th align="left" colspan="3" style="height: 1px;"><b1>Date</b1></th>
<th align="left" colspan="5" style="height: 1px;"><b1>Description</b1></th>
<th align="right" colspan="3" style="height: 1px;"><b1>Orig. Amount</b1></th>
<th align="right" colspan="3" style="height: 1px;"><b1>Amount Due</b1></th>
<th align="right" colspan="3" style="height: 1px;"><b1>Discount</b1></th>
<th align="right" colspan="4" style="height: 1px;"><b1>Applied Amount</b1></th>
</tr>
<#list record.apply as apply>
<#if apply_index==0></#if>
<tr>
<td align="left" colspan="3" line-height="120%" style="height: 8px;">${apply.applydate}</td>
<td align="left" colspan="5" style="height: 8px;border-left:.5px; border-left-color: #A1A0A0;">${apply.type} #${apply.refnum}</td>
<td align="right" colspan="3" style="height: 8px;border-left:.5px; border-left-color: #A1A0A0;">${apply.total?string['#,###,##0.00']}</td>
<td align="right" colspan="3" style="height: 8px;border-left:.5px; border-left-color:#A1A0A0;">${apply.due?string['#,###,##0.00']}</td>
<#if apply.disc?has_content>
<#if apply.disc!=0>
<#assign discount= (apply.disc)*(-1)>
<td align="right" colspan="3" style="height: 8px;border-left:.5px; border-left-color: #A1A0A0;">${discount?string['#,###,##0.00']}</td>
<#else >
<td align="right" colspan="3" style="height: 8px;border-left:.5px; border-left-color: #A1A0A0;">0.00</td>
</#if>
</#if>
<td align="right" colspan="3" style="height: 33px;border-left:.5px; border-left-color: #C2C1C1;">${currencySymbol[currentCurrency]}${apply.disc?string(",##0.00;(##0.00))")}</td>
<td align="right" colspan="3" style="height: 33px;border-left:.5px; border-left-color: #C2C1C1;">${apply.disc?string(",##0.00;(##0.00))")}</td>
<td align="right" colspan="4" style="height: 8px;border-left:.5px; border-left-color: #A1A0A0;">${apply.amount?string['#,###,##0.00']}</td>
</tr>
</#list></table>
</#if>
<table class="total" style="width: 100%; margin-top: 2px;"><tr class="totalrow">
<td align="right" style="width: 614px; height: 18px;"><b>Total Amount Paid<!--${record.total@label}--></b></td>
<td align="right" style="width: 166px; height: 18px;">${record.applied}</td>
</tr></table>
<!--<table align="right" style="width: 28%;padding: 15px;">
<tr style="width: 28%;padding: 5px;"><td>AUTH.#${record.authcode}</td></tr>
<tr style="width: 28%;padding: 10px;"></tr>
<tr style="width: 28%; padding-top: 5px;"><td>PAYMENT PROCESSED BY</td></tr>
<tr><td>${record.creditcardprocessor}</td></tr>
</table>-->
</body>
</pdf>