<style type="text/css">
    td {
    font-family: Calibri;
    color: #595959;
    }
    .heading {
    font-size: 22pt;
    font-family: Calibri;
    color: #595959;
    }
    .subheading{
    font-size: 14pt;
    color: #595959;
    font-family: Calibri;
    font-weight: bold;
    }
    .full {
    width: 95%;
    }
    .half {
    width: 50%;
    }
    .third {
    width: 33.3%;
    }
    .fourth {
    width: 25%;
    }
    .forty{
    width:40%;
    }
    .twenty{
    width:20%;
    }
    .right {
    text-align: right;
    }
    .spacer {
    height: 20px;
    }
    .shim {
    height: 10px;
    }
    div {
    position: relative;
    float: left;
    }
    .mainInfo{
    font-size: 10pt;
    color: #595959;
    font-family: Calibri;
    font-weight: bold;
    }
    .subInfo{
    font-size: 9pt;
    color: #595959;
    font-family: Calibri;
    }
    .contactInfo{
    font-size: 10pt;
    color: #595959;
    font-family: Calibri;
    }
</style>
<table class="full" cellpadding="0" cellspacing="0" border="0">
    <tbody>
        <tr>
            <td class="heading">{logo}</td>
            <td class="forty"><span class="heading">{heading}</span>
            <br />
            <span class="contactInfo"><br />
            {contactDetails}</span></td>
        </tr>
    </tbody>
</table>
<table>
    <tbody>
        <tr>
            <td class="spacer"></td>
        </tr>
    </tbody>
</table>
<table class="full" cellpadding="0" cellspacing="0" border="0">
    <tbody>
        <tr>
            <td class="forty">
            <table class="full" cellpadding="0" cellspacing="0" border="0">
                <tbody>
                    <tr>
                        <td class="subheading">{To}</td>
                    </tr>
                    <tr>
                        <td class="mainInfo">{oSales.name}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{oSales.postalAddress}</td>
                    </tr>
                    <tr>
                        <td><br />
                        </td>
                    </tr>
                    <tr>
                        <td class="mainInfo">{ToTaxDisplayname}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{ToTaxNumber}</td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="forty">
            <table class="full" cellpadding="0" cellspacing="0" border="0">
                <tbody>
                    <tr>
                        <td class="subheading">{From}</td>
                    </tr>
                    <tr>
                        <td class="mainInfo">{FromName}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{FromAddress}</td>
                    </tr>
                    <tr>
                        <td><br />
                        </td>
                    </tr>
                    <tr>
                        <td class="mainInfo">{FromTaxDisplayname}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{FromTaxDisplayNumber}</td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="twenty">
            <table class="full" cellpadding="0" cellspacing="0" border="0">
                <tbody>
                    <tr>
                        <td class="subInfo">{DocNum}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{DocDate}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{AccountNumber}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{Reference}</td>
                    </tr>
                    <tr>
                        <td class="subInfo">{Attention}</td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>