mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Mike Alexander's patch to get currency quote retrieval working again,
and some other small currency quote bugfixes. Closes 333572. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13723 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
73e02ed09a
commit
9a3be57d8d
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2006-04-01 David Hampton <hampton@employees.org>
|
||||||
|
|
||||||
|
* src/backend/file/gnc-account-xml-v2.c:
|
||||||
|
* src/scm/price-quotes.scm:
|
||||||
|
* src/engine/Account.c:
|
||||||
|
* src/engine/engine-utilities.scm:
|
||||||
|
* src/engine/gnc-commodity.c: Mike Alexander's patch to get
|
||||||
|
currency quote retrieval working again, and some other small
|
||||||
|
currency quote bugfixes. Closes 333572.
|
||||||
|
|
||||||
2006-03-31 David Hampton <hampton@employees.org>
|
2006-03-31 David Hampton <hampton@employees.org>
|
||||||
|
|
||||||
* src/engine/Transaction.c: Restore sorting transactions by date
|
* src/engine/Transaction.c: Restore sorting transactions by date
|
||||||
|
@ -129,7 +129,7 @@ gnc_account_dom_tree_create(Account *act, gboolean exporting)
|
|||||||
|
|
||||||
com = xaccAccountGetCommodity(act);
|
com = xaccAccountGetCommodity(act);
|
||||||
if (com &&
|
if (com &&
|
||||||
!gnc_commodity_is_iso(com) &&
|
(!gnc_commodity_is_iso(com) || xaccAccountGetType(act) == CURRENCY) &&
|
||||||
gnc_commodity_get_quote_flag(com)) {
|
gnc_commodity_get_quote_flag(com)) {
|
||||||
if (!kvpnode)
|
if (!kvpnode)
|
||||||
kvpnode= xmlNewNode(NULL, BAD_CAST act_slots_string);
|
kvpnode= xmlNewNode(NULL, BAD_CAST act_slots_string);
|
||||||
|
@ -1140,6 +1140,8 @@ xaccAccountSetCommodity (Account * acc, gnc_commodity * com)
|
|||||||
/* compatability hack - Gnucash 1.8 gets currency quotes when a
|
/* compatability hack - Gnucash 1.8 gets currency quotes when a
|
||||||
non-default currency is assigned to an account. */
|
non-default currency is assigned to an account. */
|
||||||
gnc_commodity_set_quote_flag(com, TRUE);
|
gnc_commodity_set_quote_flag(com, TRUE);
|
||||||
|
gnc_commodity_set_quote_source(com,
|
||||||
|
gnc_commodity_get_default_quote_source(com));
|
||||||
}
|
}
|
||||||
xaccAccountCommitEdit(acc);
|
xaccAccountCommitEdit(acc);
|
||||||
}
|
}
|
||||||
|
@ -21,14 +21,13 @@
|
|||||||
|
|
||||||
;; Copyright 2000 Rob Browning <rlb@cs.utexas.edu>
|
;; Copyright 2000 Rob Browning <rlb@cs.utexas.edu>
|
||||||
|
|
||||||
(define (gnc:url->loaded-session url ignore-lock? create-if-needed?)
|
(define (gnc:url->loaded-session session url ignore-lock? create-if-needed?)
|
||||||
;; Return a <gnc:Book*> representing the data stored at the given
|
;; Return a <gnc:Book*> representing the data stored at the given
|
||||||
;; url or #f on failure -- this should later be changed to returning
|
;; url or #f on failure -- this should later be changed to returning
|
||||||
;; the symbol representing the book error... On success, the book
|
;; the symbol representing the book error... On success, the book
|
||||||
;; will already be loaded.
|
;; will already be loaded.
|
||||||
|
|
||||||
(let* ((session (gnc:session-new))
|
(let* ((result (and session
|
||||||
(result (and session
|
|
||||||
(gnc:session-begin session url
|
(gnc:session-begin session url
|
||||||
ignore-lock?
|
ignore-lock?
|
||||||
create-if-needed?)
|
create-if-needed?)
|
||||||
|
@ -108,7 +108,7 @@ struct gnc_quote_source_s {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static gnc_quote_source currency_quote_source =
|
static gnc_quote_source currency_quote_source =
|
||||||
{ TRUE, 0, 0, "CURRENCY", "currency", "currency" };
|
{ TRUE, 0, 0, "Currency", "CURRENCY", "currency" };
|
||||||
|
|
||||||
static gnc_quote_source single_quote_sources[] = {
|
static gnc_quote_source single_quote_sources[] = {
|
||||||
{ FALSE, 0, 0, "AEX", "AEX", "aex" },
|
{ FALSE, 0, 0, "AEX", "AEX", "aex" },
|
||||||
|
@ -738,7 +738,7 @@ Run 'gnc-fq-update' as root to install them.") "\n")))
|
|||||||
prices)))))))
|
prices)))))))
|
||||||
|
|
||||||
(define (gnc:add-quotes-to-book-at-url url)
|
(define (gnc:add-quotes-to-book-at-url url)
|
||||||
(let* ((session (gnc:url->loaded-session url #f #f))
|
(let* ((session (gnc:url->loaded-session (gnc:get-current-session) url #f #f))
|
||||||
(quote-ok? #f))
|
(quote-ok? #f))
|
||||||
(gnc:debug "in add-quotes-to-book-at-url")
|
(gnc:debug "in add-quotes-to-book-at-url")
|
||||||
(if session
|
(if session
|
||||||
|
Loading…
Reference in New Issue
Block a user