mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[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.
This commit is contained in:
parent
afa21eaf4f
commit
418de90647
@ -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));
|
auto date = gnc_date_edit_get_date (GNC_DATE_EDIT (info->date_edit));
|
||||||
xaccTransSetDatePostedSecsNormalized (trans, date);
|
xaccTransSetDatePostedSecsNormalized (trans, date);
|
||||||
|
|
||||||
if (info->txn_type->stock_amount != FieldMask::DISABLED ||
|
create_split (trans, info->txn_type->stock_value,
|
||||||
info->txn_type->stock_value != FieldMask::DISABLED)
|
NC_ ("Stock Assistant: Action field", "Stock"),
|
||||||
create_split (trans, info->txn_type->stock_value,
|
info->acct, account_commits, info->stock_memo_edit,
|
||||||
NC_ ("Stock Assistant: Action field", "Stock"), info->acct,
|
info->txn_type->stock_amount != FieldMask::DISABLED ? info->stock_amount_edit : nullptr,
|
||||||
account_commits, info->stock_memo_edit, info->stock_amount_edit,
|
info->txn_type->stock_value != FieldMask::DISABLED ? info->stock_value_edit : nullptr,
|
||||||
info->stock_value_edit, false);
|
false);
|
||||||
|
|
||||||
if (info->txn_type->cash_value != FieldMask::DISABLED)
|
if (info->txn_type->cash_value != FieldMask::DISABLED)
|
||||||
create_split (trans, info->txn_type->cash_value,
|
create_split (trans, info->txn_type->cash_value,
|
||||||
|
Loading…
Reference in New Issue
Block a user