html-utilities.scm (gnucash-5.0.tar.bz2) | : | html-utilities.scm (gnucash-5.1.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 104 | skipping to change at line 104 | |||
(gnc:register-guid "trans-guid=" (gncTransGetGUID trans))) | (gnc:register-guid "trans-guid=" (gncTransGetGUID trans))) | |||
(define (gnc:transaction-doclink-anchor-text trans) | (define (gnc:transaction-doclink-anchor-text trans) | |||
(gnc:register-guid "trans-doclink-guid=" (gncTransGetGUID trans))) | (gnc:register-guid "trans-doclink-guid=" (gncTransGetGUID trans))) | |||
(define (gnc:invoice-doclink-anchor-text invoice) | (define (gnc:invoice-doclink-anchor-text invoice) | |||
(gnc:register-guid "invoice-doclink-guid=" (gncInvoiceReturnGUID invoice))) | (gnc:register-guid "invoice-doclink-guid=" (gncInvoiceReturnGUID invoice))) | |||
(define (gnc:report-anchor-text report-id) | (define (gnc:report-anchor-text report-id) | |||
(gnc-build-url URL-TYPE-REPORT | (gnc-build-url URL-TYPE-REPORT | |||
(string-append "id=" (number->string report-id)) | (string-append "id=" (number->string report-id)) | |||
"")) | "")) | |||
(define (gnc:price-anchor-text price) | (define (gnc:price-anchor-text price) | |||
(gnc-build-url URL-TYPE-PRICE | (gnc-build-url URL-TYPE-PRICE | |||
(string-append "price-guid=" (gncPriceGetGUID price)) | (string-append "price-guid=" (gncPriceGetGUID price)) | |||
"")) | "")) | |||
(define (guid-ref idstr type guid) | (define (guid-ref idstr type guid) | |||
(gnc-build-url type (string-append idstr guid) "")) | (gnc-build-url type (string-append idstr guid) "")) | |||
(define (gnc:customer-anchor-text customer) | (define (gnc:customer-anchor-text customer) | |||
(guid-ref "customer=" URL-TYPE-CUSTOMER (gncCustomerReturnGUID customer))) | (guid-ref "customer=" URL-TYPE-CUSTOMER (gncCustomerReturnGUID customer))) | |||
(define (gnc:job-anchor-text job) | (define (gnc:job-anchor-text job) | |||
(guid-ref "job=" URL-TYPE-JOB (gncJobReturnGUID job))) | (guid-ref "job=" URL-TYPE-JOB (gncJobReturnGUID job))) | |||
skipping to change at line 169 | skipping to change at line 169 | |||
(if date (format #f "&enddate=~a" date) "") | (if date (format #f "&enddate=~a" date) "") | |||
(if (null? acc) "" (string-append "&acct=" (gncAccountGetGUID acc)))) | (if (null? acc) "" (string-append "&acct=" (gncAccountGetGUID acc)))) | |||
""))) | ""))) | |||
;; Make a new report and return the anchor to it. The new report of | ;; Make a new report and return the anchor to it. The new report of | |||
;; type 'reportname' will have the option values copied from | ;; type 'reportname' will have the option values copied from | |||
;; 'src-options', and additionally this function sets all options | ;; 'src-options', and additionally this function sets all options | |||
;; according to 'optionlist'. Each element of optionlist is a list of | ;; according to 'optionlist'. Each element of optionlist is a list of | |||
;; section, name, and value of the function. | ;; section, name, and value of the function. | |||
(define (gnc:make-report-anchor reportname src-report | (define (gnc:make-report-anchor reportname src-report | |||
optionlist) | optionlist) | |||
(let ((src-options (gnc:report-options src-report)) | (let ((src-options (gnc:report-options src-report)) | |||
(options (gnc:make-report-options reportname))) | (options (gnc:make-report-options reportname))) | |||
(if options | (if options | |||
(begin | (begin | |||
(gnc:options-copy-values src-options options) | (gnc:options-copy-values src-options options) | |||
(for-each | (for-each | |||
(lambda (l) | (lambda (l) | |||
(gnc-set-option (gnc:optiondb options) (car l) (cadr l) (caddr l))) | (gnc-set-option (gnc:optiondb options) (car l) (cadr l) (caddr l))) | |||
optionlist) | optionlist) | |||
(let ((id (gnc:make-report reportname options))) | (let ((id (gnc:make-report reportname options))) | |||
(gnc:report-anchor-text id))) | (gnc:report-anchor-text id))) | |||
(warn "gnc:make-report-anchor: No such report: " reportname)))) | (warn "gnc:make-report-anchor: No such report: " reportname)))) | |||
;; returns the account name as html-text and anchor to the register. | ;; returns the account name as html-text and anchor to the register. | |||
(define (gnc:html-account-anchor acct) | (define (gnc:html-account-anchor acct) | |||
(gnc:make-html-text (if (and acct (not (null? acct))) | (gnc:make-html-text (if (and acct (not (null? acct))) | |||
(gnc:html-markup-anchor | (gnc:html-markup-anchor | |||
(gnc:account-anchor-text acct) | (gnc:account-anchor-text acct) | |||
(xaccAccountGetName acct)) | (xaccAccountGetName acct)) | |||
""))) | ""))) | |||
(define (gnc:html-split-anchor split text) | (define (gnc:html-split-anchor split text) | |||
skipping to change at line 217 | skipping to change at line 217 | |||
(define (gnc:html-invoice-doclink-anchor invoice text) | (define (gnc:html-invoice-doclink-anchor invoice text) | |||
(gnc:make-html-text (gnc:html-markup-anchor | (gnc:make-html-text (gnc:html-markup-anchor | |||
(gnc:invoice-doclink-anchor-text invoice) | (gnc:invoice-doclink-anchor-text invoice) | |||
text))) | text))) | |||
(define (gnc:html-price-anchor price value) | (define (gnc:html-price-anchor price value) | |||
(gnc:make-html-text (if price | (gnc:make-html-text (if price | |||
(gnc:html-markup-anchor | (gnc:html-markup-anchor | |||
(gnc:price-anchor-text price) | (gnc:price-anchor-text price) | |||
(if value | (if value | |||
value | value | |||
(gnc-price-get-value price))) | (gnc-price-get-value price))) | |||
value))) | value))) | |||
(define (gnc:assign-colors num-colors) | (define (gnc:assign-colors num-colors) | |||
;; default CSS colours | ;; default CSS colours | |||
;; (define base-colors '("red" "orange" "yellow" "green" | ;; (define base-colors '("red" "orange" "yellow" "green" | |||
;; "cyan" "blue" "purple" "magenta" | ;; "cyan" "blue" "purple" "magenta" | |||
;; "orchid" "khaki" "gold" "orange" | ;; "orchid" "khaki" "gold" "orange" | |||
;; "red3" "orange3" "yellow3" "green3" | ;; "red3" "orange3" "yellow3" "green3" | |||
;; "cyan3" "blue3" "purple3" "magenta3" | ;; "cyan3" "blue3" "purple3" "magenta3" | |||
;; "orchid3" "khaki3" "gold3" "orange3")) | ;; "orchid3" "khaki3" "gold3" "orange3")) | |||
End of changes. 7 change blocks. | ||||
17 lines changed or deleted | 17 lines changed or added |