Advanced PDF Template for Picking Ticket

<?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 colspan="6" rowspan="2"><#if companyInformation.logoUrl?length != 0><img src="${companyInformation.logoUrl}" style="float: left; margin: 1px; width: 60px; height: 50px;" /> </#if></td>
	<td align="right" colspan="6"><span class="title">${record@title?upper_case}</span></td>
	</tr>
	<tr>
	<td align="right" colspan="6"><barcode codetype="code128" showtext="false" value="${record.tranid}"/></td>
	</tr>
	<tr>
	<td align="left" colspan="5"><span class="nameandaddress">${companyInformation.addressText}</span><br /><span>PH: ${companyInformation.phone}</span> <span> &nbsp; &nbsp; &nbsp; FAX: ${companyInformation.fax}</span><br /><span>E-Mail: ${companyInformation.email}</span> <span>Website: ${companyInformation.url}</span></td>
	<td align="right" colspan="4" style="font-size: 7pt;vertical-align: bottom; padding-right: 5px;"><span>Time Entered: ${record.createddate?string.short} &nbsp;&nbsp;&nbsp;</span><br /><span>Time Printed: ${.now?string.short}</span></td>
	<td align="left" colspan="3">
	<table class="inter-header-table" width="100%"><tr>
		<td class="dark-bg">Number</td>
		<td>${record.tranid}</td>
		</tr>
		<tr>
		<td class="dark-bg">${record.trandate@label}</td>
		<td>${record.trandate}</td>
		</tr>
		<tr>
		<td class="dark-bg">Page</td>
		<td><pagenumber/> of <totalpages/></td>
		</tr></table>
	</td>
	</tr></table>
        </macro>
        <macro id="nlfooter">
            <table class="footer" style="width: 100%;"><tr>
			<td align="right" width="55%" style="font-size: 10pt;"><b>Customer Copy</b></td>
			<td align="right"><b><pagenumber/> of <totalpages/></b></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: 8pt;
			table-layout: fixed;
          	border-collapse: collapse;
		}
		th {
			font-weight: bold;
			font-size: 8pt;
			vertical-align: middle;
            padding: 5px 6px 5px;
            background-color: #e3e3e3;
			color: #333333;
          	border-width: thin;
		}
		td {
            padding: 4px 6px;
        }
		td p { align:left }
		b {
			font-weight: bold;
			color: #333333;
		}
		table.header td {
			padding: 0;
			font-size: 10pt;
		}
		table.footer td {
			padding: 0;
			font-size: 8pt;
		}
		table.itemtable th {
			padding-bottom: 10px;
			padding-top: 10px;
		}
		table.body td {
			padding-top: 2px;
		}
		td.addressheader {
			font-size: 8pt;
			padding-top: 6px;
			padding-bottom: 2px;
		}
		td.address {
			padding-top: 0;
		}
		span.title {
			font-size: 20pt;
		}
		span.number {
			font-size: 16pt;
		}
		span.itemname {
			font-weight: bold;
			line-height: 150%;
		}
		hr {
			width: 100%;
			color: #d3d3d3;
			background-color: #d3d3d3;
			height: 1px;
		}
      	table.inter-header-table{
        	border: .5pt solid;
          	border-width: thin;
      	}
      	table.inter-header-table td{
        	padding: 4px;
          	border: .5pt solid;
          	border-width: thin;
          	border-bottom: none;
          	border-right: none;
      	}
        table.inter-header-table tr:first-child td{
			border-top: none;
        }
      	td.dark-bg{
          
        	background-color: #e3e3e3;
      	}
      	.addressheader.dark-bg{
        	
          	
      	}
      	td.addressheader.dark-bg:first-child{
         
      	}
      
      	table.header-detail-table{
          width: 100%;
          margin-top: 5px;
          border: .5pt solid #000;
          border-width: thin;
      	}
      	table.header-detail-table td{
          	border: .5pt solid #000;
          	border-bottom: none;
          	border-right: none;
      	}
      	table.header-detail-table th{
          	border-top: none;
          	border-bottom: none;
          	border-right: none;
      	}
      	table.header-detail-table td:first-child, table.header-detail-table th:first-child{
        	border-left: none;
      	}
        table.itemtable{
			border: 1pt solid #000;
          	font-size: 8pt;
        }
      	table.itemtable td{
          	padding: 5px 2px 5px;
			border: .5pt solid #000;
          	border-bottom: none;
          	border-right: none;
        }
      	table.itemtable th{
          padding: 5px 2px 5px;
          font-size: 8pt;
          border-top: none;
          border-bottom: none;
          border-right: none;
      	}
      	table.itemtable td:first-child, table.itemtable th:first-child{
        	border-left: none;
      	}
        
</style>
</head>
<body header="nlheader" header-height="15%" footer="nlfooter" footer-height="10pt" padding="0.2in 0.5in 0.2in 0.5in" size="Letter">
    <table style="width: 100%; margin-top: 10px; border: 1pt solid #000; border-width: "><tr>
	<td class="addressheader dark-bg" colspan="1" style="border-right: 0.5px">${record.shipaddress@label}: ${record.shipaddresslist}</td>
	<td class="addressheader" colspan="5">${record.shipaddress}<br />${record.entity.phone}</td>
	<td class="addressheader dark-bg" colspan="1" style="border-right: 0.5px;border-left: 0.5px">${record.billaddress@label}:</td>
	<td class="addressheader" colspan="5">${record.billaddress}</td>
	</tr></table>

<table class="body header-detail-table" style= "border: 1pt solid #000"><tr  >

	<th align="center" colspan="2">CUSTOMER REFERENCE</th>
	<th align="center" colspan="2">CREATOR</th>
	<th align="center" colspan="2">REQUESTED</th>
	<th align="center" colspan="4">SLSP</th>
	<th align="center" colspan="2">${record.terms@label}</th>
	<th align="center" colspan="3">WH</th>
	<th align="center" colspan="2">FREIGHT</th>
	<th align="center" colspan="2" >SHIP VIA</th>
   
	</tr>
	<tr>

	<td align="center" colspan="2">${record.otherrefnum}</td>
      <td align="center" colspan="2"><#if record.custbody_jj_created_by?has_content>${record.custbody_jj_created_by.entityid}<#else>Website</#if></td>
	<td align="center" colspan="2">${record.custbody8}</td>
	<td align="center" colspan="4"><#assign data = record.custbody_jj_slsp?split(",")><#list data as entry>
  ${entry?trim}
  <#sep>
</#list></td>
      <td align="center" colspan="2"><#if record.terms?string?has_content>${record.terms}<#else>${record.paymentmethod}</#if></td>
	<td align="center" colspan="3">${record.location}</td>
	<td align="center" colspan="2">${record.custbody7}</td>
	<td align="center" colspan="2">${record.shipmethod}</td>

	</tr></table>
 
<#if record.item?has_content>

<table class="itemtable" style="width: 100%; margin-top: 5px;"><!-- start items --><#list record.item as item><#if item_index==0>

<thead>
	<tr >
	<th colspan="1">LN</th>
	<th colspan="3">${item.item@label?upper_case}</th>
	<th colspan="6">DESCRIPTION</th>
	<th colspan="2">ORDER</th>
	<th colspan="1">SHIP</th>
	<th colspan="1">BACK</th>
	<th colspan="2">${item.units@label?upper_case}</th>
    <th colspan="5">BIN</th>
   <!-- <th colspan="3">BIN QUANTITY</th>-->
	<!--<th colspan="1">LOC</th>
	<th colspan="1">LOC2</th>-->
	<th colspan="2">PRICE</th>
	<th colspan="2">EXT</th>
	</tr>
</thead>
</#if><tr>
	<td colspan="1">${item.line}</td>
	<td colspan="3"><span class="itemname">${item.item}</span></td>
	<td colspan="6">${item.custcol_szco_item_display_name}</td>
	<td align="right" colspan="2">${item.quantity}</td>
	<td align="right" colspan="1">${item.quantityfulfilled}</td>
	<td align="right" colspan="1">${item.quantitybackordered}</td>
	<td colspan="2">${item.units}</td>
  
  <td colspan="5"><#if item.quantity?string == item.quantitybackordered?string > <#else><#if item.inventorydetail?has_content><#assign count  = 0><#assign x  = item.inventorydetail?string><#list x?split(")") as sValue><#assign count  = count + 1> <#if count lt x?split(")")?size>${sValue}) </#if> </#list></#if></#if></td>
  	<!--<td colspan="3">${item.custcol_jj_binqty}</td>-->
	<!--<td colspan="1">&nbsp;</td>
	<td colspan="1">&nbsp;</td>-->
	<td align="right" colspan="2">${item.rate}</td>
	<td align="right" colspan="2">${item.amount}</td>
	</tr>
	</#list><!-- end items -->
	<tr>
	<td colspan="16"><span>TOTAL WEIGHT: </span><br /><span>**THANK YOU FOR YOUR BUSINESS**</span></td>
	<td class="dark-bg" colspan="5">Total Amount:</td>
	<td align="right" colspan="4">${record.total}</td>
	</tr></table>
  <table border="1" style="width: 100%; margin-top: 15px;"><tr>
	<td align="center" class="dark-bg"><b>SALES ORDER NOTE</b></td>
	</tr>
	<tr>
	<td>${record.custbody_jj_so_note}</td>
	</tr></table>
  <table border="1" style="width: 100%; margin-top: 15px;"><tr>
	<td align="center" class="dark-bg"><b>${record.custbody2@label?upper_case}</b></td>
	</tr>
	<tr>
	<td>${record.custbody2}</td>
	</tr></table>
</#if>
</body>
</pdf>

Leave a comment

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