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:
Claude 2026-06-08 04:46:10 +00:00
parent 69e4ad9624
commit 2dde3450d9
No known key found for this signature in database

View file

@ -1068,7 +1068,7 @@ function addLine() {
<input type="number" id="price-${i}" class="kb-input num" value="" min="0" step="any"
oninput="calcLine(${i});saveLines()" disabled>
<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})"
aria-label="Remove">&#x2212;</button>`;
tbody.appendChild(div);
@ -1526,7 +1526,8 @@ function buildPDF() {
if (sPh) parts.push(`${td("sender-phone")}: ${sPh}`);
if (sEm) parts.push(`${td("sender-email")}: ${sEm}`);
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;
@ -1557,7 +1558,10 @@ function buildPDF() {
if (ctEm) ctParts.push(`${td("charge-to-email")}: ${ctEm}`);
if (ctVat) ctParts.push(`${td("vat-id")}: ${ctVat}`);
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) {