gnucash maint: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Thu Mar 31 08:43:29 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/b6d5cedd (commit)
via https://github.com/Gnucash/gnucash/commit/03e5d710 (commit)
from https://github.com/Gnucash/gnucash/commit/9a50be4c (commit)
commit b6d5cedd325096f322ab77f997263fed8e9a05ae
Merge: 9a50be4c5 03e5d710f
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu Mar 31 20:18:04 2022 +0800
Merge branch 'maint-after-string-thaw' into maint #1295
commit 03e5d710f68a01d5444a7bc1d0eb7247eb2426b4
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Mar 14 18:44:35 2022 +0800
[assistant-stock-transaction] better Dr/Cr imbalance error message
diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index 636bcaed0..8b6b7b919 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -751,7 +751,17 @@ refresh_page_finish (StockTransactionInfo *info)
}
if (!gnc_numeric_equal (debit, credit))
- add_error_str (errors, N_("Debits and credits are not balanced"));
+ {
+ auto imbalance_str = N_("Total Debits of %s does not balance with total Credits of %s.");
+ auto print_info = gnc_commodity_print_info (info->currency, true);
+ auto debit_str = g_strdup (xaccPrintAmount (debit, print_info));
+ auto credit_str = g_strdup (xaccPrintAmount (credit, print_info));
+ auto error_str = g_strdup_printf (_(imbalance_str), debit_str, credit_str);
+ errors.emplace_back (error_str);
+ g_free (error_str);
+ g_free (credit_str);
+ g_free (debit_str);
+ }
if (errors.empty())
{
Summary of changes:
gnucash/gnome/assistant-stock-transaction.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list