gnucash maint: Bug 746937 - Template transaction splits are loaded in reverse order...

John Ralls jralls at code.gnucash.org
Sat Jul 27 18:18:43 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/887f7fac (commit)
	from  https://github.com/Gnucash/gnucash/commit/456ab224 (commit)



commit 887f7fac32ee328b99dff918f7db85584451a903
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 27 15:15:55 2019 -0700

    Bug 746937 - Template transaction splits are loaded in reverse order...
    
    and then not sorted before saving.
    
    Actually not sorted after loading because the template accounts weren't
    being committed.

diff --git a/libgnucash/backend/xml/io-gncxml-v2.cpp b/libgnucash/backend/xml/io-gncxml-v2.cpp
index 8f42abe84..085119e35 100644
--- a/libgnucash/backend/xml/io-gncxml-v2.cpp
+++ b/libgnucash/backend/xml/io-gncxml-v2.cpp
@@ -853,6 +853,9 @@ qof_session_load_from_xml_file_v2_full (
     gnc_account_foreach_descendant (root,
                                     (AccountCb) xaccAccountCommitEdit,
                                     NULL);
+    gnc_account_foreach_descendant (gnc_book_get_template_root (book),
+                                    (AccountCb) xaccAccountCommitEdit,
+                                    NULL);
 
     /* start logging again */
     xaccLogEnable ();



Summary of changes:
 libgnucash/backend/xml/io-gncxml-v2.cpp | 3 +++
 1 file changed, 3 insertions(+)



More information about the gnucash-changes mailing list