mirror of
https://github.com/kbenestad/invoice.git
synced 2026-06-18 16:14:33 +00:00
Fix line amount top-alignment and PDF contact line wrapping
Remove align-self:center from line total span so it sits at the top of the row. Use sp()+forEach in buildPDF to wrap sender and charge-to contact lines within their column instead of overflowing. https://claude.ai/code/session_01MkM7p8Us3L8YAfLKGA13NS
This commit is contained in:
parent
69e4ad9624
commit
2dde3450d9
1 changed files with 7 additions and 3 deletions
|
|
@ -1068,7 +1068,7 @@ function addLine() {
|
||||||
<input type="number" id="price-${i}" class="kb-input num" value="" min="0" step="any"
|
<input type="number" id="price-${i}" class="kb-input num" value="" min="0" step="any"
|
||||||
oninput="calcLine(${i});saveLines()" disabled>
|
oninput="calcLine(${i});saveLines()" disabled>
|
||||||
<span class="r kb-mono" id="ltv-${i}"
|
<span class="r kb-mono" id="ltv-${i}"
|
||||||
style="font-size:var(--fs-base);font-weight:600;align-self:center">0.00</span>
|
style="font-size:var(--fs-base);font-weight:600">0.00</span>
|
||||||
<button type="button" class="kb-circbtn kb-circbtn--rm" onclick="removeLine(${i})"
|
<button type="button" class="kb-circbtn kb-circbtn--rm" onclick="removeLine(${i})"
|
||||||
aria-label="Remove">−</button>`;
|
aria-label="Remove">−</button>`;
|
||||||
tbody.appendChild(div);
|
tbody.appendChild(div);
|
||||||
|
|
@ -1526,7 +1526,8 @@ function buildPDF() {
|
||||||
if (sPh) parts.push(`${td("sender-phone")}: ${sPh}`);
|
if (sPh) parts.push(`${td("sender-phone")}: ${sPh}`);
|
||||||
if (sEm) parts.push(`${td("sender-email")}: ${sEm}`);
|
if (sEm) parts.push(`${td("sender-email")}: ${sEm}`);
|
||||||
if (sTax) parts.push(`${td("vat-id")}: ${sTax}`);
|
if (sTax) parts.push(`${td("vat-id")}: ${sTax}`);
|
||||||
fn(8); tc(107,114,128); tL(parts.join(" "), ML, ly); ly += 5;
|
fn(8); tc(107,114,128);
|
||||||
|
sp(parts.join(" "), LW).forEach(l => { tL(l, ML, ly); ly += 4; }); ly += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fb(24); tc(30,45,69); tR(td("invoice"), XR, ry); ry += 10;
|
fb(24); tc(30,45,69); tR(td("invoice"), XR, ry); ry += 10;
|
||||||
|
|
@ -1557,7 +1558,10 @@ function buildPDF() {
|
||||||
if (ctEm) ctParts.push(`${td("charge-to-email")}: ${ctEm}`);
|
if (ctEm) ctParts.push(`${td("charge-to-email")}: ${ctEm}`);
|
||||||
if (ctVat) ctParts.push(`${td("vat-id")}: ${ctVat}`);
|
if (ctVat) ctParts.push(`${td("vat-id")}: ${ctVat}`);
|
||||||
if (ctReg) ctParts.push(`${td("registration-no")}: ${ctReg}`);
|
if (ctReg) ctParts.push(`${td("registration-no")}: ${ctReg}`);
|
||||||
if (ctParts.length) { fn(8); tc(107,114,128); tL(ctParts.join(" "), ML, ly2); ly2 += 5; }
|
if (ctParts.length) {
|
||||||
|
fn(8); tc(107,114,128);
|
||||||
|
sp(ctParts.join(" "), LW).forEach(l => { tL(l, ML, ly2); ly2 += 4; }); ly2 += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pTerm > 0 || showBank) {
|
if (pTerm > 0 || showBank) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue