Add job number to invoice, PO and sales order PDF print.

Jira Code: DI-24

Added a Job column in the invoice, sales order and purchase order records. This will source the value from the PROJECT ID field in these records. Only the project number in the Project ID field should be shown on the PDF.

Purchase Order

<?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: 100%;"><tr>  <td align="left"><img src="http://shopping.na3.netsuite.com/core/media/media.nl?id=11&c=4300462&h=d2f25f4b7b51c0f8d857" style="width: 200px; height: 77px;" /></td> <td align="right"><span font-size="26" color="#00548e">PURCHASE ORDER</span><p class="number" align="left" font-size="12"><br/><b>PO# :  ${record.tranid}</b></p><br/><!--<table class="invoicebox"><tr>    <td scope="col">    <p style="font-size: 9pt;margin-top: 9px;margin-bottom: 4px;margin-left: 7px;margin-right: 7px;color:#3b3b3b;align:left; "><b>Transaction Date:</b>${record.trandate}</p>    </td>    </tr>    <tr height="30px">    <td scope="col" style="text-align: right;">    <p style="font-size: 9pt;margin-top: 4px;margin-bottom: 4px;margin-left: 7px;margin-right: 7px;color:#3b3b3b;align:left; "><b>Sales Effective Date:</b> ${record.saleseffectivedate}</p>    </td>    </tr>    <tr height="30px">    <td scope="col" style="text-align: right;">    <p style="font-size: 9pt;margin-top: 4px;margin-bottom: 9px;margin-left: 7px;margin-right: 7px;color:#3b3b3b "><b>Created Date:</b>${record.custbody_esc_created_date}</p>    </td>    </tr></table>--></td>  </tr> <tr> <td align="left" style="padding-left:18px;">${companyInformation.companyname}<br />${companyInformation.mainaddress_text}</td></tr>  </table> </macro> <macro id="nlfooter"> <br/> <table class="footer" style="width: 100%;"><tr> <td><#if record.tranid?has_content ><barcode codetype="code128" showtext="true" value="${record.tranid}"/></#if></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: 8pt; vertical-align: middle; padding: 5px 6px 3px; background-color: #e3e3e3; color: #333333; } 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.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; } .invoicebox { border:1px; border-color:#779BCB; margin-top:2px;width:200px;padding-bottom:2px;padding-top:2px;min-height:100px;max-height:100px; }
</style></head><body header="nlheader" header-height="20%" footer="nlfooter" footer-height="35pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter"> <table width="100%"><tr><td align="left"><table><tr> <td><b>To: </b>${record.entity}<p><b>Attn:</b> ${record.billattention}</p><p><b>Address:</b> ${record.billingaddress_text}</p><p><b>Phone:</b> ${record.billphone}</p></td>    </tr> <tr><td><br/><table class="invoicebox"><tr><td><p align="left" ><b>Memo:</b></p><p align="left"> ${record.memo}</p></td></tr></table></td></tr>    </table></td><td align="right"><table ><tr> <td><b>PO Date: </b>${record.trandate}<p><b>Terms:</b> ${record.terms}</p><p><b>Project ID:</b> <#if record.custbody4?has_content><#assign prj = record.custbody4?keep_after(" ") ><#if prj?has_content> <#assign prj = prj?substring(0, 6)> ${prj}</#if></#if></p><p><b>Ship To:</b> ${record.shipaddress}</p><p><b>Req'd Ship Date:</b> ${record.shipdate}</p></td>    </tr> <tr><td><br/><br/><br/><br/><table class="invoicebox" ><tr><td><p><b>Address Correspondence To:</b></p><p>${user.firstname}  ${user.lastname}</p><p><b>Email:</b> ${user.email}</p><p><b> Phone:  </b> ${user.phone}</p></td></tr></table></td></tr>    </table></td></tr></table> <br/><#if record.item?has_content><#assign n = 0><table align="left" class="itemtable" style="width: 100%;"><!-- start items --><#list record.item as item><#if item_index==0><thead>  <tr>  <th align="center" style="background-color:#779BCB" colspan="3">ITEM NO</th>  <th colspan="6" align="center" style="background-color:#779BCB">MPN</th> <th colspan="3" style="background-color:#779BCB;"><p align="center">TAG NUMBER</p></th>  <th colspan="10" style="background-color:#779BCB">DESCRIPTION</th>  <th colspan="4" align="center" style="background-color:#779BCB">QUANTITY</th> <th colspan="4" align="center" style="background-color:#779BCB">RATE</th> <th colspan="4" align="center" style="background-color:#779BCB">AMOUNT</th>  </tr></thead></#if><tr>  <td align="center" colspan="3" line-height="150%"><#assign n = n+1> ${n}</td>  <td align="left" colspan="6">${item.custcol_jj_di1_mpn}</td>  <td align="center" colspan="3"> ${item.custcol_jj_di1_tag_number}</td>  <td align="left" colspan="10">${item.description}</td>  <td align="center" colspan="4">${item.quantity}</td> <td align="center" colspan="4">${item.rate}</td>  <td align="center" colspan="4">${item.amount}</td>  </tr>  </#list><!-- end items --></table></#if><#if record.expense?has_content>
<table class="itemtable" style="width: 100%;"><!-- start expenses --><#list record.expense as expense ><#if expense_index==0><thead>  <tr>  <th colspan="12" style="background-color:#779BCB">${expense.category@label}</th>  <th colspan="10" style="background-color:#779BCB">${expense.account@label}</th>  <th align="right" colspan="4" style="background-color:#779BCB">${expense.amount@label}</th>  </tr></thead></#if><tr>  <td colspan="12">${expense.category}</td>  <td colspan="10"><span class="itemname">${expense.account}</span></td>  <td align="right" colspan="4">${expense.amount}</td>  </tr>  </#list><!-- end expenses --></table></#if>
<hr /><table class="total" style="width: 100%;"><tr class="totalrow">  <td background-color="#ffffff" colspan="4"> </td>  <td align="right" style="background-color:#779BCB"><b>${record.total@label}</b></td>  <td align="right" style="background-color:#779BCB">${record.total}</td>  </tr></table> <br/> <p font-size="10">Please email invoices to <a href="http://accounts.payable@desalitech.com">accounts.payable@desalitech.com</a> or mail to:<br /><br />Desalitech, Inc.<br />One Gateway Center, Suite 809<br />Newton, MA 02458<br />Attn: Accounts Payable<br /><br /> </p><table border="0" cellpadding="1" cellspacing="1" style="width:100%;"><tr>  <td rowspan="2" style="width: 247px; height: 1px;">  <table border-color="#779BCB" border="1" cellpadding="1" cellspacing="1" style="width: 250px;"><tr>    <td>Purchasing Representative</td>    </tr>    <tr>    <td><br /><br /><br /> </td>    </tr>    <tr>    <td>Date:</td>    </tr></table>  </td>  <td rowspan="2" style="width: 185px; height: 1px;"><br /><br /><br /><br /> </td>  <td rowspan="2" style="width: 281px; height: 1px;">  <table border-color="#779BCB" border="1" cellpadding="1" cellspacing="1" style="width: 265px;"><tr>    <td>Vendor</td>    </tr>    <tr>    <td><br /><br /><br /> </td>    </tr>    <tr>    <td>Date:</td>    </tr></table>  </td>  </tr></table> </body></pdf>

Invoice

<?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><tr>    <td align="left"><img src="http://shopping.na3.netsuite.com/core/media/media.nl?id=11&c=4300462&h=d2f25f4b7b51c0f8d857" style="width: 200px; height: 80px;padding-top:-5px;padding-left:-20px;" />${companyInformation.companyname}<br />${companyInformation.mainaddress_text}<br /> </td>    <td style="height: 79px;"><span color="#00548e" font-size="24" style="padding-left:1050px;">                                        INVOICE</span>    <table align="right" class="invoicebox"><tr>        <td><b>Date:</b> ${record.trandate}<br /><br /><br /><b>Invoice #:</b> ${record.tranid}<br /><br /><br /><b>Due Date:</b> ${record.duedate}</td>        </tr></table>    </td>    </tr></table> </macro> <macro id="nlfooter">  <table align="center" width="100%"><tr>    <td>    <p>Questions? Please contact us at <a href="http://accounts.receivable@desalitech.com">accounts.receivable@desalitech.com</a></p>    </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: 8pt; vertical-align: middle; padding: 5px 6px 3px; background-color: #e3e3e3; color: #333333; } 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: #d3d3d3; background-color: #d3d3d3; height: 1px; } .invoicebox { border:1px; border-color:#779BCB; margin-top:2px;width:200px;padding-bottom:0px;padding-top:2px;min-height:100px;max-height:100px; }</style></head><body header="nlheader" header-height="20%" footer="nlfooter" footer-height="5pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter"> <table border="0" cellpadding="1" cellspacing="1" style="width:100%;"><tr>    <td style="background-color: rgb(119, 155, 203);"><b>Bill To:</b></td>    <td style="text-align: right; background-color: rgb(119, 155, 203);"><b>Ship To:</b></td>    </tr>    <tr>    <td>${record.billaddress}</td>    <td style="text-align: right;">${record.shipaddress}</td>    </tr></table>
<table align="center" class="body" style="margin-top:10px;width:100%;"><tr>    <th style="background-color: rgb(119, 155, 203); vertical-align: middle; width: 287px;">PO Number</th>    <th style="background-color: rgb(119, 155, 203); vertical-align: middle; width: 223px;">Payment Terms</th>    <th style="background-color: rgb(119, 155, 203); vertical-align: middle;">Project ID</th>    </tr>    <tr>    <td style="height: 14px; text-align: center; vertical-align: middle; width: 287px;"><br /><b>${record.otherrefnum}</b></td>    <td align="left" style="height: 14px; width: 223px;"><br /><b>${record.terms}</b></td> <td style="text-align: left; height: 14px;"><br /><b><#if record.custbody4?has_content><#assign prj = record.custbody4?keep_after(" ") ><#if prj?has_content> <#assign prj = prj?substring(0, 6)> ${prj}</#if></#if></b></td>    </tr></table><#if record.item?has_content><#assign n=1>
<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" style="background-color:#779BCB">Line #</th>    <th colspan="12" style="background-color:#779BCB">Description</th>    <th colspan="3" style="background-color:#779BCB">Quantity</th>    <th align="right" colspan="4" style="background-color:#779BCB">Unit Price</th>    <th align="right" colspan="4" style="background-color:#779BCB">Extended Price</th>    </tr></thead></#if><tr>    <td align="center" colspan="3" line-height="150%">${n} <#assign n=n+1></td>    <td colspan="12">${item.description}</td>    <td colspan="3">${item.quantity}</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="left" style="background-color:#779BCB"><b>Sales Tax:</b></td>    <td align="right" style="background-color:#779BCB">${record.taxtotal}</td>    </tr>    <tr class="totalrow">    <td background-color="#ffffff" colspan="4"> </td>    <td align="left" style="background-color:#779BCB"><b>Total:</b></td>    <td align="right" style="background-color:#779BCB">${record.total}</td>    </tr></table> 
<table style="width:100%"><tr>    <td align="left" border="1" colspan="2" style="background-color:#779BCB"><font color="#333333"><b>Payment Instructions:</b></font></td>    </tr>    <tr>    <td border="1" style="text-align: left; vertical-align: top; width: 390px;">    <p><b>Pay by Checks:</b></p>
    <table border="0" cellpadding="1" cellspacing="1" style="width:200px;"><tr>        <td>Desalitech Inc.</td>        </tr>        <tr>        <td>Accounts Receivable</td>        </tr>        <tr>        <td>One Gateway Center</td>        </tr>        <tr>        <td>Suite 809</td>        </tr>        <tr>        <td>Newton, MA 02458</td>        </tr></table>    </td>    <td border="1" style="text-align: left; vertical-align: top; width: 389px;"><strong>Pay via wire transfer/ACH:</strong>    <table style="width: 388px;"><tr>        <td style="width: 85px;">Bank Name:</td>        <td style="width: 271px;">Silicon Valley Bank</td>        </tr>        <tr>        <td style="width: 85px;">Bank Address:</td>        <td style="width: 271px;">3003 Tasman Drive Santa Clara, CA 95054</td>        </tr>        <tr>        <td style="width: 85px;">Routing/Transit:</td>        <td style="width: 271px;">121140399</td>        </tr>        <tr>        <td style="width: 85px;">Account:</td>        <td style="width: 271px;">3300993126</td>        </tr>        <tr>        <td style="width: 85px;">Account Name:</td>        <td style="width: 271px;">Desalitech, Inc.</td>        </tr>        <tr>        <td style="width: 85px;">SWIFT Code:</td>        <td style="width: 271px;">SVBKUS6S</td>        </tr></table>    </td>    </tr></table><br /><span style="font-size:10px;"><font color="#333333"><b>Please reference the </b><strong>Invoice number </strong><b> with payment</b></font>  </span>
<table style="background-color:#779BCB" width="100%"><tr>    <td align="center"><b>Special Remarks & Comments</b></td>    </tr>    <tr>    <td align="left" style="background-color: rgb(255, 255, 255);">${record.memo}</td>    </tr></table><br /> </body></pdf>



Leave a comment

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