Delivery Docket Pdf Creation

<?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: 721px; font-size: 10pt;"><tr>
	<td align="left" style="width: 60%; height: 145px;margin-top:-17px"><img height="100px" src="${companyInformation.logoUrl}" style="float: left; margin: 5px 5px 0px 5px;" vertical-align="top" width="310px" /></td>
	<td align="left" style="width: 319px;padding-left:-25px;"><span class="title" style="font-size: 18pt;"><b>Delivery Docket</b></span><br />&nbsp;</td>
	</tr></table>
        </macro>
        <macro id="nlfooter">
            <table style="width: 720px;height:150px;"><tr>
	<td style="height: 100%; width: 287px;padding-left:0px;" width="40%">
	<table align="left" border="1" class="footerTable" style="float:left;width:253px;height:150px;"><tr>
		<td colspan="3" roswpan="4" rowspan="3" style="color: #000000;"><b>${record.custbody_jj_delivery_notes@label}</b><br />${record.custbody_jj_delivery_notes}</td>
		</tr></table>
	</td>
	<td style="height: 150px; padding-right: 4px; width: 426px;" width="60%">
	<table align="left" border="1" cellpadding="1" cellspacing="1" class="footerTable" style="height:145px;width: 90%;"><tr>
		<td style="width: 50%;height:40px;border-right:0.5px;border-bottom:0.5px;" vertical-align="middle"><b>Date</b></td>
		<td style="width: 50%;height:40px;border-bottom:0.5px;">&nbsp;</td>
		</tr>
		<tr>
		<td style="width: 50%;height:40px;border-right:0.5px;border-bottom:0.5px;" vertical-align="middle"><b>Customer Name</b></td>
		<td style="width: 50%;height:40px;border-bottom:0.5px;">&nbsp;</td>
		</tr>
		<tr>
		<td style="width: 50%;height:67px;border-right:0.5px;" vertical-align="middle"><b>Customer Signature</b></td>
		<td style="width: 50%;height:67px;">&nbsp;</td>
		</tr></table>
	</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>
		}
        square {
          height: 50px;
          width: 50px;
          background-color: #555;
        }
		table {
			font-size: 9pt;
			table-layout: fixed;
		}
        th {
            font-weight: bold;
            font-size: 8pt;
            vertical-align: middle;
            padding: 5px 6px 3px;
            background-color: #e3e3e3;
            color: #333333;
            align:center;
        }
        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.footerTable{
        border: 1px;
        color: #828282;
      }
      table.itemtable{
        <!--border:1px;-->
        color: #828282;
      }
        table.itemtable th {
            padding-bottom: 10px;
            padding-top: 10px;
        }
        table.body td {
            padding-top: 2px;
        }
        td.addressheader {
            font-size: 9pt;
            font-weight: bold;
            padding-top: 6px;
            padding-bottom: 2px;
        }
        td.address {
            padding-top: 0;
        }
        span.title {
            font-size: 28pt;
        }
        span.number {
            font-size: 16pt;
        }
        span.itemname {
            font-weight: bold;
            line-height: 150%;
        }
        div.returnform {
            width: 100%;
            /* To ensure minimal height of return form */
            height: 200pt;
            page-break-inside: avoid;
            page-break-after: avoid;
        }
        hr {
            border-top: 1px dashed #d3d3d3;
            width: 100%;
            color: #ffffff;
            background-color: #ffffff;
            height: 1px;
        }
</style>
</head>
<body header="nlheader" header-height="10%" footer="nlfooter" footer-height="105pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
    <table style="width: 100%;"><tr style="margin-top:-20px;">
	<td class="nameandaddress">${companyInformation.addressText}<br />02 4625 7575<br />www.allcraft.net.au</td>
	<td style="padding-left:50px;padding-top:-45px;">
	<table><tr style="padding-top: 0px;">
		<td><b>${salesorder.trandate@label}</b></td>
		<td style="padding-left:55px;">${salesorder.trandate}</td>
		</tr>
		<tr style="padding:-3px;">
		<td><b>${salesorder.tranid@label}</b></td>
		<td style="padding-left:55px;">${salesorder.tranid}</td>
		</tr>
		<tr style="padding:-3px;">
		<td><b>Customer PO#</b></td>
		<td style="padding-left:55px;">${salesorder.otherrefnum}</td>
		</tr>
		<tr style="padding:-3px;">
		<td><b>${salesorder.shipdate@label}</b></td>
		<td style="padding-left:55px;">${salesorder.shipdate}</td>
		</tr>
		<tr style="padding:-3px;">
		<td><b>Tracking #</b></td>
		<td style="padding-left:55px;">${record.packagetrackingnumber}</td>
		</tr>
		<tr style="padding:-3px;">
		<td><b>${salesorder.shipmethod@label}</b></td>
		<td style="padding-left:55px;">${record.shipmethod}</td>
		</tr>
		<tr style="padding:-3px;">
		<td><b>Shipment#</b></td>
		<td style="padding-left:55px;">${record.tranid}</td>
		</tr>
		<tr style="padding:-3px;">
		<td><b>Delivery Driver</b></td>
		<td style="padding-left:55px;">${record.custbody_delivery_driver}</td>
		</tr></table>
	</td>
	</tr>
	<tr>
	<td class="addressheader" style="margin-top:15px;">${salesorder.shipaddress@label}</td>
	</tr>
	<tr>
	<td class="address">${salesorder.shipaddress}</td>
	</tr></table>
<#if salesorder.item?has_content>

<table class="itemtable" style="width: 100%; margin-top: 10px;padding-bottom:10px;">
<thead>
	<tr style="border-bottom:1px solid #828282;border-right:1px solid #828282;">
	<th align="left" colspan="6">Item Code</th>
	<th align="left" colspan="12">${salesorder.item[0].description@label}</th>
	<th align="left" colspan="2">Check</th>
	<th align="left" colspan="3">Ordered</th>
	<th align="left" colspan="4">Back Ordered</th>
	<th align="left" colspan="3">Shipped</th>
	</tr>
</thead>
<#list salesorder.item as tranline><tr>
	<td colspan="6" style="color: #000000;border-right: 1px solid #828282;">${tranline.Item}</td>
	<td colspan="12" style="color: #000000;border-right: 1px solid #828282;">${tranline.description}</td>
	<td align="center" colspan="2" style="color: #000000;font-size:25px;padding:0px;border-right: 1px solid #828282;">□</td>
	<td align="right" colspan="3" style="color: #000000;border-right: 1px solid #828282;">${tranline.quantity}</td>
	<td  colspan="4" style="border-right: 1px solid #828282;">${tranline.quantitybackordered}</td>
	<td  colspan="3" style="color: #000000;">${tranline.quantityfulfilled}</td>
	</tr>
	</#list></table>
<!--<table style="width: 720px;"><tr>
	<td style="height: 100%; width: 287px;padding-left:0px;" width="40%">
	<table align="left" border="1" class="footerTable" style="float:left;width:253px;height:150px"><tr>
		<td colspan="3" roswpan="4" rowspan="3" style="color: #000000;"><b>${record.custbody_jj_delivery_notes@label}</b><br />${record.custbody_jj_delivery_notes}</td>
		</tr></table>
	</td>
	<td style="height: 150px; padding-right: 4px; width: 426px;" width="60%">
	<table align="left" border="1" cellpadding="1" cellspacing="1" class="footerTable" style="height: 150px; width: 90%;"><tr>
		<td vertical-align="middle" style="width: 50%;height:40px;"><b>Date</b></td>
		<td style="width: 50%;height:40px;">&nbsp;</td>
		</tr>
		<tr>
		<td vertical-align="middle" style="width: 50%;height:40px;"><b>Customer Name</b></td>
		<td style="width: 50%;height:40px;">&nbsp;</td>
		</tr>
		<tr>
		<td vertical-align="middle" style="width: 50%;height:70px;"><b>Customer Signature</b></td>
		<td style="width: 50%;height:70px;">&nbsp;</td>
		</tr></table>
	</td>
	</tr></table>--></#if><#if preferences.RETURNFORM && returnForm??>

<hr />
<div class="returnform">
<table style="width: 100%; margin-top: 10px;"><tr>
	<td><span class="nameandaddress">${companyInformation.companyName}</span></td>
	<td align="right"><span class="number">${returnForm@title}</span></td>
	</tr></table>
&nbsp;

<table class="itemtable" style="width: 100%; height:20%; margin-top: 10px;">
<thead>
</thead><tr>
	<td colspan="8">&nbsp;</td>
	</tr></table>
</div>
</#if>
</body>
</pdf>

Leave a comment

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