gnucash maint: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Tue Jun 21 10:16:35 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/418de906 (commit)
via https://github.com/Gnucash/gnucash/commit/afa21eaf (commit)
from https://github.com/Gnucash/gnucash/commit/5cec53f0 (commit)
commit 418de90647a79679650181e9d886057fdcfeda2d
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Jun 21 22:09:58 2022 +0800
[assistant-stock-transaction] dividends must include stock account
bugfix. A stock account split must always be included in the stock
transaction.
This bug would manifest with a pure dividend transaction; it would
create a transaction from Income:Dividend to Cash. To be properly
reported in the portfolio and IFRS reports, a zero-amount and
zero-value stock split must be included.
diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index 25e6bc001..f813dd0a5 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -1004,12 +1004,12 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
auto date = gnc_date_edit_get_date (GNC_DATE_EDIT (info->date_edit));
xaccTransSetDatePostedSecsNormalized (trans, date);
- if (info->txn_type->stock_amount != FieldMask::DISABLED ||
- info->txn_type->stock_value != FieldMask::DISABLED)
- create_split (trans, info->txn_type->stock_value,
- NC_ ("Stock Assistant: Action field", "Stock"), info->acct,
- account_commits, info->stock_memo_edit, info->stock_amount_edit,
- info->stock_value_edit, false);
+ create_split (trans, info->txn_type->stock_value,
+ NC_ ("Stock Assistant: Action field", "Stock"),
+ info->acct, account_commits, info->stock_memo_edit,
+ info->txn_type->stock_amount != FieldMask::DISABLED ? info->stock_amount_edit : nullptr,
+ info->txn_type->stock_value != FieldMask::DISABLED ? info->stock_value_edit : nullptr,
+ false);
if (info->txn_type->cash_value != FieldMask::DISABLED)
create_split (trans, info->txn_type->cash_value,
commit afa21eaf4f35455a484213d495227d97613827b2
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Jun 21 21:33:46 2022 +0800
[assistant-stock-transaction.glade] remove unused comments
besides, "Dividend" had the invalid comment "Brokerage Fees"
diff --git a/gnucash/gtkbuilder/assistant-stock-transaction.glade b/gnucash/gtkbuilder/assistant-stock-transaction.glade
index f3e93c48d..30c982c9e 100644
--- a/gnucash/gtkbuilder/assistant-stock-transaction.glade
+++ b/gnucash/gtkbuilder/assistant-stock-transaction.glade
@@ -644,7 +644,7 @@
</child>
</object>
<packing>
- <property name="title" translatable="yes" comments="Brokerage Fees">Fees</property>
+ <property name="title" translatable="yes">Fees</property>
<property name="complete">True</property>
</packing>
</child>
@@ -756,7 +756,7 @@
</child>
</object>
<packing>
- <property name="title" translatable="yes" comments="Brokerage Fees">Dividend</property>
+ <property name="title" translatable="yes">Dividend</property>
<property name="complete">True</property>
</packing>
</child>
Summary of changes:
gnucash/gnome/assistant-stock-transaction.cpp | 12 ++++++------
gnucash/gtkbuilder/assistant-stock-transaction.glade | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
More information about the gnucash-changes
mailing list