Print Estimate PDF

Jira Code: PROF-9 Singapore Quote and Singapore Sales Order

An article about the print of Estimate using advanced pdf. The following fields are shown in the print: Bill address, Ship address, confirm to, Ship Via, FOB, terms, sales rep, item details(item, unit, rate, amount, quantity). 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">
            <table class="header" style="width: 100%;"><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"><span class="number">#${record.tranid}</span></td>
	</tr>
	<tr>
	<td align="right">${record.trandate}</td>
	</tr></table>
        </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">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: 8pt;
            vertical-align: middle;
            padding: 5px 6px 3px;
            background-color: #e3e3e3;
            color: #333333;
        }
        td {
            padding: 4px 6px;
        }
        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;
        }
        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: 0;
        }
        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: #d3d3d3;
            background-color: #d3d3d3;
            height: 1px;
        }
</style>
</head>
<body header="nlheader" header-height="11%" footer="nlfooter" footer-height="20pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
     
<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;"><span style="font-size:14px;"></span></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>

<table style="margin-top: 15px; text-align: center; width: 100%;"><tr>
	<th align="center" style="background-color: #0073bc; color: #ffffff">${record.custbody_confirmto@label}</th>
	<th align="center" style="background-color: #0073bc; color: #ffffff">Ship Via</th>
	<th align="center" style="background-color: #0073bc; color: #ffffff">${record.fob@label}</th>
	<th align="center" style="background-color: #0073bc; color: #ffffff">${record.terms@label}</th>
	<th align="center" style="background-color: #0073bc; color: #ffffff">${record.salesrep@label}</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.shipmethod}</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: 10px;"><!-- start items --><#list record.item as item><#if item_index==0>
<thead>
	<tr>
	<th colspan="12" style="padding: 10px 6px;">${item.item@label}</th>
	<th align="right" colspan="2" style="padding: 10px 6px;">UM</th>
	<th align="right" colspan="4" style="padding: 10px 6px;">${item.quantity@label}</th>
	<th align="right" colspan="4" style="padding: 10px 6px;">Price</th>
	<th align="right" colspan="4" style="padding: 10px 6px;">${item.amount@label}</th>
	</tr>
</thead>
</#if><tr>
	<td colspan="12"><span style="font-weight: bold; line-height: 150%; color: #333333;">${item.item}</span><br />${item.description}</td>
	<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">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: 500px; margin-top: 10px"><tr>
	<td>   <em>${record.custbody_memo}</em></td>
	</tr></table>
</#if>

     <table border="1" cellpadding="1" cellspacing="1" style="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-top: 10px;"><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>

Leave a comment

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