|
|
|
|
@ -228,6 +228,30 @@
|
|
|
|
|
(G_ "Exchange rates"))))))
|
|
|
|
|
table))
|
|
|
|
|
|
|
|
|
|
;; Create a html-table of all prices. The report-currency is
|
|
|
|
|
;; 'currency', The prices are given through the function 'price-fn'
|
|
|
|
|
;; and the 'accounts' determine which commodities to show. Returns a
|
|
|
|
|
;; html-object, a <html-table>. price-fn is easily obtained from
|
|
|
|
|
;; gnc:case-price-fn
|
|
|
|
|
(define (gnc:html-make-rates-table currency price-fn accounts)
|
|
|
|
|
(define (cell c) (gnc:make-html-table-cell/markup "number-cell" c))
|
|
|
|
|
(define table (gnc:make-html-table))
|
|
|
|
|
(let lp ((comm-list (gnc:accounts-get-commodities accounts currency)) (entries 0))
|
|
|
|
|
(match comm-list
|
|
|
|
|
(()
|
|
|
|
|
(unless (zero? entries)
|
|
|
|
|
(gnc:html-table-set-col-headers!
|
|
|
|
|
table (list (gnc:make-html-table-header-cell/size
|
|
|
|
|
1 2 (if (= entries 1) (G_ "Exchange rate")
|
|
|
|
|
(G_ "Exchange rates"))))))
|
|
|
|
|
table)
|
|
|
|
|
((comm . rest)
|
|
|
|
|
(gnc:html-table-append-row!
|
|
|
|
|
table
|
|
|
|
|
(list (cell (gnc:make-gnc-monetary comm 1))
|
|
|
|
|
(cell (gnc:default-price-renderer currency (price-fn comm)))))
|
|
|
|
|
(lp rest (1+ entries))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (gnc:html-make-generic-budget-warning report-title-string)
|
|
|
|
|
(gnc:html-make-generic-simple-warning
|
|
|
|
|
|