The expected results changed with commit 80f7e60f49.
At the same time, improve readability of test results by
assigning a tag and ordering expected vs actual correctly.
The price import will now throw warnings if there are
invalid prices. The previous logic would 'auto-next' in this
case, only holding if the parse-file phase threw warnings.
This change insures that these warnings are seen.
With private data members, replacing direct member access with
accessor functions and refactoring functionality away from the
Model, View, and Controller container classes to the classes
that own the members.
This removes the need for RTTI inspection as regular virtual
function dispatch accounts for differences in Entry classes.
Replace multiple-responsibility function in the wrong class with a
single-responsibility function in the right class.
Changes the signature of a couple of PageStockValue functions.
Setting happens via callbacks and they were handed direct access
to the member variables so the validation wasn't happening.
Validation also requires a logger and passing that to the callbacks
would be hard.
It's StockEntry's responsibility not Model's. This lets us remove
the model parameter from PageStockAmount::prepare. It also requires
that we use StockEntry's set_amount method instead of just setting
m_amount it StockAssistantTest::instantiate_model.
Cash in lieu must be reported as a separate transaction. There was
already a note about that in reverse splits, apply it to regular
splits.
Add suggestion to enter a placeholder number when one can't
immediately calculate the capital gain on a sale or cover buy.
* Get the sign right when calculating new shares
* Fix displaying values and units on the summary page
* Don't display "missing" for values when the user skips
entering a 0 value.
* Create the Stock-account's fees split (when capitalizing)
and cap-gains split.
Substantially simplifies the code by reducing the needed indirection.
In most cases the StockTransactionEntry has everything the page needs
and can be passed as a parameter, further simplifying the code.
Requires moving some parameters around so we can initialize it
correctly:
All of the view's pages need to take an Account* and get its commodity
or currency in their ctors, and creation of the builder has to move to
gnc_stock_transaction_assistant and get passed in.
Caused by trying to set the account on the blank split. The blank split
was present because the method used to clear the split list for the
receiving transaction in gnc_float_txn_to_txn_swap_accounts only removed
splits that belong to the transaction, and the blank split doesn't.
Adds new function xaccTransClearSplits to do a more thorough job.
Also improve the documentation for xaccSplitDestroy to better explain when
a transaction will be destroyed if it empties the split list.
# Please enter the commit message for your
changes. Lines starting