Skip to content

Commit

Permalink
[assistant-stock-transaction] fix stock split creation algorithm
Browse files Browse the repository at this point in the history
* stock_amount was reduced as a previous bugfix attempt
* remove references to Stock Split Assistant
  • Loading branch information
christopherlam committed Sep 19, 2022
1 parent 6ba0f84 commit cfd37c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions gnucash/gnome/assistant-stock-transaction.cpp
Expand Up @@ -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.")
}
};
Expand Down Expand Up @@ -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.")
}
};
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion gnucash/gtkbuilder/assistant-stock-transaction.glade
Expand Up @@ -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"/>
Expand Down

0 comments on commit cfd37c9

Please sign in to comment.