GnuCash
5.6-150-g038405b370+
|
Specialized StockTransactionEntry for the stock split. More...
Public Member Functions | |
StockTransactionStockEntry (const char *action) | |
void | set_fieldmask (FieldMask mask) override |
Set up the state variables from the FieldMask. More... | |
void | set_amount (gnc_numeric amount) override |
gnc_numeric | amount () const override |
bool | has_amount () const override |
void | validate_amount (Logger &logger) const override |
void | create_split (Transaction *trans, AccountVec &account_commits) const override |
std::string | amount_str_for_display () const override |
Generate a string representation of the value. More... | |
gnc_numeric | calculate_price () const override |
Calculate the price (amount/value) for non-currency accounts. More... | |
bool | marker_split () const override |
![]() | |
StockTransactionEntry (const char *action, const char *kvp_tag) | |
StockTransactionEntry (const StockTransactionEntry &)=default | |
virtual bool | enabled () const |
virtual bool | debit_side () const |
virtual void | set_capitalize (bool capitalize) |
virtual bool | input_new_balance () const |
virtual bool | do_capitalize () const |
virtual void | set_account (Account *account) |
virtual Account * | account () const |
virtual const char * | print_account () const |
virtual void | set_memo (const char *memo) |
virtual const char * | get_kvp_tag () |
virtual const char * | memo () const |
virtual void | set_value (gnc_numeric amount) |
virtual GncNumeric | value () |
virtual void | set_balance (gnc_numeric balance) |
virtual gnc_numeric | get_balance () const |
virtual const char * | print_value () const |
virtual const char * | print_amount (gnc_numeric amt) const |
virtual const char * | print_price () const |
Additional Inherited Members | |
![]() | |
bool | m_enabled |
bool | m_debit_side |
bool | m_allow_zero |
bool | m_allow_negative |
bool | m_input_new_balance = false |
Account * | m_account |
gnc_numeric | m_value |
const char * | m_memo |
const char * | m_action |
gnc_numeric | m_balance = gnc_numeric_zero() |
const char * | m_kvp_tag |
int | m_qof_event_handler |
Specialized StockTransactionEntry for the stock split.
Unlike the base class it has an amount separate from the value and set amount can optionally take a post-transaction balance, used to calculate the amount and split ratio for split and reverse-split transactions. Its validate_amount method first calls the base class member to validate the value then performs addtional checks on the amount and price.
Definition at line 785 of file assistant-stock-transaction.cpp.
|
overridevirtual |
Generate a string representation of the value.
Internally uses xaccPrintAmount, which writes to a static string, so the result is copied to a std::string to prevent it being replaced by subsequent calls.
Reimplemented from StockTransactionEntry.
Definition at line 896 of file assistant-stock-transaction.cpp.
|
overridevirtual |
Calculate the price (amount/value) for non-currency accounts.
Note that multiple currencies in stock transaction s are not supported.
Reimplemented from StockTransactionEntry.
Definition at line 960 of file assistant-stock-transaction.cpp.
|
overridevirtual |
Set up the state variables from the FieldMask.
A | Fieldmast to configure the StockTransactionEntry. |
Reimplemented from StockTransactionEntry.
Definition at line 813 of file assistant-stock-transaction.cpp.