summaryrefslogtreecommitdiff
path: root/src/invoice.c
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-21 23:09:57 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-21 23:09:57 +0200
commit8350815a8c6987b288551848eda1c678739c8d4a (patch)
tree04ef3c56e10fa8b06768465910d10a57779e8731 /src/invoice.c
parentbf9012dad7ef34bbbfb073bc0f37b0161f0496f3 (diff)
downloadbokf-8350815a8c6987b288551848eda1c678739c8d4a.tar.gz
bokf-8350815a8c6987b288551848eda1c678739c8d4a.zip
invoices: text rows, duplicate and payment link (schema v12); smtp address checksv0.1.62
Diffstat (limited to 'src/invoice.c')
-rw-r--r--src/invoice.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/invoice.c b/src/invoice.c
index 622c05a..34b2a85 100644
--- a/src/invoice.c
+++ b/src/invoice.c
@@ -430,6 +430,24 @@ static void draw_table(struct pdf *p, const struct invoice_doc *d)
const char *s = l->description ? l->description : "";
size_t line = 0;
+ if (l->is_text) {
+ for (;;) {
+ const char *nl = strchr(s, '\n');
+
+ if (nl) {
+ put_desc_line(p, y + desc_offset(line), s,
+ (size_t)(nl - s));
+ s = nl + 1;
+ line++;
+ } else {
+ put_desc_line(p, y + desc_offset(line), s, strlen(s));
+ break;
+ }
+ }
+ y += (double)(line + 2) * ROW_STEP;
+ continue;
+ }
+
fmt_quantity(l->quantity_milli, qty, sizeof qty);
fmt_kronor(l->unit_price_ore, price, sizeof price, 0, 0);
fmt_kronor(l->amount_ore, amount, sizeof amount, 0, 0);