Skip to content

Commit b871d0b

Browse files
fix(template): show issuer name in Bill From; ignore empty string fields; nudge invoice number 2pt down
- vienna: drop `show-name: false` on the issuer party-block so the recipient sees the issuer name in Bill From (the hero already shows it, but customers expect it duplicated in the address block on paper invoices). - components: `has()` was treating "" the same as a real value, leaving a blank line whenever a field was cleared via the CLI's empty-string update path. Reject empty strings alongside `none`. - vienna: bump the `№ <number>` baseline by +2pt (visually ~2px) so the number sits a touch lower under the title bar instead of crowding the rule.
1 parent 5fd87e4 commit b871d0b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

typst/shared/components.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#let party-block(party, theme, label-text: "To", show-name: true) = {
8080
let mute = th(theme, "mute", rgb("#666"))
8181
let display = th(theme, "display-font", ("Helvetica Neue", "Helvetica", "Arial", "New Computer Modern"))
82-
let has(k) = k in party and party.at(k) != none
82+
let has(k) = k in party and party.at(k) != none and party.at(k) != ""
8383
lbl(theme, label-text)
8484
v(sp.s)
8585
if show-name {

typst/templates/vienna.typ

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
],
7979
)
8080

81-
#v(-2mm)
81+
#v(-2mm + 2pt)
8282
#align(right)[
8383
#fit-size(
8484
(9pt, 8.5pt, 8pt),
@@ -100,7 +100,7 @@
100100
columns: (1fr, 1fr),
101101
column-gutter: 14mm,
102102
party-block(d.client, theme, label-text: "Bill to"),
103-
party-block(d.issuer, theme, label-text: "Bill from", show-name: false),
103+
party-block(d.issuer, theme, label-text: "Bill from"),
104104
)
105105

106106
#v(mm-sp.s)

0 commit comments

Comments
 (0)