Jira Code: PROF-9 Singapore Quote and Singapore Sales Order
An article about the print of Sales Order using advanced pdf.
The following fields are shown in the print: Bill address, Ship address, confirm to, PO number, Ship via, Ship date, FOB, terms, sales rep, item details(item, unit, rate, amount, quantity, quantity fulfilled). The item rate and amount are shown in Singapore dollar. The exchange rate is also displayed in the print.
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>
<#if .locale == "ru_RU">
<link name="verdana" type="font" subtype="opentype" src="${nsfont.verdana}" src-bold="${nsfont.verdana_bold}" bytes="2" />
</#if>
<macrolist>
<macro id="nlheader">
<div style="padding: 0px 0px; margin: 0px;">
<table style="width: 100%; font-size: 10pt; margin-bottom: 30px;"><tr>
<td rowspan="3" style="padding: 0"><img src="https://system.na2.netsuite.com/core/media/media.nl?id=1673&c=447968&h=f2ca43d8a6e1cd994898" style="width: 235px; height: 45px; padding: 0 0 0" /><span style="font-size:12px;">1 Scotts Rd #24-10<br />Shaw Centre<br />Singapore 228208<br />(65) 3152 2449</span></td>
<td align="right" style="padding: 0; color:#696969"><span style="font-size: 28pt; text-transform: uppercase">${record@title}</span></td>
</tr>
<tr>
<td align="right" style="padding: 0;"><span style="font-size: 16pt;">#${record.tranid}</span></td>
</tr>
<tr>
<td align="right" style="padding: 0;">${record.trandate}</td>
</tr></table>
<table style="width: 100%; margin-top: 10px;"><tr>
<td colspan="3" style="font-size: 8pt; padding: 6px 0 2px; font-weight: bold; color: #333333;"><span style="font-size:14px;">${record.billaddress@label}</span></td>
<td colspan="3" style="font-size: 8pt; padding: 6px 0 2px; font-weight: bold; color: #333333;"> </td>
<td colspan="5" style="font-size: 8pt; background-color: rgb(227, 227, 227); font-weight: bold;"><span style="font-size:14px;">${record.shipaddress@label}</span></td>
</tr>
<tr>
<td colspan="3" style="padding: 0;">${record.billaddress}</td>
<td colspan="3" style="padding: 0;"> </td>
<td align="lect" colspan="5" style="padding-top: 0px; background-color: #e3e3e3;">${record.shipaddress}<br /><br />${record.custbody1}</td>
</tr></table>
</div>
<p> </p>
<p> </p>
</macro>
<macro id="nlfooter">
<table style="width: 100%; font-size: 8pt;"><tr>
<td style="padding: 0;"><barcode codetype="code128" showtext="true" value="${record.tranid}"/></td>
<td align="right" style="padding: 0;"><pagenumber/> of <totalpages/></td>
</tr></table>
</macro>
</macrolist>
<style type="text/css">table {
<#if .locale == "zh_CN">
font-family: stsong, sans-serif;
<#elseif .locale == "zh_TW">
font-family: msung, sans-serif;
<#elseif .locale == "ja_JP">
font-family: heiseimin, sans-serif;
<#elseif .locale == "ko_KR">
font-family: hygothic, sans-serif;
<#elseif .locale == "ru_RU">
font-family: verdana;
<#else>
font-family: sans-serif;
</#if>
font-size: 9pt;
table-layout: fixed;
}
th {
font-weight: bold;
font-size: 10pt;
vertical-align: middle;
padding: 5px 6px 3px;
background-color: #e3e3e3;
color: #333333;
}
td {
padding: 4px 6px;
}
thead { display: table-header-group }
tfoot { display: table-row-group }
tr { page-break-inside: avoid }
</style>
</head>
<body header="nlheader" header-height="25%" footer="nlfooter" footer-height="20pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
<table style="margin-top: 15px; text-align: center; width: 100%;"><tr>
<th align="center" style="background-color: #0073bc; color: #ffffff"><span style="font-size:12px;">${record.custbody_confirmto@label}</span></th>
<th align="center" style="background-color: #0073bc; color: #ffffff"><span style="font-size:12px;">${record.otherrefnum@label}</span></th>
<th align="center" style="background-color: #0073bc; color: #ffffff"><span style="font-size:12px;">Ship Via</span></th>
</tr>
<tr>
<td align="center" style="padding-top: 3px; text-align: center; border-left: 0.1px solid rgb(173, 173, 173); border-bottom: 0.1px solid rgb(173, 173, 173); border-right: 0.1px solid rgb(173, 173, 173)">${record.custbody_confirmto}</td>
<td align="center" style="padding-top: 3px; text-align: center; border-bottom: 0.1px solid rgb(173, 173, 173); border-right: 0.1px solid rgb(173, 173, 173)">${record.custbody_purchasenumber}</td>
<td align="center" style="padding-top: 3px; text-align: center; border-bottom: 0.1px solid rgb(173, 173, 173); border-right: 0.1px solid rgb(173, 173, 173)">${record.shipmethod}</td>
</tr></table>
<table style="margin-top: 4px; text-align: center; width: 100%;"><tr>
<th align="center" style="background-color: #0073bc; color: #ffffff"><span style="font-size:12px;">${record.shipdate@label}</span></th>
<th align="center" style="background-color: #0073bc; color: #ffffff"><span style="font-size:12px;">${record.fob@label}</span></th>
<th align="center" style="background-color: #0073bc; color: #ffffff"><span style="font-size:12px;">${record.terms@label}</span></th>
<th align="center" style="background-color: #0073bc; color: #ffffff"><span style="font-size:12px;">${record.salesrep@label}</span></th>
</tr>
<tr>
<td align="center" style="padding-top: 3px; text-align: center; border-left: 0.1px solid rgb(173, 173, 173); border-bottom: 0.1px solid rgb(173, 173, 173); border-right: 0.1px solid rgb(173, 173, 173)">${record.shipdate}</td>
<td align="center" style="padding-top: 3px; text-align: center; border-bottom: 0.1px solid rgb(173, 173, 173); border-right: 0.1px solid rgb(173, 173, 173)">${record.custbodyfob}</td>
<td align="center" style="padding-top: 3px; text-align: center; border-bottom: 0.1px solid rgb(173, 173, 173); border-right: 0.1px solid rgb(173, 173, 173)">${record.terms}</td>
<td align="center" style="padding-top: 3px; text-align: center; border-bottom: 0.1px solid rgb(173, 173, 173); border-right: 0.1px solid rgb(173, 173, 173)">${record.custbody_proficium_rep_initials}</td>
</tr></table>
<#if record.item?has_content>
<table style="width: 100%; margin-top: 15px;"><!-- start items --><#list record.item as item><#if item_index==0>
<thead>
<tr>
<th colspan="12" style="padding: 10px 6px;"><span style="font-size:12px;">${item.item@label}</span></th>
<th align="right" colspan="2" style="padding: 10px 6px;"><span style="font-size:12px;">UM</span></th>
<th align="right" colspan="4" style="padding: 10px 6px;"><span style="font-size:12px;">${item.quantity@label}</span></th>
<th align="right" colspan="4" style="padding: 10px 6px;"><span style="font-size:12px;">Shipped</span></th>
<th align="right" colspan="4" style="padding: 10px 6px;"><span style="font-size:12px;">Price</span></th>
<th align="right" colspan="4" style="padding: 10px 6px;"><span style="font-size:12px;">${item.amount@label}</span></th>
</tr>
</thead>
</#if><tr>
<#if item.createpo == "Drop Shipment">
<td colspan="12"><span style="font-weight: bold; line-height: 150%; color: #333333;">\ ${item.item}</span><br />${item.description}</td>
<#else><td colspan="12"><span style="font-weight: bold; line-height: 150%; color: #333333;">${item.item}</span><br />${item.description}</td>
</#if>
<td align="right" colspan="2" line-height="150%">${item.units}</td>
<td align="right" colspan="4" line-height="150%">${item.quantity}</td>
<td align="right" colspan="4" line-height="150%">${item.quantityfulfilled}</td>
<td align="right" colspan="4">SGD $${item.custcol_jj_rate_sgd}</td>
<td align="right" colspan="4">SGD $${item.custcol_jj_amount_sgd}</td>
</tr>
</#list><!-- end items --></table>
<table border="0" cellpadding="1" cellspacing="1" style="width: 350px; margin-top: 10px"><tr>
<td> <em>${record.custbody_memo}</em></td>
</tr></table>
</#if>
<table border="1" cellpadding="1" cellspacing="1" style="page-break-inside: avoid;width: 130px; margin-top: 10px"><tr>
<td> USD to SGD:${record.custbody_jj_usd_to_sgd}</td></tr>
<tr><td> SGD to USD:${record.custbody_jj_sgd_to_usd}</td>
</tr></table>
<table style="page-break-inside: avoid; width: 100%;margin-bottom: 30px;">
<tr>
<td colspan="4"> </td>
<td align="right" style="font-weight: bold; color: #333333;">${record.subtotal@label}</td>
<td align="right">SGD ${record.custbody_jj_subtotal_sgd}</td>
</tr>
<tr>
<td colspan="4"> </td>
<td align="right" style="font-weight: bold; color: #333333;">Sales Tax</td>
<td align="right">SGD ${record.custbody_jj_taxtotal_sgd}</td>
</tr>
<tr>
<td colspan="4"> </td>
<td align="right" style="font-weight: bold; color: #333333;">Freight</td>
<td align="right">SGD ${record.custbody_jj_freight_sgd}</td>
</tr>
<tr style="background-color: #e3e3e3; line-height: 200%;">
<td background-color="#ffffff" colspan="4"> </td>
<td align="right" style="font-weight: bold; color: #333333;">${record.total@label}</td>
<td align="right">SGD ${record.custbody_jj_total_sgd}</td>
</tr></table>
</body>
</pdf>