Can I use the footer to write at the top of the invoice?

Can I use the footer to write at the top of the invoice?


bill to
bill from
I don’t want to use custom theme

1 Like

Footer script

<script>
    function addLabel(elementId, text) {
        const targetDiv = document.getElementById(elementId);
        const label = document.createElement("span");
        label.textContent = text;
        label.style.fontSize = "16px";
        label.style.fontWeight = "bold";
        label.style.fontStyle = "italic";
        label.style.color = "red";
        targetDiv.insertAdjacentElement("beforebegin", label);
    }
    
    addLabel("RecipientName", "BILL TO");
    addLabel("BusinessName", "BILL FROM");
</script>

3 Likes

work 100%


Can this be done to cancel the invoice date? The time and date appear from the Custom Fields.

Replace Invoice Date value with Created Date Value.

Change UUID Custom Field “a1b2c3d4-e5f6-4abc-8def-abcdef000020” with your Created Date Custom Field UUID

<script>

    function addLabel(elementId, text) {
        const targetDiv = document.getElementById(elementId);
        const label = document.createElement("span");
        label.textContent = text;
        label.style.fontSize = "16px";
        label.style.fontWeight = "bold";
        label.style.fontStyle = "italic";
        label.style.color = "red";
        targetDiv.insertAdjacentElement("beforebegin", label);
    }
    
    addLabel("RecipientName", "BILL TO");
    addLabel("BusinessName", "BILL FROM");

    const sourceDiv = document.getElementById("a1b2c3d4-e5f6-4abc-8def-abcdef000020");
    const invoiceDateDiv = document.getElementById("InvoiceDate");
    
    if (sourceDiv && invoiceDateDiv) {
        invoiceDateDiv.textContent = sourceDiv.textContent;
    }
    
    if (sourceDiv) {
        const parentTd = sourceDiv.closest("td");
        if (parentTd) {
            const divsToRemove = parentTd.querySelectorAll("div");
            divsToRemove.forEach(div => div.remove());
        }
    }
    
</script>
3 Likes

Thank you very much

A post was split to a new topic: Improve the space in the invoice footer

It is not allowed to start new issues under an existing topic because it is confusing. I therefore moved your last post about space in footer to a new topic. As you marked this topic as solved it will also be closed.