<!-- Will omit the first br, br means a new line. Then the system can only read the second br as the first newline. -->
<br><br><br><br>
<table style="font-size:8pt;">
  <tr>
    <td style="line-height: 150%;" align="left"><span style="color: <?php echo $THEME_COLOR_2; ?>;"><?php echo $TPL_CENTER_NAME; ?></span>
      <br><span><?php echo $TPL_CENTER_TEL; ?></span>
      <br><span><?php echo $TPL_CENTER_ADDRESS; ?></span>
    </td>
  </tr>
</table>
<br>
<table style="font-size:8pt;">
  <tr>
    <td align="center" style="width: 100%; ">
      <h1><span style="font-size: x-large; color: <?php echo $THEME_COLOR_2; ?>;">發票 INVOICE</span></h1>
    </td>
  </tr>
</table>
<!-- Attribute Labels -->
<table style="font-size:8pt;">
  <tr>
    <!-- Do not adjust any indentation -->
    <td style="width:40%;" align="center" bgcolor="<?php echo $THEME_THEAD_BGCOLOR; ?>">
      <span></span><br><strong style="color: <?php echo $THEME_COLOR; ?>;">項目</strong><br><span style="color: <?php echo $THEME_COLOR; ?>;">Item Description</span><br><span></span>
    </td>
    <td style="width:15%;" align="center" bgcolor="<?php echo $THEME_THEAD_BGCOLOR; ?>">
      <span></span><br><span style="color: <?php echo $THEME_COLOR; ?>;">收費</span><br><span style="color: <?php echo $THEME_COLOR; ?>;">Price</span><br><span></span>
    </td>
    <td style="width:15%;" align="center" bgcolor="<?php echo $THEME_THEAD_BGCOLOR; ?>">
      <span></span><br><span style="color: <?php echo $THEME_COLOR; ?>;">數量</span><br><span style="color: <?php echo $THEME_COLOR; ?>;">Quantity</span><br><span></span>
    </td>
    <td style="width:15%;" align="center" bgcolor="<?php echo $THEME_THEAD_BGCOLOR; ?>">
      <span></span><br><span style="color: <?php echo $THEME_COLOR; ?>;">折扣</span><br><span style="color: <?php echo $THEME_COLOR; ?>;">Discount</span><br><span></span>
    </td>
    <td style="width:15%;" align="center" bgcolor="<?php echo $THEME_THEAD_BGCOLOR; ?>">
      <span></span><br><span style="color: <?php echo $THEME_COLOR; ?>;">實價</span><br><span style="color: <?php echo $THEME_COLOR; ?>;">Total</span><br><span></span>
    </td>
  </tr>
  <tr>
    <td style="width:100%; line-height: 20%;" align="center"><table style="border-bottom: 1px solid <?php echo $THEME_THEAD_COLOR_BORDER_BOTTOM; ?>;"><tr><td align="center"></td></tr></table></td>
  </tr>
</table>
<?php echo $_INVOICE_ITEM_HTML; ?>
<br>
<br>
<!-- Double line, each line will be illustrated by table border-bottom property-->
<!-- Spaces between line can be adjusted by line-height -->
<table style="font-size:8pt;">
  <tr>
    <td style="width: 82%; line-height: 150%;" align="right">
      <span style="color: <?php echo $THEME_COLOR; ?>;">應繳款項總額 TOTAL AMOUNT DUE: </span>
    </td>
    <td style="width: 18%; line-height: 150%;" align="center">
      <table style="border-bottom: 1px solid <?php echo $THEME_THEAD_COLOR_BORDER_BOTTOM; ?>;">
        <tr>
          <td align="center"><?php echo $TOTAL_AMOUNT_DUE; ?></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td style="width: 82%; line-height: 35%;" align="right">
    </td>
    <td style="width: 18%; line-height: 35%;" align="center">
      <table style="border-bottom: 1px solid <?php echo $THEME_THEAD_COLOR_BORDER_BOTTOM; ?>;">
        <tr>
          <td align="center"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<?php if(!empty($TOC)):?>
<table style="font-size:8pt;">
  <tr>
    <td align="center" style="width: 100%; ">
      <p><span style="font-size: 6px; color: <?php echo $THEME_COLOR_2; ?>;">發票條款 TERMS AND CONDITIONS OF INVOICE</span></p>
    </td>
  </tr>
  <tr><td align="justify" style="width:100%;font-size:6px;"><?php echo $TOC;?></td></tr>
</table>
<?php endif;?>
