From acff356fec1f2b95a22d7b8152b1efcc4a3681b0 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sun, 27 Aug 2023 12:19:43 -0700 Subject: [PATCH] [stock-txn-asst] Set all the needed parameters for StockCGEntry. So that it will create the split and do so with the right memo. --- gnucash/gnome/assistant-stock-transaction.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp index 43dace70a3..a6a79dad4c 100644 --- a/gnucash/gnome/assistant-stock-transaction.cpp +++ b/gnucash/gnome/assistant-stock-transaction.cpp @@ -560,9 +560,10 @@ struct StockTransactionEntry StockTransactionEntry(const char* action) : m_enabled{false}, m_debit_side{false}, m_allow_zero{false}, m_account{nullptr}, m_value{gnc_numeric_error(GNC_ERROR_ARG)}, m_memo{nullptr}, m_action{action} {} - StockTransactionEntry(bool debit_side, bool allow_zero, bool allow_negative, Account* account, gnc_numeric value, const char* action) : - m_enabled{false}, m_debit_side{debit_side}, m_allow_zero{allow_zero}, m_allow_negative{allow_negative}, - m_account{account}, m_value{value}, m_memo{nullptr}, m_action{action} {} + StockTransactionEntry(bool debit_side, bool allow_zero, bool allow_negative, Account* account, + gnc_numeric value, const char* memo, const char* action) : + m_enabled{true}, m_debit_side{debit_side}, m_allow_zero{allow_zero}, m_allow_negative{allow_negative}, + m_account{account}, m_value{value}, m_memo{memo}, m_action{action} {} virtual ~StockTransactionEntry() = default; virtual void set_fieldmask(FieldMask mask); @@ -862,7 +863,7 @@ struct StockTransactionStockCapGainsEntry : public StockTransactionEntry StockTransactionStockCapGainsEntry::StockTransactionStockCapGainsEntry(const StockTransactionEntry *cg_entry, const StockTransactionEntry *stk_entry) : StockTransactionEntry(!cg_entry->m_debit_side, cg_entry->m_allow_zero, cg_entry->m_allow_negative, - stk_entry->m_account, cg_entry->m_value, cg_entry->m_action) {} + stk_entry->m_account, cg_entry->m_value, cg_entry->m_memo, cg_entry->m_action) {} struct StockTransactionFeesEntry : public StockTransactionEntry {