From abf052a213f416a7f90942f8da71e5ccbd091483 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Mon, 5 Oct 2020 22:48:22 +0800 Subject: [PATCH] [html-utilities][API] add gnc:html-invoice-doclink-anchor --- gnucash/report/html-utilities.scm | 8 ++++++++ gnucash/report/report.scm | 1 + 2 files changed, 9 insertions(+) diff --git a/gnucash/report/html-utilities.scm b/gnucash/report/html-utilities.scm index d5bda78a31..d536201e06 100644 --- a/gnucash/report/html-utilities.scm +++ b/gnucash/report/html-utilities.scm @@ -48,6 +48,9 @@ (define (gnc:transaction-doclink-anchor-text trans) (gnc:register-guid "trans-doclink-guid=" (gncTransGetGUID trans))) +(define (gnc:invoice-doclink-anchor-text invoice) + (gnc:register-guid "invoice-doclink-guid=" (gncInvoiceReturnGUID invoice))) + (define (gnc:report-anchor-text report-id) (gnc-build-url URL-TYPE-REPORT (string-append "id=" (number->string report-id)) @@ -159,6 +162,11 @@ (gnc:transaction-doclink-anchor-text trans) text))) +(define (gnc:html-invoice-doclink-anchor invoice text) + (gnc:make-html-text (gnc:html-markup-anchor + (gnc:invoice-doclink-anchor-text invoice) + text))) + (define (gnc:html-price-anchor price value) (gnc:make-html-text (if price (gnc:html-markup-anchor diff --git a/gnucash/report/report.scm b/gnucash/report/report.scm index 9218e745e3..7791d969e3 100644 --- a/gnucash/report/report.scm +++ b/gnucash/report/report.scm @@ -93,6 +93,7 @@ (export gnc:html-split-anchor) (export gnc:html-transaction-anchor) (export gnc:html-transaction-doclink-anchor) +(export gnc:html-invoice-doclink-anchor) (export gnc:html-price-anchor) (export gnc:customer-anchor-text) (export gnc:job-anchor-text)