gnucash maint: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Sun Sep 18 22:04:01 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/84f4f3b6 (commit)
via https://github.com/Gnucash/gnucash/commit/cfd37c91 (commit)
from https://github.com/Gnucash/gnucash/commit/6ba0f849 (commit)
commit 84f4f3b6f852bb76382009466beb4335f5cb4aa6
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Sep 19 10:03:28 2022 +0800
[assistant-stock-transaction] add to toolbar
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 4e2368840..0719d678b 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -487,8 +487,8 @@ static GtkActionEntry gnc_plugin_page_register_actions [] =
G_CALLBACK (gnc_plugin_page_register_cmd_autoclear)
},
{
- "ActionsStockAssistantAction", NULL, N_ ("Stock Ass_istant"), NULL,
- N_ ("Stock Assistant"),
+ "ActionsStockAssistantAction", "applications-utilities",
+ N_ ("Stock Ass_istant"), NULL, N_ ("Stock Assistant"),
G_CALLBACK (gnc_plugin_page_register_cmd_stock_assistant)
},
{
diff --git a/gnucash/ui/gnc-plugin-page-register-ui.xml b/gnucash/ui/gnc-plugin-page-register-ui.xml
index ab1405a7f..cc57ebdb9 100644
--- a/gnucash/ui/gnc-plugin-page-register-ui.xml
+++ b/gnucash/ui/gnc-plugin-page-register-ui.xml
@@ -86,6 +86,7 @@
<separator name="ToolbarSep68"/>
<toolitem name="ToolbarTransfer" action="ActionsTransferAction"/>
<toolitem name="ActionsReconcile" action="ActionsReconcileAction"/>
+ <toolitem name="ActionsAssistant" action="ActionsStockAssistantAction"/>
</placeholder>
</toolbar>
commit cfd37c91028268c8a8b4199bc7bc3b60ade03099
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Sep 19 09:31:21 2022 +0800
[assistant-stock-transaction] fix stock split creation algorithm
* stock_amount was reduced as a previous bugfix attempt
* remove references to Stock Split Assistant
diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index 788d7b01a..2d6734c0b 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -263,7 +263,7 @@ reinvested must be subsequently recorded as a regular stock purchase.")
N_("Company redeems units, thereby increasing the stock price by a \
multiple, while keeping the total monetary value of the overall investment \
constant.\n\nIf the reverse split results in a cash in lieu for remainder \
-units, please record the sale using the Stock Split Assistant first, then \
+units, please record the sale using the Stock Transaction Assistant first, then \
record the reverse split.")
}
};
@@ -369,7 +369,7 @@ static const TxnTypeVec short_types
N_("Company redeems units, thereby increasing the stock price by \
a multiple, while keeping the total monetary value of the overall investment \
constant.\n\nIf the reverse split results in a cash in lieu for remainder \
-units, please record the cover buy using the Stock Split Assistant first, \
+units, please record the cover buy using the Stock Transaction Assistant first, \
then record the reverse split.")
}
};
@@ -1099,8 +1099,6 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
gae_amount (info->stock_amount_edit) : gnc_numeric_zero ();
auto stock_value = info->txn_type->stock_value != FieldMask::DISABLED ?
gae_amount (info->stock_value_edit) : gnc_numeric_zero ();
- if (info->txn_type->input_new_balance)
- stock_amount = gnc_numeric_sub_fixed (stock_amount, info->balance_at_date);
create_split (trans, info->txn_type->stock_amount | info->txn_type->stock_value,
NC_ ("Stock Assistant: Action field", "Stock"),
info->acct, account_commits, info->stock_memo_edit,
diff --git a/gnucash/gtkbuilder/assistant-stock-transaction.glade b/gnucash/gtkbuilder/assistant-stock-transaction.glade
index b21930132..c28e6d7b6 100644
--- a/gnucash/gtkbuilder/assistant-stock-transaction.glade
+++ b/gnucash/gtkbuilder/assistant-stock-transaction.glade
@@ -6,7 +6,7 @@
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="border-width">12</property>
- <property name="title" translatable="yes">Stock Split Assistant</property>
+ <property name="title" translatable="yes">Stock Transaction Assistant</property>
<property name="window-position">center</property>
<property name="default-width">500</property>
<signal name="cancel" handler="stock_assistant_cancel" swapped="no"/>
Summary of changes:
gnucash/gnome/assistant-stock-transaction.cpp | 6 ++----
gnucash/gnome/gnc-plugin-page-register.c | 4 ++--
gnucash/gtkbuilder/assistant-stock-transaction.glade | 2 +-
gnucash/ui/gnc-plugin-page-register-ui.xml | 1 +
4 files changed, 6 insertions(+), 7 deletions(-)
More information about the gnucash-changes
mailing list