diff --git a/gnucash/report/report-system/commodity-utilities.scm b/gnucash/report/report-system/commodity-utilities.scm index 6e3db8876d..3946b98a2b 100644 --- a/gnucash/report/report-system/commodity-utilities.scm +++ b/gnucash/report/report-system/commodity-utilities.scm @@ -94,6 +94,7 @@ ;; Helper for warnings below. (define (gnc-commodity-numeric->string commodity numeric) + (issue-deprecation-warning "gnc-commodity-numeric->string deprecated.") (gnc:monetary->string (gnc:make-gnc-monetary commodity numeric))) @@ -157,13 +158,6 @@ value-amount share-amount)) #f))) - ;;(warn "gnc:get-commodity-totalavg-prices: value " - ;; (gnc-commodity-numeric->string - ;;(first foreignlist) (second foreignlist)) - ;; " bought shares " - ;; (gnc-commodity-numeric->string - ;;price-commodity (third foreignlist))) - ;; Try EURO exchange if necessary (if (and foreignlist (not (gnc-commodity-equiv (first foreignlist) @@ -185,14 +179,17 @@ (begin (warn "gnc:get-commodity-totalavg-prices: " "Sorry, currency exchange not yet implemented:" - (gnc-commodity-numeric->string - (first foreignlist) (second foreignlist)) + (gnc:monetary->string + (gnc:make-gnc-monetary + (first foreignlist) (second foreignlist))) " (buying " - (gnc-commodity-numeric->string - price-commodity (third foreignlist)) + (gnc:monetary->string + (gnc:make-gnc-monetary + price-commodity (third foreignlist))) ") =? " - (gnc-commodity-numeric->string - report-currency (gnc-numeric-zero))) + (gnc:monetary->string + (gnc:make-gnc-monetary + report-currency (gnc-numeric-zero)))) (gnc-numeric-zero)) (begin (set! total-foreign (gnc-numeric-add total-foreign @@ -272,13 +269,6 @@ (list transaction-comm value-amount share-amount)))) - ;;(warn "get-commodity-inst-prices: value " - ;; (gnc-commodity-numeric->string - ;; (first foreignlist) (second foreignlist)) - ;; " bought shares " - ;;(gnc-commodity-numeric->string - ;; price-commodity (third foreignlist))) - ;; Try EURO exchange if necessary (if (not (gnc-commodity-equiv (first foreignlist) report-currency)) @@ -298,14 +288,17 @@ (begin (warn "get-commodity-inst-prices: " "Sorry, currency exchange not yet implemented:" - (gnc-commodity-numeric->string - (first foreignlist) (second foreignlist)) - " (buying " - (gnc-commodity-numeric->string - price-commodity (third foreignlist)) - ") =? " - (gnc-commodity-numeric->string - report-currency (gnc-numeric-zero))) + (gnc:monetary->string + (gnc:make-gnc-monetary + (first foreignlist) (second foreignlist))) + " (buying " + (gnc:monetary->string + (gnc:make-gnc-monetary + price-commodity (third foreignlist))) + ") =? " + (gnc:monetary->string + (gnc:make-gnc-monetary + report-currency (gnc-numeric-zero)))) (gnc-numeric-zero)) (if (not (zero? (third foreignlist))) (gnc-numeric-div diff --git a/gnucash/report/report-system/html-acct-table.scm b/gnucash/report/report-system/html-acct-table.scm index c7a217393e..4072ea65ee 100644 --- a/gnucash/report/report-system/html-acct-table.scm +++ b/gnucash/report/report-system/html-acct-table.scm @@ -675,9 +675,6 @@ (acct-comm (xaccAccountGetCommodity acct)) (shares (xaccSplitGetAmount split)) (hash (hash-ref hash-table guid))) -; (gnc:debug "Merging split for " (xaccAccountGetName acct) " for " -; (gnc-commodity-numeric->string acct-comm shares) -; " into hash entry " hash) (if (not hash) (begin (set! hash (gnc:make-commodity-collector)) (hash-set! hash-table guid hash))) diff --git a/gnucash/report/standard-reports/advanced-portfolio.scm b/gnucash/report/standard-reports/advanced-portfolio.scm index b834d5b4b2..3b3953feb3 100644 --- a/gnucash/report/standard-reports/advanced-portfolio.scm +++ b/gnucash/report/standard-reports/advanced-portfolio.scm @@ -535,7 +535,8 @@ by preventing negative stock balances.
") ;; Now that we have a pricing transaction if needed, set the value of the asset (set! value (my-exchange-fn (gnc:make-gnc-monetary commodity units) currency)) (gnc:debug "Value " (gnc:monetary->string value) - " from " (gnc-commodity-numeric->string commodity units)) + " from " (gnc:monetary->string + (gnc:make-gnc-monetary commodity units))) (for-each ;; we're looking at each split we find in the account. these splits