Jira Code: HAR-2 Invoice PDF
An advance pdf for an invoice. The following fields are shown in the print: Invoice No, Invoice Date, Attention, PO Number, Invoice For, Project, Item table (name, description, quantity, rate, unit, GST, total), and Bank details are hardcoded (static data).
<?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" 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>TAX INVOICE</strong></p>
<hr width="100%" style="border-top: 1px solid black;"></hr>
</macro>
<macro id="nlfooter">
<table class="footer" style="width: 100%;"><tr>
<td><barcode codetype="code128" showtext="true" value="${record.tranid}"/></td>
<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="20pt" padding="0.25in 0.5in 0.25in 0.5in" size="Letter">
<table width="100%">
<tr>
<td><table>
<tr><td><strong>${record.billaddressee}</strong></td></tr>
<tr><td>${record.billaddress}</td></tr>
</table></td>
<td><table>
<tr><td><strong>Invoice No</strong></td><td>:</td><td>${record.tranid}</td></tr>
<tr><td><strong>Invoice Date</strong></td><td>:</td><td>${record.trandate}</td></tr>
</table></td>
</tr>
<tr><td> <strong>Attention</strong> : ${record.custbody_jj_attention}</td></tr>
</table>
<hr width="100%" style="border-top: 1px solid black;"></hr>
<span style="font-size:10pt"><strong>PO Number :</strong> ${record.otherrefnum}</span> <br/>
<span style="font-size:10pt"><strong>INVOICE FOR :</strong> ${record.custbody_jj_invoice_description}</span>
<hr width="100%" style="border-top: 1px solid black;"></hr>
<span style="font-size:10pt"><strong>PROJECT: ${record.job}</strong></span>
<#if record.item?has_content>
<table style="width: 100%; "><!-- start items --><#list record.item as item><#if item_index==0>
<thead>
<tr style="border-bottom:1px solid black">
<th colspan="12">ITEM DESCRIPTION</th>
<th align="center" colspan="4">${item.quantity@label}</th>
<th align="right" colspan="4">${item.rate@label}</th>
<th align="right" colspan="4">UOM</th>
<th align="right" colspan="4">GST</th>
<th align="right" colspan="4">${item.amount@label}</th>
</tr>
</thead>
</#if><tr>
<td colspan="12">${item.item}</td>
<td align="center" colspan="4" line-height="150%">${item.quantity}</td>
<td align="right" colspan="4">${item.rate}</td>
<td align="right" colspan="4">${item.units}</td>
<td align="right" colspan="4"><#if item.tax1amt?has_content>Y<#else>N</#if></td>
<td align="right" colspan="4">${item.amount}</td>
</tr>
</#list><!-- end items --></table>
<hr width="100%" style="border-top: 1px solid black;"></hr></#if>
<table class="total" style="width: 100%; margin-top: 10px;"><tr>
<td colspan="4"> </td>
<td align="left"><b>${record.subtotal@label}</b></td>
<td align="right">:</td>
<td align="right">${record.subtotal}</td>
</tr>
<tr>
<td colspan="4"> </td>
<td align="left"><b>GST</b></td>
<td align="right">:</td>
<td align="right">${record.taxtotal}</td>
</tr>
<tr >
<td background-color="#ffffff" colspan="4"> </td>
<td align="left"><b>Invoice Total</b></td>
<td align="right">:</td>
<td align="right">${record.total}</td>
</tr>
<tr >
<td background-color="#ffffff" colspan="4"> </td>
<td align="left"><b>Due Date</b></td>
<td align="right">:</td>
<td align="right">${record.duedate}</td>
</tr>
</table>
<hr width="100%" style="border-top: 1px solid black;"></hr>
<span style="font-size:10pt"><strong> Payment can be made directly to our bank account</strong></span>
<table>
<tr><td>Bank</td><td>:</td><td>ANZ</td></tr>
<tr><td>BSB</td><td>:</td><td>014-690</td></tr>
<tr><td>Account No</td><td>:</td><td>280-589-955</td></tr>
<tr><td>Account Name</td><td>:</td><td>Hartecs Group Pty Ltd</td></tr>
<tr><td>Branch</td><td>:</td><td>Rockhampton</td></tr>
</table>
<hr width="100%" style="border-top: 1px solid black;"></hr>
</body>
</pdf>