How to add line between row 1 and row 2 in sales invoice

Help me Please, How to add line between row 1 and row 2 in sales invoice
like this image, thank you

by clicking Add Line in New or Edit mode
image

Use footer, you can insert into existing footer or create new footer

<div id='line-border' style='display: none;'>
<script>
document.addEventListener('DOMContentLoaded', function() {
    const printableContent = document.getElementById('printable-content');
    if (printableContent) {
        const table = printableContent.querySelector('table');
        if (table) {
            const tbodies = table.querySelectorAll('tbody');
            tbodies.forEach(tbody => {
                const tds = tbody.querySelectorAll('td');
                tds.forEach(td => {
                    if (td.className && td.className.trim() !== '') {
                        td.style.borderTop = '1px solid black';
                    }
                });
            });
        }
    }
    const selfDeletingContainer = document.getElementById('line-border');
            if (selfDeletingContainer) {
                selfDeletingContainer.remove();
            }
});
</script>
</div>
5 Likes

thanks sir

how to use this footer if we use our custome theme, ? if we use custome theme this code cant works, thans for advanced

If you are using custom themes, you should not use these script in footers, you can directly change the html code in custom themes. This is much better than using script in footers.

3 Likes

can you help me to give that code in custome theme

border-bottom-width: 1px; border-bottom-color: #000000; border-bottom-style: solid;
    <tbody>
        {% for row in table.rows %}
        <tr>
            {% for cell in row.cells %}
            <td style="writing-mode: horizontal-tb; border-bottom-width: 1px; border-bottom-color: #000000; border-bottom-style: solid; border-inline-start-width: 1px; border-inline-start-style: solid; border-inline-start-color: #000; {% if forloop.last == true %} border-inline-end-width: 1px; border-inline-end-style: solid; border-inline-end-color: #000{% endif %}; padding: 5px 10px; text-align: {{ table.columns[forloop.index0].align }}; {% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ cell.text | newline_to_br }}</td>
            {% endfor %}
        </tr>
        {% endfor %}
        <!-- tr>
        {% for column in table.columns %}
            <td style="writing-mode: horizontal-tb; border-inline-start-width: 1px; border-inline-start-style: solid; border-inline-start-color: #000; {% if forloop.last == true %} border-inline-end-width: 1px; border-inline-end-style: solid; border-inline-end-color: #000{% endif %}; border-bottom-width: 1px; border-bottom-color: #000000; border-bottom-style: solid">&nbsp;</td>
        {% endfor %}
        </tr -->

3 Likes

this works thanks a lot

Hello can add row lines into reports like this
! For invoice it can be done but how to do it for reports
19a9be1b3642cc82dc44b252bd5f804cca82bf6f|690x194