<style type="text/css">
    body {
        font-family: Arial;
    }
</style>
<div style="padding:40px;font-family: Arial;" id="invoice-table">
    <table border="0" cellspacing="0" width="100%">
        <tbody>
            <tr id="invoice-header">
                <td width="66%" valign="middle" align="left" colspan="2" style="padding-left:10px">
                    <span style="font-size:18px;font-weight:bold;color:#484740;">{$companylogo}</span>
                    <span style="font-size:18px;font-weight:bold;color:#A4A4A4">{$invoice.number}</span>
                </td>
                
                <td valign="middle" align="right">
                    <table cellpadding="2"  cellspacing="0" border="0">
                        <tr>
                            <td align="right"><span style="font-size:12px;font-weight:bold">{$lang.invoice}</span></td>
                            <td align="left"><span style="font-size:12px">{$invoice.id}</span></td>
                        </tr>
                        <tr>
                            <td align="right"><span style="font-size:12px;font-weight:bold">{$lang.invoice_date}</span></td>
                            <td align="left"><span style="font-size:12px">{$invoice.date}</span></td>
                        </tr>
                        <tr>
                            <td align="right"><span style="font-size:12px;font-weight:bold">{$lang.invoice_due}</span></td>
                            <td align="left"><span style="font-size:12px">{$invoice.duedate}</span></td>
                        </tr>
                    </table>

                </td>
            </tr>


            <tr id="invoice-details">
                <td valign="top" style="padding-top:40px" width="33%">
                    <span style="font-size:12px;font-weight:bold;">{$lang.invoice_to}</span><br/>
                    <span style="font-size:11px">{$client.companyname}<br/>
                        {$client.firstname} {$client.lastname}<br />
                        {$client.address1} <br />
                        {$client.address2}<br />
                        {$client.city}, {$client.state}{$client.postcode}<br />
                        {$client.country}
                    </span>

                </td>
                <td valign="top"  style="padding-top:40px" width="33%">
                    <span style="font-size:12px;font-weight:bold;">{$lang.invoice_from}</span><br/>
                    <span style="font-size:11px">{$invoicefrom}</span>
                </td>
                <td valign="top"  style="padding-top:40px" align="left"  width="33%">
                    <table cellpadding="2"  cellspacing="0" border="0">
                        <tr>
                            <td align="right"><span style="font-size:12px;font-weight:bold;">{$lang.status}:</span></td>
                            <td align="left"><span style="font-size:12px;font-weight:bold;">{$invoice.status}</span></td>
                        </tr>
                        <tr>
                            <td align="right"><span style="font-size:12px;font-weight:bold;">{$lang.balance}:</span></td>
                            <td align="left"><span style="font-size:12px;font-weight:bold;">{$transbalance}</span></td>
                        </tr>
                    </table>
                </td>
            </tr>

        </tbody>
    </table>



    <table class="invoice-table" width="100%" border="0" cellpadding="6" cellspacing="0" style="margin-top:50px;width:100%;">
        <tbody>
            <tr>
                <td  align="left" bgcolor="#f0f0f0"  valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.invoice_desc}</span></td>
                <td style="width:7%"  align="center" bgcolor="#f0f0f0" valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.invoice_tax}</span></td>
                <td style="width:15%"  align="right" bgcolor="#f0f0f0" valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.unitcost}</span></td>
                <td style="width:7%"  align="center" bgcolor="#f0f0f0" valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.qty}</span></td>
                <td style="width:15%"  align="right" bgcolor="#f0f0f0" valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.price}</span></td>
            </tr>


            <tr>
                <td style="border-bottom: 1px solid #F0F0F0;"  valign="middle" ><span style="font-size:11px">{$item.description}</span></td>
                <td style="border-bottom: 1px solid #F0F0F0;" align="center"  valign="middle" ><span style="font-size:11px">{$item.taxed}</span></td>
                <td style="border-bottom: 1px solid #F0F0F0;" align="right"  valign="middle" ><span style="font-size:11px">{$item.amount}</span></td>
                <td style="border-bottom: 1px solid #F0F0F0;" align="center"  valign="middle" ><span style="font-size:11px">{$item.qty}</span></td>
                <td style="border-bottom: 1px solid #F0F0F0;" align="right"  valign="middle" ><span style="font-size:11px">{$item.linetotal}</span></td>
            </tr>

            <tr>
                <td class=""></td>
                <td align="right" colspan="2"  valign="middle" ><span style="font-size:12px;font-weight:bold;">{$lang.subtotal}</span></td>
                <td align="right" colspan="2"   valign="middle" ><span style="font-size:12px">{$invoice.subtotal}</span></td>
            </tr>
            <tr>
                <td class=""></td>
                <td align="right" colspan="2"  valign="middle" ><span style="font-size:12px;font-weight:bold;">{$lang.credit}</span></td>
                <td align="right" colspan="2"   valign="middle" ><span style="font-size:12px">{$invoice.credit}</span></td>
            </tr>

            <tr>
                <td class=""></td>
                <td align="right" colspan="2"  valign="middle" ><span style="font-size:12px;font-weight:bold;">{$lang.tax} ({$invoice.taxrate}%)</span></td>
                <td align="right" colspan="2"  valign="middle" ><span style="font-size:12px">{$invoice.tax}</span></td>
            </tr>

            <tr>
                <td class=""></td>
                <td align="right" colspan="2"   valign="middle" ><span style="font-size:12px;font-weight:bold;">{$lang.tax} ({$invoice.taxrate2}%)</span></td>
                <td align="right" colspan="2"  valign="middle" ><span style="font-size:12px">{$invoice.tax2}</span></td>
            </tr>


            <tr>
                <td class=""></td>
                <td align="right" colspan="2"  valign="middle" ><span style="font-size:14px; font-weight:bold;">{$lang.total}</span></td>
                <td align="right" colspan="2"   valign="middle" ><span style="font-size:14px; font-weight:bold;">{$invoice.total}</span></td>
            </tr>
        </tbody>
    </table>


    <table  width="100%" border="0" cellpadding="0" cellspacing="0"  style="margin-top:50px;">
        <tr><td align="left"  valign="middle" style="width:100%">
                <span style="font-size:11px;"><em>{$invoice.notes}</em></span>
            </td></tr>
    </table>



    <table class="invoice-table-transaction" width="100%" border="0" cellpadding="6" cellspacing="0" style="margin-top:50px;">
        <tbody>
            <tr>
                <td colspan="4" style="width:100%">
                    <span style="font-size:11px;font-weight:bold;">{$lang.related_trans}</span>
                </td>
            </tr>
            <tr>
                <td   bgcolor="#f0f0f0" align="left"   valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.trans_date}</span></td>
                <td  align="center" bgcolor="#f0f0f0"   valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.trans_gtw}</span></td>
                <td  align="center" bgcolor="#f0f0f0"   valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.trans_id}</span></td>
                <td  align="right" bgcolor="#f0f0f0"   valign="middle" ><span style="font-size:11px;font-weight:bold">{$lang.trans_amount}</span></td>
            </tr>
            <tr>
                <td align="left"  valign="middle" style="border-bottom: 1px solid #F0F0F0;"><span style="font-size:11px">{$transaction.date}</span></td>
                <td align="center"   valign="middle" style="border-bottom: 1px solid #F0F0F0;"><span style="font-size:11px">{$transaction.module}</span></td>
                <td align="center"   valign="middle" style="border-bottom: 1px solid #F0F0F0;"><span style="font-size:11px">{$transaction.trans_id}</span></td>
                <td align="right" valign="middle" style="border-bottom: 1px solid #F0F0F0;"><span style="font-size:11px">{$transaction.amount}</span></td>
            </tr>
            <tr>
                <td class="" ></td>
                <td class=""></td>
                <td align="right"   valign="middle" ><span style="font-size:11px;font-weight:bold;">{$lang.balance}</span></td>
                <td  align="right"   valign="middle" ><span style="font-size:11px;font-weight:bold;">{$transbalance}</span></td>
            </tr>
        </tbody>
    </table>


    <table  width="100%" border="0" cellpadding="0" cellspacing="0"  style="margin-top:50px;">
        <tr><td align="center" style="border-top:1px solid #F0F0F0;padding-top:10px;width:100%">
                <span style="font-size:11px;color:#A4A4A4">{$invoiceFooter}</span>
            </td></tr>
    </table>
</div>