gnucash maint: Save Changes Bug 780889 - Split-register transactions result in invalid...

John Ralls jralls at code.gnucash.org
Tue Apr 4 00:18:19 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/e20009a0 (commit)
	from  https://github.com/Gnucash/gnucash/commit/844a6db3 (commit)



commit e20009a08da7c83d3a3d35bcec6c336dfccfc293
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Apr 3 21:16:43 2017 -0700

    Save Changes Bug 780889 - Split-register transactions result in invalid...
    
    price:type "transaction".
    
    Add 'transaction' to the schema and document it in gnc-pricedb.h.

diff --git a/src/doc/xml/gnucash-v2.rnc b/src/doc/xml/gnucash-v2.rnc
index 7a66c92..752b03a 100644
--- a/src/doc/xml/gnucash-v2.rnc
+++ b/src/doc/xml/gnucash-v2.rnc
@@ -199,7 +199,7 @@ Price = element price {
 
 # from the doc string of gnc_price_class_init in src/engine/gnc-pricedb.c
 
-  element price:type { "bid" | "ask" | "last" | "nav" | "unknown" }?,
+  element price:type { "bid" | "ask" | "last" | "nav" | "transaction" | "unknown" }?,
 
   element price:value { GncNumeric }
 }
diff --git a/src/engine/gnc-pricedb.c b/src/engine/gnc-pricedb.c
index f777f5f..37aee84 100644
--- a/src/engine/gnc-pricedb.c
+++ b/src/engine/gnc-pricedb.c
@@ -225,7 +225,8 @@ gnc_price_class_init(GNCPriceClass *klass)
                           "Quote type",
                           "The quote type is a string describing the "
                           "type of a price quote.  Types possible now "
-                          "are 'bid', 'ask', 'last', 'nav' and 'unknown'.",
+                          "are 'bid', 'ask', 'last', 'nav', 'transaction', "
+                          "and 'unknown'.",
                           NULL,
                           G_PARAM_READWRITE));
 
diff --git a/src/engine/gnc-pricedb.h b/src/engine/gnc-pricedb.h
index 5c3a625..304aee5 100644
--- a/src/engine/gnc-pricedb.h
+++ b/src/engine/gnc-pricedb.h
@@ -116,8 +116,10 @@ GType gnc_pricedb_get_type(void);
       many strings in users' databases, so this string must be
       translated on output instead of always being used in untranslated
       form).
-    - type: the type of quote - types possible right now are bid, ask,
-      last, nav, and unknown.
+    - type: the type of quote - types possible right now are bid, ask, last,
+      nav, transaction, and unknown. 'Transaction' is set when the price is
+      created from an amount and value in a Split and is not available for users
+      to set via the GUI.
 
     \par Implementation Details:
 



Summary of changes:
 src/doc/xml/gnucash-v2.rnc | 2 +-
 src/engine/gnc-pricedb.c   | 3 ++-
 src/engine/gnc-pricedb.h   | 6 ++++--
 3 files changed, 7 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list