Description
Create 2 copies of the the Invoice PDF template ( one original and one copy ) as per the given layout and mappings.

Solution
Go to Customization -> Forms -> Advanced PDF/HTML Templates
Search for the Standard Invoice PDF/HTML Template and click the customize option to create customized Invoice template.
JJ Custom Invoice PDF JS-198
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdfset>
<pdf>
<head>
<link name="NotoSansThai" type="font" subtype="opentype" src="${nsfont.NotoSansThai_Regular}" src-bold="${nsfont.NotoSansThai_Bold}" bytes="2" />
<macrolist>
<macro id="nlfooter">
<table class="footer" style=" width: 99%; margin-top: -40px; margin-bottom:10px" >
<tr><td>
<table class="body" style=" width: 100%; height: 100px; border-left: 1px; border-right: 1px; border-bottom:1pt; border-top: 1pt ">
<tr>
<td align="left" colspan="22" style=" border-right: 1 px; padding-left: 5px" class="thai"><b><u><span style="color:orange">For Customer</span> </u></b></td>
<td align="left" colspan="12" class="thai"><span style="color:orange">G-ABLE Co.,Ltd.</span></td>
</tr>
<tr>
<td align="left" colspan="22" style=" border-right: 1 px; font-size: 8pt" class="thai"><br/> บริษัทขอสงวนสิทธิ์ในการคิดดอกเบี้ยและค่าใช้จ่ายอื่นๆที่เกี่ยวข้อง 5% ต่อเดือนของยอดเงิน เมื่อพ้นกำหนดการชำระ เงิน</td>
<td align="left" colspan="12"> </td>
</tr>
<tr>
<td align="left" colspan="22" style=" padding-top: 1pt; border-right: 1 px; font-size: 7pt" class="thai"><br/> We reserve the right to charge 5% interest and other related expense per month for overdue amount</td>
<td align="left" colspan="12"> [Employee.custentity_gable_signature]</td>
</tr>
<tr>
<td align="center" colspan="22" style=" border-right: 1 px;" > <hr style="border-top: thin 1px black; width:70%" /> </td>
<td align="center" colspan="12"> <hr style="border-top: thin 1px black; width:95%" /> </td>
</tr>
<tr>
<td align="center" colspan="22" style=" border-right: 1 px;" > ( ) </td>
<td colspan="12" style="font-size : 9pt; padding-left: 10pt; "> ( NAPAPORN CHARENDEESUBSIRI ) </td>
</tr>
<tr>
<td align="center" colspan="22" style=" border-right: 1 px;" class="thai"> วันที่ ............/............/............</td>
<td align="center" colspan="12"><b>Senior Treasury Manager</b> </td>
</tr>
</table>
</td></tr>
</table>
</macro>
</macrolist>
<style type="text/css">
.thai
{
font-family: NotoSans, NotoSansThai, sans-serif;
}
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;
}
</style>
</head>
<body header="nlheader" header-height="10%" footer="nlfooter" footer-height="8%" padding="0.5in 0.5in 0.5in 0.5in" size="A4">
<#if record.item?has_content>
<table class="header" style="width: 100%; margin-top: 10px;" >
<thead>
<tr>
<td align="left" style="width: 537px; height: 115px; padding-top:-10px"><#if subsidiary.logo?length != 0><img height="50px" src="${subsidiary.logo@url}" style="float: left; margin: 5px"
vertical-align="top" width="150px" /></#if> <b><span style="color:orange;" class="thai"> ต้นฉบับใบแจ้งหนี้/ต้นฉบับใบกำกับภาษี<br/>ORIGINAL INVOICE / ORIGINAL TAX INVOICE</span></b> </td>
<!--Nested Table starts -->
<td colspan="10" style="border: 0px; padding-right: 10px; padding-top :-10px; width: 350px;">
<table align="right" style="width:150%; margin-top: 8px; border:1px; border-color:#808080; ">
<tr style="border-bottom:2px; border-color:#808080; font-size: 12pt;">
<td align="right" colspan="6" style=" width: 160px; background-color:#A9A9A9;" class="thai"><b>เลขที่ : </b></td>
<td align="center" colspan="7" style="width: 200px;"><b>${record.tranid}</b></td>
</tr>
<tr style="font-size: 12pt;">
<td align="right" colspan="6" style=" text-align:right; border-color:#808080; width: 160px; background-color:#A9A9A9;" class="thai" ><b>วันที่ : </b></td>
<td align="center" colspan="7" style="width: 200px;"><b>${record.trandate}</b></td>
</tr>
<tr style="border-top:2px; border-color:#808080; font-size: 12pt;">
<td align="right" colspan="6" style=" text-align:left; border-color:#808080; width: 160px; background-color:#A9A9A9;" class="thai"><b>แผ่นที่: </b></td>
<td align="center" colspan="7" style="width: 200px; "><b><pagenumber/> / <totalpages/></b></td>
</tr>
</table>
<!--Nested table ends -->
</td>
</tr>
<!--header line 2-->
<tr>
<td style="padding-top:-30pt;">
<table style="width: 125%; border-top:1px;">
<tr>
<td class="thai" colspan="8" style=" border-right: 1 px black; padding-top:5pt;" ><b> <span style= "color:orange;"> ตัวหนังสือสีส้ม </span> </b>${Subsidiary.custrecord_rapid_tht_company_legalname} </td>
<td class="thai" colspan="8" style="padding-top:5pt;"><b> <span style= "color:orange; padding-left:5pt;"> ตัวหนังสือสีส้ม </span> </b> ${Subsidiary.legalname}</td>
</tr>
<tr>
<td class="thai" colspan="4" >1เลขประจำตัวผู้เสียภาษี ${subsidiary.federalidnumber}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black; padding-left:5pt;"> 2 โทร.${subsidiary.custrecord_gable_phone}</td>
<td class="thai" colspan="4" style=" padding-left:5pt;">3 TAX ID. ${subsidiary.federalidnumber}</td>
<td class="thai" colspan="4" >4 Tel. ${subsidiary.custrecord_gable_phone}</td>
</tr>
<tr>
<td class="thai" colspan="4" >5${subsidiary.custrecord_rapid_tht_company_addr1}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black; padding-left:5pt;" >6 แฟกซ์. ${subsidiary.fax}</td>
<td class="thai" colspan="4" style="padding-left:5pt;">7 ${subsidiary.custrecord_gable_address1_eng}</td>
<td class="thai" colspan="4" >8 Fax. ${subsidiary.fax}</td>
</tr>
<tr>
<td class="thai" colspan="4" >9${subsidiary.custrecord_rapid_tht_company_addr2} ${subsidiary.custrecord_rapid_tht_company_addr3}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black;"> </td>
<td class="thai" colspan="4" style="padding-left:5pt;">10 ${subsidiary.custrecord_gable_address2_eng}</td>
<td class="thai" colspan="4" ></td>
</tr>
<tr>
<td class="thai" colspan="4" >11 ${subsidiary.custrecord_rapid_tht_company_city} ${subsidiary.custrecord_rapid_tht_company_zip}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black;"> </td>
<td class="thai" colspan="4" style="padding-left:5pt;">12 ${subsidiary.custrecord_gable_address3_eng}</td>
<td class="thai" colspan="4" ></td>
</tr>
</table>
</td>
</tr>
<!-- header line 2 ends -->
<!-- Header 3 starts-->
<tr>
<td>
<table class="body" style="width: 125%; margin-top: 10px;" border="1">
<tr>
<th align="center" class="thai" colspan="10" style=" border-right: 1px; border-bottom: 1px; font-size:12pt; background-color:#A9A9A9;">สถานที่ติดต่อลูกค้า <br/>Bill To Address</th>
<th align="center" class="thai" colspan="10" style=" border-bottom: 1px; font-size:12pt; background-color:#A9A9A9;"> สถานที่ส่งสินค้า <br/>Ship To Address</th>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left: 5px; ">ABC PVT LMT${record.entity.companyname}</td>
<td colspan="10" style=" padding-left:5pt;" >ABC PVT LMT${record.entity.companyname}</td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; "> ${record.billaddress}</td>
<td colspan="10" style=" padding-left:5pt;"> ${record.shipaddress}</td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; "> </td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; "> Phone:0432 4567 ${record.entity.phone} Fax: 1234${record.entity.fax}</td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; " class="thai" > เลขประจำตัวผู้เสียภาษีอากร (Tax ID) : 123456 ${record.entity.vatregnumber}
<#if record.custbody_rapid_tht_entitybranch == "0">( สำนักงานใหญ่ )<#else> ( 00013 )</#if>
</td>
</tr>
</table>
</td>
</tr>
<!--Header 3 ends...-->
<!--Header 4 starts....(Table 6 colums) -->
<tr>
<td>
<table class="body" style=" width: 125%; border-left: 1px; border-right: 1px; border-bottom: 1pt ">
<tr>
<th align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> รหัสลูกค้า <br/> Customer ID </th>
<th align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> ใบสั่งซื้อ <br/> PO# </th>
<th align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> เลขที่สัญญา <br/> Contract# </th>
<th align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> สกุลเงิน <br/>Currency </th>
<th align="center" colspan="10" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> พนักงานขาย <br/>Sales Person </th>
<th align="center" colspan="6" style=" border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> เงื่อนไขการชำระเงิน <br/> Terms of Payment </th>
</tr>
<tr>
<td align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px;">${record.entity.entityid} </td>
<td align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px;">${record.otherrefnum}</td>
<td align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px;">${record.cseg_project_order}</td>
<td align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px;">${record.currency}</td>
<td align="center" colspan="10" style=" border-right: 1 px; border-bottom: 1 px;">${record.salesrep}</td>
<td align="center" colspan="6" style=" border-bottom: 1 px;">${record.terms}</td>
</tr>
<!--Header 4 ends -->
<!-- Header 5 starts (Table 5 columns)-->
<!--<tr>
<th align="center" colspan="2" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ลำดับที่ <br/> Seq.</th>
<th align="center" colspan="16" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> รหัส/รายการสินค้า <br/> Product/Description</th>
<th align="center" colspan="4" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> จำนวน <br/> Qty</th>
<th align="center" colspan="6" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ราคาหน่วยละ <br/> Unit Net Price</th>
<th align="center" colspan="6" style=" background-color:#A9A9A9;" class="thai"> จำนวนเงิน <br/> Amount</th>
</tr> -->
</table>
<!-- Header 5 ends-->
</td></tr>
</thead>
<!--Body part starts -->
<tbody>
<tr><td>
<table class="body" style=" width: 125%; border-left: 1px; border-right: 1px; border-bottom: 1pt ">
<tr>
<th align="center" colspan="2" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ลำดับที่ <br/> Seq.</th>
<th align="center" colspan="16" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> รหัส/รายการสินค้า <br/> Product/Description</th>
<th align="center" colspan="4" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> จำนวน <br/> Qty</th>
<th align="center" colspan="6" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ราคาหน่วยละ <br/> Unit Net Price</th>
<th align="center" colspan="6" style=" background-color:#A9A9A9;" class="thai"> จำนวนเงิน <br/> Amount</th>
</tr>
<#list record.item as item>
<tr>
<td align="center" colspan="2" style=" border-right: 1 px;" >${item?counter} </td>
<td align="right" colspan="16" style=" border-right: 1 px;" ><#if item.itemtype == "Hardware">HW<#elseif item.itemtype == "Software"> SW<#else>SV </#if> /${item.item} ${item.description}<br/>{record.custbody_gable_remark}</td>
<td align="right" colspan="4" style=" border-right: 1 px" >${item.quantity} </td>
<td align="right" colspan="6" style=" border-right: 1 px;" >${item.rate} </td>
<td align="right" colspan="6" >${item.amount} </td>
</tr>
</#list>
</table>
</td></tr>
<!--Summary section -->
<tr>
<td class="summaryTableBorder">
<table style="width:125%; height:100px;">
<tr>
<th align="left" colspan="22" style=" padding-left: 5px; border-right: 1px; border-left: 1px; background-color:#A9A9A9; " class="thai" > ทั้งหมด<br/><br/><br/> กรุณาหักภาษี ณ ที่จ่าย เฉพาะรายการ SW, SV เท่านั้น ยกเว้น</th>
<th align="left" colspan="6" style=" padding-left: 1px; border-right: 1px; background-color:#A9A9A9; font-size: 8px " class="thai">
รวมมูลค่าสินค้า (Subtotal) <br/><br/>
ส่วนลดสินค้า (Discount) <br/><br/>
ราคาสุทธิ (Net) <br/><br/>
ภาษีมูลค่าเพิ่ม (VAT 7.00%) <br/><br/>
รวมทั้งสิ้น (Total)
</th>
<th align="right" colspan="6" style=" border-right: 1px; background-color:#A9A9A9; font-size: 8px" >
${record.subtotal}<br/><br/>
${record.discounttotal}<br/><br/>
${record.subtotal}<br/><br/>
${record.taxtotal}<br/><br/>
${record.total}</th>
</tr>
</table>
</td>
</tr>
<!--Summary ends.... -->
</tbody>
<!--<tfoot>
<tr><td align="right" style="padding-right:-100px" class="thai"><br/>ยังมีรายการต่อ</td></tr>
</tfoot> -->
</table>
</#if>
</body>
</pdf>
<!--Copy 1 -->
<pdf>
<head>
<link name="NotoSansThai" type="font" subtype="opentype" src="${nsfont.NotoSansThai_Regular}" src-bold="${nsfont.NotoSansThai_Bold}" bytes="2" />
<macrolist>
<macro id="nlfooter">
<table class="footer" style=" width: 99%; margin-top: -40px; margin-bottom:10px" >
<tr><td>
<table class="body" style=" width: 100%; height: 100px; border-left: 1px; border-right: 1px; border-bottom:1pt; border-top: 1pt ">
<tr>
<td align="left" colspan="22" style=" border-right: 1 px; padding-left: 5px" class="thai"><b><u><span style="color:orange">For Customer</span> </u></b></td>
<td align="left" colspan="12" class="thai"><span style="color:orange">G-ABLE Co.,Ltd.</span></td>
</tr>
<tr>
<td align="left" colspan="22" style=" border-right: 1 px; font-size: 8pt" class="thai"><br/> บริษัทขอสงวนสิทธิ์ในการคิดดอกเบี้ยและค่าใช้จ่ายอื่นๆที่เกี่ยวข้อง 5% ต่อเดือนของยอดเงิน เมื่อพ้นกำหนดการชำระ เงิน</td>
<td align="left" colspan="12"> </td>
</tr>
<tr>
<td align="left" colspan="22" style=" padding-top: 1pt; border-right: 1 px; font-size: 7pt" class="thai"><br/> We reserve the right to charge 5% interest and other related expense per month for overdue amount</td>
<td align="left" colspan="12"> [Employee.custentity_gable_signature]</td>
</tr>
<tr>
<td align="center" colspan="22" style=" border-right: 1 px;" > <hr style="border-top: thin 1px black; width:70%" /> </td>
<td align="center" colspan="12"> <hr style="border-top: thin 1px black; width:95%" /> </td>
</tr>
<tr>
<td align="center" colspan="22" style=" border-right: 1 px;" > ( ) </td>
<td colspan="12" style="font-size : 9pt; padding-left: 10pt; "> ( NAPAPORN CHARENDEESUBSIRI ) </td>
</tr>
<tr>
<td align="center" colspan="22" style=" border-right: 1 px;" class="thai"> วันที่ ............/............/............</td>
<td align="center" colspan="12"><b>Senior Treasury Manager</b> </td>
</tr>
</table>
</td></tr>
</table>
</macro>
</macrolist>
<style type="text/css">
.thai
{
font-family: NotoSans, NotoSansThai, sans-serif;
}
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;
}
</style>
</head>
<body header="nlheader" header-height="10%" footer="nlfooter" footer-height="8%" padding="0.5in 0.5in 0.5in 0.5in" size="A4">
<#if record.item?has_content>
<table class="header" style="width: 100%; margin-top: 10px;" >
<thead>
<tr>
<td align="left" style="width: 537px; height: 115px; padding-top:-10px"><#if subsidiary.logo?length != 0><img height="50px" src="${subsidiary.logo@url}" style="float: left; margin: 5px"
vertical-align="top" width="150px" /></#if> <b><span style="color:orange;" class="thai"> สำเนาใบแจ้งหนี้/สำเนาใบกำกับภาษี<br/> COPY INVOICE / COPY TAX INVOICE</span></b> </td>
<!--Nested Table starts -->
<td colspan="10" style="border: 0px; padding-right: 10px; padding-top :-10px; width: 350px;">
<table align="right" style="width:150%; margin-top: 8px; border:1px; border-color:#808080; ">
<tr style="border-bottom:2px; border-color:#808080; font-size: 12pt;">
<td align="right" colspan="6" style=" width: 160px; background-color:#A9A9A9;" class="thai"><b>เลขที่ : </b></td>
<td align="center" colspan="7" style="width: 200px;"><b>${record.tranid}</b></td>
</tr>
<tr style="font-size: 12pt;">
<td align="right" colspan="6" style=" text-align:right; border-color:#808080; width: 160px; background-color:#A9A9A9;" class="thai" ><b>วันที่ : </b></td>
<td align="center" colspan="7" style="width: 200px;"><b>${record.trandate}</b></td>
</tr>
<tr style="border-top:2px; border-color:#808080; font-size: 12pt;">
<td align="right" colspan="6" style=" text-align:left; border-color:#808080; width: 160px; background-color:#A9A9A9;" class="thai"><b>แผ่นที่: </b></td>
<td align="center" colspan="7" style="width: 200px; "><b><pagenumber/> / <totalpages/></b></td>
</tr>
</table>
<!--Nested table ends -->
</td>
</tr>
<!--header line 2-->
<tr>
<td style="padding-top:-30pt;">
<table style="width: 125%; border-top:1px;">
<tr>
<td class="thai" colspan="8" style=" border-right: 1 px black; padding-top:5pt;" ><b> <span style= "color:orange;"> ตัวหนังสือสีส้ม </span> </b>${Subsidiary.custrecord_rapid_tht_company_legalname} </td>
<td class="thai" colspan="8" style="padding-top:5pt;"><b> <span style= "color:orange; padding-left:5pt;"> ตัวหนังสือสีส้ม </span> </b> ${Subsidiary.legalname}</td>
</tr>
<tr>
<td class="thai" colspan="4" >1เลขประจำตัวผู้เสียภาษี ${subsidiary.federalidnumber}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black; padding-left:5pt;"> 2 โทร.${subsidiary.custrecord_gable_phone}</td>
<td class="thai" colspan="4" style=" padding-left:5pt;">3 TAX ID. ${subsidiary.federalidnumber}</td>
<td class="thai" colspan="4" >4 Tel. ${subsidiary.custrecord_gable_phone}</td>
</tr>
<tr>
<td class="thai" colspan="4" >5${subsidiary.custrecord_rapid_tht_company_addr1}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black; padding-left:5pt;" >6 แฟกซ์. ${subsidiary.fax}</td>
<td class="thai" colspan="4" style="padding-left:5pt;">7 ${subsidiary.custrecord_gable_address1_eng}</td>
<td class="thai" colspan="4" >8 Fax. ${subsidiary.fax}</td>
</tr>
<tr>
<td class="thai" colspan="4" >9${subsidiary.custrecord_rapid_tht_company_addr2} ${subsidiary.custrecord_rapid_tht_company_addr3}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black;"> </td>
<td class="thai" colspan="4" style="padding-left:5pt;">10 ${subsidiary.custrecord_gable_address2_eng}</td>
<td class="thai" colspan="4" ></td>
</tr>
<tr>
<td class="thai" colspan="4" >11 ${subsidiary.custrecord_rapid_tht_company_city} ${subsidiary.custrecord_rapid_tht_company_zip}</td>
<td class="thai" colspan="4" style=" border-right: 1 px black;"> </td>
<td class="thai" colspan="4" style="padding-left:5pt;">12 ${subsidiary.custrecord_gable_address3_eng}</td>
<td class="thai" colspan="4" ></td>
</tr>
</table>
</td>
</tr>
<!-- header line 2 ends -->
<!-- Header 3 starts-->
<tr>
<td>
<table class="body" style="width: 125%; margin-top: 10px;" border="1">
<tr>
<th align="center" class="thai" colspan="10" style=" border-right: 1px; border-bottom: 1px; font-size:12pt; background-color:#A9A9A9;">สถานที่ติดต่อลูกค้า <br/>Bill To Address</th>
<th align="center" class="thai" colspan="10" style=" border-bottom: 1px; font-size:12pt; background-color:#A9A9A9;"> สถานที่ส่งสินค้า <br/>Ship To Address</th>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left: 5px; ">ABC PVT LMT${record.entity.companyname}</td>
<td colspan="10" style=" padding-left:5pt;" >ABC PVT LMT${record.entity.companyname}</td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; "> ${record.billaddress}</td>
<td colspan="10" style=" padding-left:5pt;"> ${record.shipaddress}</td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; "> </td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; "> Phone:0432 4567 ${record.entity.phone} Fax: 1234${record.entity.fax}</td>
</tr>
<tr>
<td colspan="10" style=" border-right: 1 px; padding-left:5pt; " class="thai" > เลขประจำตัวผู้เสียภาษีอากร (Tax ID) : 123456 ${record.entity.vatregnumber}
<#if record.custbody_rapid_tht_entitybranch == "0">( สำนักงานใหญ่ )<#else> ( 00013 )</#if>
</td>
</tr>
</table>
</td>
</tr>
<!--Header 3 ends...-->
<!--Header 4 starts....(Table 6 colums) -->
<tr>
<td>
<table class="body" style=" width: 125%; border-left: 1px; border-right: 1px; border-bottom: 1pt ">
<tr>
<th align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> รหัสลูกค้า <br/> Customer ID </th>
<th align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> ใบสั่งซื้อ <br/> PO# </th>
<th align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> เลขที่สัญญา <br/> Contract# </th>
<th align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> สกุลเงิน <br/>Currency </th>
<th align="center" colspan="10" style=" border-right: 1 px; border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> พนักงานขาย <br/>Sales Person </th>
<th align="center" colspan="6" style=" border-bottom: 1 px; background-color:#A9A9A9; " class="thai"> เงื่อนไขการชำระเงิน <br/> Terms of Payment </th>
</tr>
<tr>
<td align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px;">${record.entity.entityid} </td>
<td align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px;">${record.otherrefnum}</td>
<td align="center" colspan="5" style=" border-right: 1 px; border-bottom: 1 px;">${record.cseg_project_order}</td>
<td align="center" colspan="4" style=" border-right: 1 px; border-bottom: 1 px;">${record.currency}</td>
<td align="center" colspan="10" style=" border-right: 1 px; border-bottom: 1 px;">${record.salesrep}</td>
<td align="center" colspan="6" style=" border-bottom: 1 px;">${record.terms}</td>
</tr>
<!--Header 4 ends -->
<!-- Header 5 starts (Table 5 columns)-->
<!--<tr>
<th align="center" colspan="2" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ลำดับที่ <br/> Seq.</th>
<th align="center" colspan="16" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> รหัส/รายการสินค้า <br/> Product/Description</th>
<th align="center" colspan="4" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> จำนวน <br/> Qty</th>
<th align="center" colspan="6" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ราคาหน่วยละ <br/> Unit Net Price</th>
<th align="center" colspan="6" style=" background-color:#A9A9A9;" class="thai"> จำนวนเงิน <br/> Amount</th>
</tr> -->
</table>
<!-- Header 5 ends-->
</td></tr>
</thead>
<!--Body part starts -->
<tbody>
<tr><td>
<table class="body" style=" width: 125%; border-left: 1px; border-right: 1px; border-bottom: 1pt ">
<tr>
<th align="center" colspan="2" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ลำดับที่ <br/> Seq.</th>
<th align="center" colspan="16" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> รหัส/รายการสินค้า <br/> Product/Description</th>
<th align="center" colspan="4" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> จำนวน <br/> Qty</th>
<th align="center" colspan="6" style=" border-right: 1 px; background-color:#A9A9A9; " class="thai"> ราคาหน่วยละ <br/> Unit Net Price</th>
<th align="center" colspan="6" style=" background-color:#A9A9A9;" class="thai"> จำนวนเงิน <br/> Amount</th>
</tr>
<#list record.item as item>
<tr>
<td align="center" colspan="2" style=" border-right: 1 px;" >${item?counter} </td>
<td align="right" colspan="16" style=" border-right: 1 px;" ><#if item.itemtype == "Hardware">HW<#elseif item.itemtype == "Software"> SW<#else>SV </#if> /${item.item} ${item.description}<br/>{record.custbody_gable_remark}</td>
<td align="right" colspan="4" style=" border-right: 1 px" >${item.quantity} </td>
<td align="right" colspan="6" style=" border-right: 1 px;" >${item.rate} </td>
<td align="right" colspan="6" >${item.amount} </td>
</tr>
</#list>
</table>
</td></tr>
<!--Summary section -->
<tr>
<td class="summaryTableBorder">
<table style="width:125%; height:100px;">
<tr>
<th align="left" colspan="22" style=" padding-left: 5px; border-right: 1px; border-left: 1px; background-color:#A9A9A9; " class="thai" > ทั้งหมด<br/><br/><br/> กรุณาหักภาษี ณ ที่จ่าย เฉพาะรายการ SW, SV เท่านั้น ยกเว้น</th>
<th align="left" colspan="6" style=" padding-left: 1px; border-right: 1px; background-color:#A9A9A9; font-size: 8px " class="thai">
รวมมูลค่าสินค้า (Subtotal) <br/><br/>
ส่วนลดสินค้า (Discount) <br/><br/>
ราคาสุทธิ (Net) <br/><br/>
ภาษีมูลค่าเพิ่ม (VAT 7.00%) <br/><br/>
รวมทั้งสิ้น (Total)
</th>
<th align="right" colspan="6" style=" border-right: 1px; background-color:#A9A9A9; font-size: 8px" >
${record.subtotal}<br/><br/>
${record.discounttotal}<br/><br/>
${record.subtotal}<br/><br/>
${record.taxtotal}<br/><br/>
${record.total}</th>
</tr>
</table>
</td>
</tr>
<!--Summary ends.... -->
</tbody>
<!--<tfoot>
<tr><td align="right" style="padding-right:-100px" class="thai"><br/>ยังมีรายการต่อ</td></tr>
</tfoot> -->
</table>
</#if>
</body>
</pdf>
</pdfset>
We need to create a custom transaction form ( Customization -> Forms -> Transaction Forms ) for the Invoice record and in the print option change the PDF template as you created above.
Then create a new Invoice record using the custom transaction form created and after that the print option will provide the customized PDF template.