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
Can I use the footer to write at the top of the invoice?
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>
work 100%
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>
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.