Media Buying Quotation – Quote customization

Jira Code: CN-34

Customized a Quote Template for the C2 Native Client Which uses a different font style.

<?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>
  <link name="zilla-slab" type="font" subtype="truetype" src="https://system.eu2.netsuite.com/core/media/media.nl?id=1563&c=4899351&h=f7ca1355a78f4a6fb329&_xt=.ttf" src-bold="https://system.eu2.netsuite.com/core/media/media.nl?id=1567&c=4899351&h=34d31d28b5d59d58fe70&_xt=.ttf" bytes="2" />
    <macrolist>
        <macro id="nlheader">
            <table class="header" style="width: 100%;">
				<tr>
					<td rowspan="3"></td>
					
				</tr>
			</table>
           <table class="header" style="width: 100%;"><tr>
	<td rowspan="3"><#if companyInformation.logoUrl?length != 0><img src="${companyInformation.logoUrl}" style="float: left;  width:80;height:80;" /> </#if>
      <#if companyInformation.companyName?has_content><p>
      
        <span class="nameandaddress" ><b>${companyInformation.companyName}</b></span></p></#if>
      <span class="nameandaddress" ><b>${companyInformation.addressText}</b></span></td>
	<td align="right"><span class="title">Quotation</span></td>
	</tr>
	<tr>
      <td align="right" style="padding-top:-20px;"><span class="number"><b>#${record.tranid}</b></span></td>
	</tr>
	<tr>
      <td align="right" style="padding-top:-20px;"><b>${record.trandate}</b></td>
	</tr></table>
        </macro>
		<macro id="nlWatermark">  
			<table style="margin-top : 590px;margin-left : 590px;">
				<tr>
					<td align="right"><img height="150px" width="100px" src="https://system.eu2.netsuite.com/core/media/media.nl?id=1558&c=4899351&h=90101ffa3f6265bbbde8"/></td>
				</tr>
			</table>			
        </macro>
        <macro id="nlfooter">
            <table class="footer" style="width: 100%;">
				<tr>
					<td></td>
					<td width="85%" align="center">
					<table>
						<tr>
							<td><img height="10px" width="10px" src="https://system.eu2.netsuite.com/core/media/media.nl?id=1674&c=4899351&h=871a43f03d31505c18a7" /></td>
							<td>   P.O. Box 2642 Dubai, U.A.E   </td>
							<td><img height="10px" width="10px" src="https://system.eu2.netsuite.com/core/media/media.nl?id=1675&c=4899351&h=5645a8afc879093c2056" />   </td>
							<td>   T.+9714 282 7621   </td>
							<td><img height="10px" width="10px" src="https://system.eu2.netsuite.com/core/media/media.nl?id=1676&c=4899351&h=68c714dd25c9524ab9d8" />   </td>
							<td>   www.c2native.io</td>
						</tr>
					</table>
					
					</td>
					<td width="10%" align="right" style="margin-top : 40px;"><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: black;
        }
        td {
            padding: 4px 6px;
        }
       
        table.header td {
            padding: 0;
            font-size: 10pt;
        }
        table.footer td {
            padding: 0;
			margin-top: 20px;
            font-size: 9pt;
        }
        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;
			color: black;
        }
        td.addressheader {
            font-size: 8pt;
            padding-top: 6px;
            padding-bottom: 2px;
        }
        td.address {
            padding-top: 0;
        }
        td.totalboxmid {
            font-size: 20pt;
            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;
        }
		*{
		font-family: zilla-slab;
		}
</style>
</head>
<body header="nlheader" header-height="15%" footer="nlfooter" footer-height="25pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
    <table style="width: 100%; margin-top: 10px;"><tr>
	<td class="addressheader" colspan="3"><b>${record.billaddress@label}</b></td>
	
	<td class="totalboxtop" colspan="5"><b>${record.total@label?upper_case}</b></td>
	</tr>
	<tr>
      <td class="address" colspan="3" rowspan="2"><b>${record.billaddress}</b></td>
      <td align="right" class="totalboxmid" colspan="5"><b>${record.total}</b></td>
	</tr>
	<tr>
	<td align="right" class="totalboxbot" colspan="5"><b>${record.duedate@label}:</b> ${record.duedate}</td>
	</tr></table>


<#if record.item?has_content>

<table class="itemtable" style="width: 100%; margin-top: 10px;"><!-- start items --><#list record.item as item><#if item_index==0>
<thead>
	<tr>
	<th align="center" colspan="3">${item.quantity@label}</th>
	<th colspan="12">${item.item@label}</th>
	<th colspan="3">${item.options@label}</th>
	<th align="right" colspan="4">Unit Price</th>
	<th align="right" colspan="4">${item.amount@label}</th>
	</tr>
</thead>
</#if><tr>
	<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
	<td colspan="12"><span class="itemname">${item.item}</span><br />${item.description}</td>
	<td colspan="3">${item.options}</td>
	<td align="right" colspan="4">${item.rate}</td>
	<td align="right" colspan="4">${item.amount}</td>
	</tr>
	</#list><!-- end items --></table>

<hr /></#if>
<table class="total" style="width: 100%; margin-top: 10px;"><tr>
	<td colspan="4"> </td>
	<td align="right"><b>${record.subtotal@label}</b></td>
	<td align="right">${record.subtotal}</td>
	</tr>
	<tr>
	<td colspan="4"> </td>
	<td align="right"><b>VAT(5%)</b></td>
	<td align="right">${record.taxtotal}</td>
	</tr>
	<tr class="totalrow">
	<td background-color="#ffffff" colspan="4"> </td>
	<td align="right"><b>${record.total@label}</b></td>
	<td align="right">${record.total}</td>
	</tr></table>
</body>
</pdf>

Leave a comment

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