diff --git a/gnucash/report/reports/standard/account-summary.scm b/gnucash/report/reports/standard/account-summary.scm index 0ea163838e..0ffb26641e 100644 --- a/gnucash/report/reports/standard/account-summary.scm +++ b/gnucash/report/reports/standard/account-summary.scm @@ -315,6 +315,7 @@ (gnc:get-current-account-tree-depth) depth-limit)) ;; exchange rates calculation parameters + (price-fn (gnc:case-price-fn price-source report-commodity to-date)) (exchange-fn (gnc:case-exchange-fn price-source report-commodity to-date))) (gnc:html-document-set-title! @@ -441,8 +442,8 @@ ;; add currency information (when show-rates? (gnc:html-document-add-object! - doc (gnc:html-make-exchangerates - report-commodity exchange-fn + doc (gnc:html-make-rates-table + report-commodity price-fn (gnc:accounts-and-all-descendants accounts)))))) (gnc:report-finished) diff --git a/gnucash/report/reports/standard/balance-sheet.scm b/gnucash/report/reports/standard/balance-sheet.scm index dddc7dfdcd..6c1c32d769 100644 --- a/gnucash/report/reports/standard/balance-sheet.scm +++ b/gnucash/report/reports/standard/balance-sheet.scm @@ -343,6 +343,7 @@ (tree-depth (if (eq? depth-limit 'all) (gnc:get-current-account-tree-depth) depth-limit)) + (price-fn (gnc:case-price-fn price-source report-commodity reportdate)) ;; exchange rates calculation parameters (exchange-fn (gnc:case-exchange-fn price-source report-commodity reportdate))) @@ -550,7 +551,7 @@ (gnc:report-percent-done 90) (when show-rates? (gnc:html-document-add-object! - doc (gnc:html-make-exchangerates report-commodity exchange-fn accounts))) + doc (gnc:html-make-rates-table report-commodity price-fn accounts))) (gnc:report-percent-done 100))) diff --git a/gnucash/report/reports/standard/budget-balance-sheet.scm b/gnucash/report/reports/standard/budget-balance-sheet.scm index d50a7a0d75..03df94ecee 100644 --- a/gnucash/report/reports/standard/budget-balance-sheet.scm +++ b/gnucash/report/reports/standard/budget-balance-sheet.scm @@ -355,7 +355,8 @@ ;; exchange rates calculation parameters (exchange-fn (gnc:case-exchange-fn price-source report-commodity date-t64)) - ) + + (price-fn (gnc:case-price-fn price-source report-commodity date-t64))) (define (add-subtotal-line table pos-label neg-label signed-balance) (let* ((neg? (and signed-balance neg-label @@ -808,8 +809,7 @@ (if show-rates? (gnc:html-document-add-object! doc ;;(gnc:html-markup-p) - (gnc:html-make-exchangerates - report-commodity exchange-fn accounts))) + (gnc:html-make-rates-table report-commodity price-fn accounts))) (gnc:report-percent-done 100))))) (gnc:report-finished) diff --git a/gnucash/report/reports/standard/budget-income-statement.scm b/gnucash/report/reports/standard/budget-income-statement.scm index 2e2978b56f..e12e22e7ef 100644 --- a/gnucash/report/reports/standard/budget-income-statement.scm +++ b/gnucash/report/reports/standard/budget-income-statement.scm @@ -401,7 +401,8 @@ ;; exchange rates calculation parameters (exchange-fn (gnc:case-exchange-fn price-source report-commodity date-t64)) - ) + + (price-fn (gnc:case-price-fn price-source report-commodity date-t64))) (define (add-subtotal-line table pos-label neg-label signed-balance) (let* ((neg? (and signed-balance neg-label @@ -595,7 +596,7 @@ (gnc:report-percent-done 90) (when show-rates? (gnc:html-document-add-object! - doc (gnc:html-make-exchangerates report-commodity exchange-fn accounts))) + doc (gnc:html-make-rates-table report-commodity price-fn accounts))) (gnc:report-percent-done 100)))) (gnc:report-finished) diff --git a/gnucash/report/reports/standard/cash-flow.scm b/gnucash/report/reports/standard/cash-flow.scm index 623f71998a..2379e1885d 100644 --- a/gnucash/report/reports/standard/cash-flow.scm +++ b/gnucash/report/reports/standard/cash-flow.scm @@ -149,6 +149,8 @@ (exchange-fn (gnc:case-exchange-fn price-source report-currency to-date-t64)) + (price-fn (gnc:case-price-fn price-source report-currency to-date-t64)) + (doc (gnc:make-html-document)) (table (gnc:make-html-table)) @@ -321,8 +323,8 @@ (if show-rates? (gnc:html-document-add-object! doc ;;(gnc:html-markup-p - (gnc:html-make-exchangerates - report-currency exchange-fn accounts)))))) + (gnc:html-make-rates-table + report-currency price-fn accounts)))))) ;; error condition: no accounts specified diff --git a/gnucash/report/reports/standard/equity-statement.scm b/gnucash/report/reports/standard/equity-statement.scm index ce13efc1c6..4b47cb1792 100644 --- a/gnucash/report/reports/standard/equity-statement.scm +++ b/gnucash/report/reports/standard/equity-statement.scm @@ -280,7 +280,9 @@ (end-exchange-fn (gnc:case-exchange-fn price-source report-commodity end-date)) - ) + + (start-price-fn (gnc:case-price-fn price-source report-commodity start-date)) + (end-price-fn (gnc:case-price-fn price-source report-commodity end-date))) (define (unrealized-gains-at-date book-balance exchange-fn date) (define cost-fn @@ -496,10 +498,10 @@ (headers (list (qof-print-date start-date-printable) (qof-print-date end-date))) - (then (gnc:html-make-exchangerates - report-commodity start-exchange-fn accounts)) - (now (gnc:html-make-exchangerates - report-commodity end-exchange-fn accounts))) + (then (gnc:html-make-rates-table + report-commodity start-price-fn accounts)) + (now (gnc:html-make-rates-table + report-commodity end-price-fn accounts))) (gnc:html-table-set-col-headers! curr-tbl headers) (gnc:html-table-set-style! curr-tbl "table" 'attribute '("border" "1")) diff --git a/gnucash/report/reports/standard/income-statement.scm b/gnucash/report/reports/standard/income-statement.scm index 93988525d0..ec9d8df4e0 100644 --- a/gnucash/report/reports/standard/income-statement.scm +++ b/gnucash/report/reports/standard/income-statement.scm @@ -382,7 +382,7 @@ ;; exchange rates calculation parameters (exchange-fn (gnc:case-exchange-fn price-source report-commodity end-date)) - ) + (price-fn (gnc:case-price-fn price-source report-commodity end-date))) ;; Wrapper to call gnc:html-table-add-labeled-amount-line! ;; with the proper arguments. @@ -561,8 +561,8 @@ (gnc:report-percent-done 90) (when show-rates? (gnc:html-document-add-object! - doc (gnc:html-make-exchangerates - report-commodity exchange-fn accounts))) + doc (gnc:html-make-rates-table + report-commodity price-fn accounts))) (gnc:report-percent-done 100))) (gnc:report-finished) diff --git a/gnucash/report/reports/standard/trial-balance.scm b/gnucash/report/reports/standard/trial-balance.scm index 18b06f8ab6..b305d70c5a 100644 --- a/gnucash/report/reports/standard/trial-balance.scm +++ b/gnucash/report/reports/standard/trial-balance.scm @@ -401,6 +401,7 @@ ;; exchange rates calculation parameters (exchange-fn (gnc:case-exchange-fn price-source report-commodity end-date)) + (price-fn (gnc:case-price-fn price-source report-commodity end-date)) (period-for (string-append " " (G_ "for Period")))) (gnc:html-document-set-title! @@ -894,8 +895,8 @@ (if show-rates? (gnc:html-document-add-object! doc - (gnc:html-make-exchangerates - report-commodity exchange-fn accounts))) + (gnc:html-make-rates-table + report-commodity price-fn accounts))) (gnc:report-percent-done 100))) (gnc:report-finished)