Change the layout of the Payment Voucher Template as of the purchase order

Jira Code: HAR-21

Description: Customize the PDF templates of “Payment Voucher” so that its layout will be as of the “Purchase order” template.

<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdfset>
<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" width="100%">
             <tr>
               <td width="50%"><img src="${companyInformation.logoUrl}" style="float: left; margin: 7px;width:197px;height:85px" /></td>
               <td align="right" width="50%"><strong>${companyInformation.companyName}</strong><br/>ABN: ${companyInformation.employerid}<br/>${companyInformation.shippingaddress_text}<br/>Phone: 1300 220 195</td>
             </tr>
           
          </table>
         <p align="center" style="font-size:18pt"><strong>Supplier Payment</strong></p>
          <hr width="100%" style="border-top: 1px solid black;"></hr>
        </macro>
        <macro id="nlfooter">
                    <hr width="100%" style="border-top: 1px solid black;"></hr>  
      
   <table width="100%" style="background-color: #1A478B;color:#ffffff" ><tr><td>
 </td><td align="right"><table style="background-color: #1A478B;color:#ffffff" class="total"><tr>
	<td colspan="4"> </td>
	<td align="left"   ><span style="color:#ffffff"><strong>Amount</strong></span></td>
    <td align="right">:</td>
	<td align="right">${record.total}</td>
	</tr>
	
      </table> </td></tr></table>
           <hr width="100%" style="border-top: 1px solid black;"></hr>  
          <br/>
            <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: 10pt;
            vertical-align: middle;
            padding: 5px 0px 3px;
            background-color: #ffffff;
            color: black;
        }
        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: black;
            background-color: black;
            height: 1px;
        }
</style>
</head>
<body header="nlheader" header-height="19%" footer="nlfooter" footer-height="95pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
   <table width="100%" style="margin-left:10px;">
     <tr>
       <td><table>
         <tr><td> <strong>Address:</strong></td></tr>
         <tr><td>${record.address}<!--<#if record.custbody_regionaddress?contains("The Regional Manager")>${record.custbody_regionaddress?substring(0,20)}</#if>--></td></tr>
         <tr><td><!--<#if record.custbody_regionaddress?contains("The Regional Manager")>${record.custbody_regionaddress?substring(20)}</#if>--></td></tr>
         </table></td>
     
     </tr>
     <tr><td> </td></tr>
     <tr><td>
       <table>
        
       </table>
       </td></tr>
  </table>
 <hr width="100%" style="border-top: 1px solid black;"></hr>
    
<#assign n=1/><#assign head = 0>


<table  style="width: 100%; "><#list record.apply as apply><#if apply_index==0>
<thead>
	<tr style="border-bottom:1px solid black">
     <th align="center" colspan="7"><#assign head = 1 >Date</th>
	 <th align="center" colspan="7">Type</th>
	 <th align="center" colspan="7">Orig. Amt</th>
     <th align="center" colspan="7">Amt. Due</th>
     <th align="center" colspan="7">Disc. Taken</th>
	 <th align="center" colspan="7">Payment</th>
</tr>
  </thead></#if>
<tr>
	 <td align="center" colspan="7">${apply.applydate}</td>
     <td align="center" colspan="7">${apply.type}</td>
     <td align="center" colspan="7">${apply.total}</td>
     <td align="center" colspan="7">${apply.due}</td>
     <td align="center" colspan="7">${apply.disc}</td>
     <td align="center" colspan="7">${apply.amount}</td>
  
  </tr></#list>
   </table>
  

  
</body>
</pdf>
  
  </pdfset>

Leave a comment

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