Customized Sales Invoice

Hi Guys

Just wanted to share a sample Sales Invoice with you guys… Anyone who wants can use the html code
, however it might have some bugs.
Works best if you have a company logo and when converted to pdf.
Html code:

<table style="padding: 15px">
    <thead>
        <tr>
            <td colspan="99">
                <table style="margin-bottom: 20px"><tr>
                    {% if business.logo != null %}<td style="text-align: left"><img src="{{ business.logo }}" style="max-height: 150px; max-width: 300px"></td>{% endif %}
                    
                    <td style="padding-left: 20px; width: 250px">
                        <div style="text-align:center;background-color:#A9A9A9;font-weight: bold;color:#ffffff; font-size: 32px; white-space: nowrap;text-transform: uppercase;">TAX INVOICE</div>
                        <p style="color:#ffffff;">.</p>
                        <div style="text-align:right;font-weight: bold">{{ business.name }}</div>
                        <div style="text-align:right;font-weight: bold">{{ business.address | newline_to_br }}</div>
                        <div style="text-align:right;font-weight: bold">{{ business.identifier }}</div>
                    </td>
<tr></tr>
<tr></tr>                    
        <tr><td colspan="99">
            <div style="border-top-width: 1px; border-color: #A9A9A9; font-size: 2px; padding:0.5px; background-color: #A9A9A9; color: #ffffff">
            </div>
         </td></tr>
                </tr></table>
                <table style="margin-bottom: 20px"><tr>
                    <td style="padding-left: 30px">
                        <div style="font-weight: bold"><p>Bill To: {{ recipient.name }}</p></div>
                        <div>{{ recipient.address | newline_to_br }}</div>
                        <div>{{ recipient.identifier }}</div>
                    </td>
                     <td style="padding-right: 30px; text-align: right">
                       {% for field in fields %}
                       {% if (field.label != 'Invoice number') %}{% continue %}{% endif %}
                       <div><b>{{ field.label }}:</b> {{ field.text }}</div>
                       {% endfor %}

                       {% for field in fields %}
                       {% if (field.label == 'Invoice number') %}{% continue %}{% endif %}
                       <div><b>{{ field.label }}:</b> {{ field.text }}</div>
                       {% endfor %}
                     </td>
                </tr></table>
                
        <tr><td colspan="99">
            <div style="border-top-width: 1px; border-color: #A9A9A9; font-size: 2px; padding:0.5px; background-color: #A9A9A9; color: #ffffff">
            </div>
         </td></tr>

         <tr>
             <td colspan="99" style="padding: 20px; padding-top: 0px;text-align:center">
                {% for field in custom_fields %}
                {% if (field.label =='Notes') %}{% continue %}{% endif %}
                {% if field.label =='' %}{% continue %}{% endif %}
                <div style="padding-top:5px;text-align:center"><b>{{ field.label }}:</b>{{  field.text | newline_to_br}}</div>
                {% endfor %}
                {% for field in custom_fields %}
                {% if field.label !='' %}{% continue %}{% endif %}
                <div style="padding-top:5px;text-align:center"><b>{{ field.text }}</b></div>
                {% endfor %}

             </td>
            </tr>
         <tr>
        
        
        <tr>
            <td><div style="font-size: 14px; font-weight: bold; margin-bottom: 20px; padding: 0px 30px">{{ description }}</div></td>
        </tr>
        
         <tr>
            {% for column in table.columns %}            
            <td style="font-weight: bold; color: #ffffff; background-color: #A9A9A9; border-color: #A9A9A9; padding: 10px; text-align: {{ column.align }}{% if forloop.first %}; padding-left: 30px{% endif %}{% if forloop.last %}; padding-right: 30px{% endif %}{% if column.nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ column.label }}</td>
            {% endfor %}
        </tr>
    </tr></td></tr></thead>
    <tbody>
        {% for row in table.rows %}
        <tr>
            {% for cell in row.cells %}
            <td style="padding: 1px; text-align: {{ table.columns[forloop.index0].align }}; border-color: #F3F3F3; border-bottom-width: 1px{% if forloop.first %}; padding-left: 30px{% endif %}{% if forloop.last %}; padding-right: 30px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width:1px;{% endif %}">{{ cell.text | newline_to_br }}</td>
            {% endfor %}
        </tr>
        {% endfor %}
        {% for total in table.totals %}
        <tr>
            <td colspan="{{ table.columns | size | minus:1 }}" style="padding: 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold; font-size: 16px{% endif %}">{{ total.label }}</td>
            <td style="border-bottom-width: 1px; border-color: #C2CBCE; white-space: nowrap; padding: 10px; padding-left: 30px; text-align: right; padding-right: 30px{% if total.emphasis == true %}; font-weight: bold; color: #fff; background-color: #A9A9A9; font-size: 14px{% endif %}">{{ total.text }}</td>
        </tr>
        {% endfor %}
        
<tr></tr>
<tr></tr>
        <tr>
                   <td colspan="99" style="padding-left: 30px;">
                   {% for field in custom_fields %}
                   {% if field.label !='Notes' %}{% continue %}{% endif %}
                   <div><b>{{ field.label }}:</b>{{ field.text }}</div>
                   {% endfor %}
                   </td>
        </tr> 
        
    <tfoot>
         <tr>
          <td colspan="99">
            <div style="font-size: 14px; font-weight: bold;padding-left:30px;">AUTHORIZED SIGNATURE</div>
            <div style="font-size: 14px; font-weight: bold; margin-bottom:110px;padding-left:30px;">OWNER</div>
          </td>
         </tr>
        <tr><td colspan="99">
            <div style="border-top-width: 3px; border-color: #A9A9A9; font-size: 11px; padding: 10px 20px; background-color: #A9A9A9; color: #ffffff">
                <div style="font-weight: bold">{{ business.name }}</div>
                <div>{{ business.address }}</div>
                <div>{{ business.identifier }}</div>
            </div>
        </td></tr>
    </tfoot></tbody></table>

Thanks