Check Voucher PDF Template

<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<#assign checkNo = ''><#assign checkDate = ''><#assign payName = ''><#assign payAddress =''><#assign totalAmount = 0>
<pdfset>
<#list records as check>
  <#assign checkNo = check.checknumber>
    <#assign checkDate = check.trandate>
    <#assign payName = check.entity>
    <#assign payAddress = check.entity.address>
<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>
      <#function toCurrency value showSymbol=false>
          <#if value?is_number>
          <#local retval = 0>
          <#local retval = value?string["###0.00"]>
		 
          <#return retval>
          <#else>
          <#return value>
          </#if>
        </#function>


	<style>
		* {
		<#if .locale == "zh_CN">
			font-family: font-family: Arial, 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: font-family: Arial, sans-serif;
		</#if>
		}
        
		td p { align:left }
          table {
			font-size: 10pt;
			table-layout: fixed;
		}
          td {
            padding: 0px 6px;
        }
    </style>
</head>
<body padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
  
  <table style="width:100.8%;">
    <tr>
      <td colspan = "15">&nbsp;</td>
      <td colspan = "15">
      <table style="width:100%;border:1px;" colspan = "15">
        <tr>
          <td colspan = "4" style="border-right:1px;border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Vendor #</i></td>
          <td colspan = "11" style="border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Vendor Name</i></td>
        </tr>
         <tr>
          <td colspan = "4" align="center" style="border-right:1px;border-bottom:1px;"><b>${check.entity.entityid}</b></td>
          <td colspan = "11" align="center" style="border-bottom:1px;"><b>${check.entity.altname}</b></td>
        </tr>
         <tr>
          <td colspan = "4" style="border-right:1px;border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Check Date</i></td>
          <td colspan = "6" style="border-right:1px;border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Check #</i></td>
          <td colspan = "5" style="border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Page #</i></td>
        </tr>
        <tr>
          <td colspan = "4" style="border-right:1px;" align="center" ><b>${check.trandate}</b></td>
          <td colspan = "6" style="border-right:1px;" align="center" ><b>${check.checknumber}</b></td>
          <td colspan = "5" align="center" ><b><pagenumber/></b></td>
        </tr>  
      </table>
    </td></tr>
    
  </table>
  <table style="width:100%;"><tr><td>&nbsp;</td></tr></table>
  <#assign totalAmount = 0><#assign totalDiscount = 0><#assign totalAmountPaid = 0>
  <table style="width:100%;border-bottom:1px;">
        <thead>
        <tr>
        <td colspan = "5" style="border-left:1px;border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="center"><i>Inv Date</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="center"><i>Invoice #</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="right"><i>Amount</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="right"><i>Discount</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="right"><i>Amount Paid</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;"><i>Memo</i></td>
        </tr></thead>
       <#assign rowCount = 0>
        <#list check.apply as apply>
          
          <#assign totalAmount = totalAmount + apply.total>
          <#assign totalDiscount = totalDiscount + apply.disc>
          <#assign totalAmountPaid = totalAmountPaid + apply.amount>
           <#assign rowCount = rowCount + 1>
          <#if rowCount &lt; 11>
        <tr>
        <td colspan = "5" style="border-left:1px;border-right:1px;" align="center" height="10px"><b>${apply.applydate?string["MM/dd/YY"]}</b></td>
        <td colspan = "5" style="border-right:1px;" align="center" height="10px"><b>${apply.refnum}</b></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"><b>${toCurrency(apply.total)}</b></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"><#if apply.disc?string != ''><b>${toCurrency(apply.disc)}</b><#else><b>.00</b></#if></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"><b>${toCurrency(apply.amount)}</b></td>
        <td colspan = "5" style="border-right:1px;word-break:break-all;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" height="10px">
        <#if check.custpage_jj_applied_trasactions?has_content>
        <#assign appliedTransactions = check.custpage_jj_applied_trasactions?eval>
        <#list appliedTransactions as transaction>
        <#if apply.doc == transaction.tranInternalId><i>${transaction.tranMemo}</i></#if>
        </#list>
        </#if>
        </td>
        </tr>
        </#if>
        </#list>
        <#assign remainingCount = 10 - rowCount>
        <#list 1..remainingCount as i>
        <tr>
        <td colspan = "5" style="border-left:1px;border-right:1px;" align="center" height="10px">&nbsp;</td>
        <td colspan = "5" style="border-right:1px;" align="center" height="10px"></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"></td>
        <td colspan = "5" style="border-right:1px;" height="10px"></td>
        </tr>
        </#list>
        
</table>
<table style="width:100%;">
  <tr>
        <td colspan = "5" style="border-right:1px;"></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;background-color:black;color:white;"><i>Totals</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;" align="right"><b>${toCurrency(totalAmount)}</b></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;" align="right"><#if totalDiscount == 0><b>.00</b><#else><b>${toCurrency(totalDiscount)}</b></#if></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;" align="right"><b>${toCurrency(totalAmountPaid)}</b></td>
        <td colspan = "5"></td>
        </tr>
  <tr>
      <td colspan = "5"></td>
        <td colspan = "5"></td>
        <td colspan = "5"></td>
        <td colspan = "5"></td>
        <td colspan = "5"></td>
    <td colspan = "5" align="right"><i><b>Payor's Copy</b></i></td>
  </tr>
</table>


  <table style="width:100%;"><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr></table>
  
  <table style="width:100.8%;">
    <tr>
      <td colspan = "15">&nbsp;</td>
      <td colspan = "15">
      <table style="width:100%;border:1px;" colspan = "15">
        <tr>
          <td colspan = "4" style="border-right:1px;border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Vendor #</i></td>
          <td colspan = "11" style="border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Vendor Name</i></td>
        </tr>
         <tr>
          <td colspan = "4" align="center" style="border-right:1px;border-bottom:1px;"><b>${check.entity.entityid}</b></td>
          <td colspan = "11" align="center" style="border-bottom:1px;"><b>${check.entity.altname}</b></td>
        </tr>
         <tr>
          <td colspan = "4" style="border-right:1px;border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Check Date</i></td>
          <td colspan = "6" style="border-right:1px;border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Check #</i></td>
          <td colspan = "5" style="border-bottom:1px;background-color:#BBBBB1;" align="center"><i>Page #</i></td>
        </tr>
        <tr>
          <td colspan = "4" style="border-right:1px;" align="center" ><b>${check.trandate}</b></td>
          <td colspan = "6" style="border-right:1px;" align="center" ><b>${check.checknumber}</b></td>
          <td colspan = "5" align="center" ><b><pagenumber/></b></td>
        </tr>  
      </table>
    </td></tr>
    
  </table>
  <table style="width:100%;"><tr><td>&nbsp;</td></tr></table>
  <#assign totalAmount = 0><#assign totalDiscount = 0><#assign totalAmountPaid = 0>
<table style="width:100%;border-bottom:1px;">
        <thead>
        <tr>
        <td colspan = "5" style="border-left:1px;border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="center"><i>Inv Date</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="center"><i>Invoice #</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="right"><i>Amount</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="right"><i>Discount</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;" align="right"><i>Amount Paid</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;border-top:1px;background-color:#BBBBB1;"><i>Memo</i></td>
        </tr></thead>
       <#assign rowCount = 0>
        <#list check.apply as apply>
          
          <#assign totalAmount = totalAmount + apply.total>
          <#assign totalDiscount = totalDiscount + apply.disc>
          <#assign totalAmountPaid = totalAmountPaid + apply.amount>
           <#assign rowCount = rowCount + 1>
          <#if rowCount &lt; 11>
        <tr>
        <td colspan = "5" style="border-left:1px;border-right:1px;" align="center" height="10px"><b>${apply.applydate?string["MM/dd/YY"]}</b></td>
        <td colspan = "5" style="border-right:1px;" align="center" height="10px"><b>${apply.refnum}</b></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"><b>${toCurrency(apply.total)}</b></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"><#if apply.disc?string != ''><b>${toCurrency(apply.disc)}</b><#else><b>.00</b></#if></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"><b>${toCurrency(apply.amount)}</b></td>
        <td colspan = "5" style="border-right:1px;word-break:break-all;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" height="10px">
        <#if check.custpage_jj_applied_trasactions?has_content>
        <#assign appliedTransactions = check.custpage_jj_applied_trasactions?eval>
        <#list appliedTransactions as transaction>
        <#if apply.doc == transaction.tranInternalId><i>${transaction.tranMemo}</i></#if>
        </#list>
        </#if>
        </td>
        </tr>
        </#if>
        </#list>
        <#assign remainingCount = 10 - rowCount>
        <#list 1..remainingCount as i>
        <tr>
        <td colspan = "5" style="border-left:1px;border-right:1px;" align="center" height="10px">&nbsp;</td>
        <td colspan = "5" style="border-right:1px;" align="center" height="10px"></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"></td>
        <td colspan = "5" style="border-right:1px;"  align="right" height="10px"></td>
        <td colspan = "5" style="border-right:1px;" height="10px"></td>
        </tr>
        </#list>
        
</table>
<table style="width:100%;">
  <tr>
        <td colspan = "5" style="border-right:1px;"></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;background-color:black;color:white;"><i>Totals</i></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;" align="right"><b>${toCurrency(totalAmount)}</b></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;" align="right"><#if totalDiscount == 0><b>.00</b><#else><b>${toCurrency(totalDiscount)}</b></#if></td>
        <td colspan = "5" style="border-right:1px;border-bottom:1px;" align="right"><b>${toCurrency(totalAmountPaid)}</b></td>
        <td colspan = "5"></td>
        </tr>
  <tr>
      <td colspan = "5"></td>
        <td colspan = "5"></td>
        <td colspan = "5"></td>
        <td colspan = "5"></td>
        <td colspan = "5"></td>
    <td colspan = "5" align="right"><i><b>Vendor's Copy</b></i></td>
  </tr>
</table>






<table style="width:100%;"><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr></table>
<table style="width:100%;">
  <tr>
    <td colspan = "15"></td>
    <td colspan = "15">
      <table style="width:100%;">
         <tr>
          <td colspan = "4" style="border-right:1px;border-bottom:1px;background-color:black;color:white;" align="center"><i>Check #</i></td>
          <td colspan = "6" style="border-right:1px;border-bottom:1px;background-color:black;color:white;" align="center"><i>Check Date</i></td>
          <td colspan = "5" style="border-bottom:1px;background-color:black;color:white;" align="right"><i>Amount</i></td>
        </tr>
         <tr>
          <td colspan = "4" style="border-left:1px;border-right:1px;border-bottom:1px;" align="center"><b>${checkNo}</b></td>
          <td colspan = "6" style="border-right:1px;border-bottom:1px;" align="center"><b>${checkDate}</b></td>
          <td colspan = "5" style="border-bottom:1px;border-right:1px;" align="right"><b>****${toCurrency(totalAmount)}</b></td>
        </tr>
         
      </table>
    </td>
  </tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td><i><b>${check.totalwords?upper_case} DOLLARS</b></i></td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr><td>&nbsp;</td></tr>
  <tr>
    <td colspan="2"><i>Pay to the Order of</i></td>
    <td colspan="1"></td>
    <td colspan="27"><b>${payAddress}</b></td>
  </tr>
</table>
</body>
</pdf>
</#list>
</pdfset>

Leave a comment

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