Tracking number placed optimally on Invoices

Tracking number from the shipping tab placed optimically on the invoice For identify the each tracking number we have split by using comma(,). And by clicking the tracking number in the PDF template, it will navigate to the Fedex tracking page.

<?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="2" style="width: 100%">
                  <table border="0" cellpadding="1" cellspacing="1" style="height: 85px; width: 100%;">
                    <tr>
                      <td style="width: 55%; height: 91px;padding-left:10px; ">
                        <table style="width: 100%;padding-left:3px;">
                          <tr>
                        	<td>
                              <div style="padding-bottom:-12px;margin-left:-4px"><img src="${companyInformation.logoUrl}" style="width:160%;height:60px;margin-bottom:5px; float: left;" /></div> 
                             
                              <span class="nameandaddress"  style="color: #000;;font-size:11px;text-decoration: none;margin-top:-10px;line-height: 110%; ">${companyInformation.companyName}</span><br />
                              <span class="nameandaddress"  style="color: #000;;font-size:11px;text-decoration: none; margin-top:-10px;line-height: 110%; ">${companyInformation.addressText}</span><br />
                               <span class="nameandaddress" style="color: #000;;font-size:11px;text-decoration: none; line-height: 110%;">+1(604)390-0730</span><br />
                        <span class="nameandaddress" style="color: #000;;font-size:11px;text-decoration: none;line-height: 110%;">${companyinformation.url?replace('<[^>]+>','','r')}</span><br />
                            </td>
                          </tr>
                        </table>
                       
						
                      </td>
                      <td style="width: 45%; height: 91px;padding-left:10px;  ">
                        <table style="width: 100%;padding-left:3px;margin-top:23px">
                          <tr>
                            <td style="width:25%;" align="left"><strong><span class="title" style="color:#000;font-size:17px;margin-left:5px">${record@title}</span></strong></td>
                            <td style="width:75%;" align="right"><span class="number" style="color:#000;font-size:17px">#${record.tranid}</span></td>
                            <td style="width:5%;" ></td>
                          </tr>
                         
                        </table>
                        <table style="width: 100%;height:30px;">
                       	  <tr>
                            	<td align="right" style="padding-top:22px; font-size:11px">Page <pagenumber/> of <totalpages/></td>
                          </tr>
                        </table>
                        <table style="width: 100%;height:30px;margin-left:2px;margin-top:5px">
                       		<tr style="font-size:11px;">
                              <td align="left" colspan="6"  ><strong>Date</strong></td>
                              <td align="left"  colspan="9" style="font-size:11px;"> ${record.trandate}</td>
                            </tr>
                            <tr  style="font-size:11px;">
                              <td align="left" colspan="6" ><strong>Acc No</strong></td>
                              <td align="left"  colspan="9" style="font-size:11px;">${record.accountnumber}
                              </td>
                            </tr>
                        </table>
                      </td>
                    </tr>
                  </table><br /><br /><br />&nbsp;
                </td>
              </tr>
              
              
              <!--<tr rowspan="2">
              <td><#if companyInformation.logoUrl?length != 0><img src="${companyInformation.logoUrl}" style="float: left; margin: 7px" /> </#if></td>-->
<!--	<td rowspan="3"><#if companyInformation.logoUrl?length != 0><img src="${companyInformation.logoUrl}" style="float: left; margin: 7px" /> </#if> <span class="nameandaddress">${companyInformation.companyName}</span><br /><span class="nameandaddress">${companyInformation.addressText}</span></td>-->
	<!--<td align="right"><span class="title">${record@title}</span></td>
	</tr>
	<tr>
	<td align="right"><span class="number">#${record.tranid}</span></td>
	</tr>
	<tr>
	<td align="right">${record.trandate}</td>
	</tr>-->
          </table>
        </macro>
        <macro id="nlfooter">
           <!-- <table class="footer" style="width: 100%;">
            <tr style="width:100%">
    			<td align="left"  style="font-size:11px; width:8%"><strong>Tracking #:</strong></td>
              
      			<td align="left"  style="font-size:11px; width:90%"><a href="https://www.fedex.com/fedextrack/summary?trknbr=${record.linkedtrackingnumbers?replace(' ',',')}" target="_blank">${record.linkedtrackingnumbers?replace(' ',',')}</a></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:  sans-serif;
		</#if>
		}
		table {
			font-size: 9pt;
			table-layout: fixed;
		}
        th {
            font-weight: bold;
            font-size: 9pt;
            vertical-align: middle;
          padding-top:2px;
          padding-bottom:2px;
            /*padding: 5px 6px 3px;*/
            /*background-color: #e3e3e3;*/
          	background-color:#a8acb0 ;
            color: #fff;
        }
        td {
            padding: 4px 6px;
        }
		td p { align:left }
        b {
            font-weight: bold;
            color: #333333;
        }
        table.header td {
            padding: 0px;
            font-size: 10pt;
        }
        table.footer td {
            padding: 0px;
            font-size: 8pt;
        }
        table.itemtable th {
            /*padding-bottom: 10px;
            padding-top: 10px;*/
        }
        table.body td {
            padding-top: 2px;
        }
        table.total {
            page-break-inside: avoid;
        }
        tr.totalrow {
            background-color: #e3e3e3;
            line-height: 200%;
        }
        td.totalboxtop {
            font-size: 12pt;
            background-color: #e3e3e3;
        }
        td.addressheader {
            font-size: 8pt;
            padding-top: 6px;
            padding-bottom: 2px;
        }
        td.address {
            padding-top: 0px;
        }
        td.totalboxmid {
            font-size: 28pt;
            padding-top: 20px;
            background-color: #e3e3e3;
        }
        td.totalboxbot {
            background-color: #e3e3e3;
            font-weight: bold;
        }
        span.title {
            font-size: 28pt;
        }
        span.number {
            font-size: 16pt;
        }
        span.itemname {
            font-weight: bold;
            line-height: 150%;
        }
        hr {
            width: 100%;
            color: #d3d3d3;
            background-color: #d3d3d3;
            height: 1px;
        }
     
     .itemtable td{
        border-right:1px solid #8c8c8c;
      }
      .itemtable tr th {
        border:1px solid #8c8c8c;
      }
</style>
</head>
<body header="nlheader" header-height="17%" footer="nlfooter" footer-height="60pt" padding="0.3in 0.5in 0.5in 0.5in" size="Letter">
      <table border="0" cellpadding="1" cellspacing="1" style="width: 100%;">
    <tr>
      <td style="width: 55%;">
          <table  border="0" cellpadding="1" cellspacing="1" style="width:99%;">
            <tr>
              <td style="width: 50%; font-size:11px;"><b>${record.billaddress@label}</b></td>
              <td style=" width: 50%; font-size:11px;"><b>${record.shipaddress@label}</b></td>
          	</tr>
              <tr style="padding-top:0px">
                  <td style="line-height: 110%;">${record.billaddress}</td>
                  <td style="line-height: 110%;">${record.shipaddress}</td>
              </tr>
        	</table>
      </td>
      <td style="width: 45%; ">
          <table align="left" border="0" cellpadding="1" cellspacing="1" style="width:101%;corner-radius: 5px;margin-top:-55px">
           <!-- <tr style="border-bottom:1px solid black;padding-top:4px">
              <td  style="width: 100%;font-size:14px;">
                <strong style="margin-left:50px">&nbsp;&nbsp;ACKNOWLEDGEMENT</strong>
              </td>
            </tr>
            <tr style="margin-bottom:-1px;border-bottom:1px solid black;">
              <td>
                <table style="width: 230px;">-->
                  
                  <tr  style="font-size:11px;">
                    <td align="left" colspan="6" style=""><strong>PO</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.memo}
                    </td>
                  </tr>
            	  <tr  style="font-size:11px;">
                    <td align="left" colspan="6" ><strong>Terms</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.terms}
                    </td>
                  </tr>
            	<tr  style="font-size:11px;">
                    <td align="left" colspan="6" ><strong>Due Date</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.duedate}
                    </td>
                  </tr>
            	 <tr  style="font-size:11px;">
                    <td align="left" colspan="6"><strong>Warehouse</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.location}
                    </td>
                  </tr>
            	 <tr  style="font-size:11px;">
                    <td align="left" colspan="6"><strong>Currency</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.currencyname}
                    </td>
                  </tr>
            	 <tr  style="font-size:11px;">
                    <td align="left" colspan="6" ><strong>Year</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.custbody1}
                    </td>
                  </tr>
            	 <tr  style="font-size:11px;">
                    <td align="left" colspan="6"  ><strong>Season</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.custbody_season}
                    </td>
                  </tr>
            	 <tr  style="font-size:11px;">
                    <td align="left" colspan="6" ><strong>Order type</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.custbody3}
                    </td>
                  </tr>
            	 <tr  style="font-size:11px;">
                    <td align="left" colspan="6" ><strong>Buyer</strong></td>
                    <td align="left"  colspan="9" style="font-size:11px;">${record.custbody4}
                    </td>
                  </tr>
               </table>
              </td>
            </tr>
  </table>
 
  <table  border="0" cellpadding="1" cellspacing="1" style="width: 100%;">
    <tr style="width:100%">
    	
      <td align="left"  colspan="5" style="font-size:11px;width:55%; font-size:10px;">${record.custbody_vat_instructions}</td>
      

      <td align="left" colspan="5" style="font-size:11px;width:45%;font-size:9px;margin-left:20px">${record.custbody_payment_instructions}</td>

    </tr>
  </table>
 
  <table  border="0" cellpadding="1" cellspacing="1" style="width: 100%;">
    <tr style="width:100%">
    	<td align="left" colspan="3" style="font-size:11px;width:8%"><strong>Tax ID #:</strong></td>
      <td align="left"  colspan="9" style="font-size:11px;width:92%">1012-5057</td>
    </tr>
  </table>
    <table  border="0" cellpadding="1" cellspacing="1" style="width: 100%;margin-bottom:5px">
    <tr style="width:100%">
    	<td align="left" colspan="3" style="font-size:11px;width:10%"><strong>Tracking #:</strong></td>
      <td align="left"  colspan="9" style="font-size:11px;width:90%"><a href="https://www.fedex.com/fedextrack/summary?trknbr=${record.linkedtrackingnumbers?replace(' ',',')}" target="_blank">${record.linkedtrackingnumbers?replace(' ',',')}</a></td>
    </tr>
  </table>
 <!--  <table  style="width: 100%;">
            <tr style="width:100%">
    			<td align="left"  style="font-size:11px; width:10%"><strong>Tracking #:</strong></td>
              
      			<td align="left"  style="font-size:11px; width:90%"><a href="https://www.fedex.com/fedextrack/summary?trknbr=${record.linkedtrackingnumbers?replace(' ',',')}" target="_blank">${record.linkedtrackingnumbers?replace(' ',',')}</a></td>
    		</tr>
         
          </table>-->
   <!-- <table style="width: 100%; margin-top: 10px;"><tr>
	<td class="addressheader" colspan="3"><b>${record.billaddress@label}</b></td>
	<td class="addressheader" colspan="3"><b>${record.shipaddress@label}</b></td>
	
	</tr>
	<tr>
	<td class="address" colspan="3" rowspan="2">${record.billaddress}</td>
	<td class="address" colspan="3" rowspan="2">${record.shipaddress}</td>
	
	</tr>
	
</table>-->
<!--
<table class="body" style="width: 100%; margin-top: 10px;"><tr>
	<th>${record.terms@label}</th>
	<th>${record.duedate@label}</th>
	<th>${record.otherrefnum@label}</th>
	<th>${record.salesrep@label}</th>
	<th>${record.shipmethod@label}</th>
	<th>${record.partner@label}</th>
	</tr>
	<tr>
	<td>${record.terms}</td>
	<td>${record.duedate}</td>
	<td>${record.otherrefnum}</td>
	<td>${record.salesrep}</td>
	<td>${record.shipmethod}</td>
	<td>${record.partner}</td>
	</tr></table>-->
<#if record.item?has_content>
<#assign a=1>
<table class="itemtable"  border="1" style="width: 100%;border:1px solid #8c8c8c;border-collapse: collapse; "><!-- start items --><#list record.item as item><#if item_index==0>
  
<thead >
	<tr>
	<th colspan="2" align="center"><strong>#</strong></th>
      <th colspan="6" align="center"><strong>Item Code</strong></th>
	<th colspan="9"  align="center"><strong>Description</strong></th>
	<th colspan="6" align="center"><strong>${item.options@label}</strong></th>
      <th align="center" colspan="2"><strong>${item.quantity@label}</strong></th>
	<th align="center" colspan="4"><strong>${item.rate@label}</strong></th>
	<th align="center" colspan="4"><strong>${item.amount@label}</strong></th>
	</tr>
</thead>
</#if>

  <tr>
	<td colspan="2" align="right">${a}</td>
      <td colspan="6" align="left">${item.item?keep_before(" ")}</td>
    <td colspan="9" align="left">${item.description}</td>
	<td colspan="6"  align="left">${item.options}</td>
    <td align="right" colspan="2" line-height="150%">${item.quantity}</td>
	<td align="right" colspan="4">${item.rate}</td>
	<td align="right" colspan="4">${item.amount}</td>
	</tr>
  
	<#assign a++>
	</#list><!-- end items -->  </table>


 </#if>
<table class="total" style="width: 100%; margin-top: 10px;"><tr>
	<td colspan="4">&nbsp;</td>
	<td align="right"><b>${record.subtotal@label}</b></td>
	<td align="right">${record.subtotal}</td>
	</tr>
	<tr>
	<td colspan="4">&nbsp;</td>
	<td align="right"><b>${record.taxtotal@label} (${record.taxrate}%)</b></td>
	<td align="right">${record.taxtotal}</td>
	</tr>
	<tr class="totalrow">
	<td background-color="#ffffff" colspan="4">&nbsp;</td>
	<td align="right"><b>${record.total@label}</b></td>
	<td align="right">${record.total}</td>
	</tr></table>
</body>
</pdf>

Leave a comment

Your email address will not be published. Required fields are marked *