I have created a custom sales order and when I save, I get this error:
Error on line 119, column 3 in template.
The element type "table" must be terminated by the matching end-tag "</table>".
I have gone over the code several times and all the <table> elements have a corresponding closing tag.
Here is the code:
<?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 rowspan="3"><#if companyInformation.logoUrl?length != 0><img src="${companyInformation.logoUrl}" style="float: left; margin: 7px" /> </#if> <span class="nameandaddress">${companyInformation.companyName}</span><br /><span class="nameandaddress">${companyInformation.addressText}</span></td>
<td align="right"><span class="title">${record@title}</span></td>
</tr>
<tr>
<td align="right"><span class="number">#</span><span style="font-size:20px;">${record.custbody1}</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">* {
<#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;
}
td.addressheader {
font-size: 8pt;
padding-top: 6px;
padding-bottom: 2px;
}
td.address {
padding-top: 0;
}
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;
}
li p {
padding-top:5px;
font-family:NotoSans, sans-serif;
}
.item {font-weight:bold;border-bottom: 1 solid;padding-top:10px;}
.kititem {border-bottom: 1 dotted #bbb;}
</style>
THE NEXT LINE IS LINE 19 AS REFERRED TO IN THE ERROR
<body header="nlheader" header-height="10%" 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 class="addressheader"><b>${record.shipaddress@label}</b></td>
</tr>
<tr>
<td class="address">${record.shipaddress}</td>
</tr></table>
<table class="body" style="width: 100%; margin-top: 10px;"><tr>
<th>${record.shipmethod@label}</th>
</tr>
<tr>
<td>${record.shipmethod}</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>${item.item@label}</th>
<th>${item.description@label}</th>
<th>${item.quantity@label}</th>
</tr>
</thead>
</#if><#if item.custcol5=true><#if item.itemtype="Kit/Package"><tr style="font-weight:bold"><#else></tr>
<tr style="font-weight:normal"></#if>
<td class="item" font-size="10pt">${item.item}</td>
<td class="item" font-size="9pt">${item.description}</td>
<td align="center" class="item">${item.quantity}</td>
</tr>
<#else>
<tr>
<td class="kititem" font-size="9pt"> ${item.item}</td>
<td class="kititem" font-size="8pt">${item.description}</td>
<td align="center" class="kititem">${item.quantity}</td>
</tr>
</#if></#list><!-- end items --></table>
</#if>
<div style="background-color:#f6f6f6;padding:5px;">
<p style="font-size:20px;font-weight:bold;text-align:center;">RETURN POLICY</p>
<p style="font-size:10px;padding-top:-15px;">Subject to the following conditions, Flounder Pounder Marine will issue refunds on products returned undamaged if received <strong>WITHIN 30 DAYS FROM THE DATE OF PURCHASE. RETURNS WILL NOT BE ACCEPTED AFTER 30 DAYS</strong></p>
<ul style="font-size:10px;">
<li>Any order placed online or by phone may be cancelled by calling us by 3pm eastern time on the day the order was placed. Cancellations after that time are considered returns, and subject to the restocking fees outlined below.</li>
<li>There is a <strong>20% restocking fee</strong> on all returns under $50 and a <strong>10% restocking fee</strong> on items over $50. There will be a <strong>30% restocking fee</strong> for undamaged propellers that are returned. <strong>NO REFUND FOR ANY PROPELLER THAT HAS BEEN DAMAGED</strong></li>
<li>No refunds on electrical items. We test all electrical parts, gauges, and equipment for proper operation prior to shipping.</li>
<li>There are also no refunds on cut-lengths of product, special order items, “sale” or “liquidation” items.</li>
<li>Unless the return is due to an error on our part, we do not refund shipping costs, and the customer is responsible for return shipping.</li>
</ul>
<p style="font-size:10px;">If you have a question or a request for refund or exchange, please call us at 321-639-2951</p>
</div>
</body>
</pdf>
Thank you for any assistance.
-Sean