|
GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
|
#include <Splits.h>
Inheritance diagram for GCW::Dbo::Splits::Item:Public Member Functions | |
| Item () | |
| Item (const std::string &_splitGuid) | |
| auto | guid () const -> const std::string & |
| auto | set_guid (const std::string &_guid) -> void |
| auto | tx_guid () const -> const std::string & |
| auto | set_tx_guid (const std::string &_guid) -> void |
| auto | account_guid () const -> const std::string & |
| auto | set_account_guid (const std::string &_guid) -> void |
| auto | memo () const -> const std::string & |
| auto | set_memo (const std::string &_value) -> void |
| auto | action () const -> const std::string & |
| auto | set_action (const std::string &_value) -> void |
| auto | reconcile_state () const -> const std::string & |
| auto | set_reconcile_state (const std::string &_state) -> void |
| auto | isReconciled () const -> bool |
| auto | reconcile_date () const -> const std::string & |
| auto | set_reconcile_date (const std::string &_date) -> void |
| auto | value_num () const -> int |
| auto | value_denom () const -> int |
| auto | quantity_num () const -> int |
| auto | quantity_denom () const -> int |
| auto | lot_guid () const -> const std::string & |
| auto | value (bool invert=false) const -> GCW_NUMERIC |
| Return 'value' as a decimal.h number. | |
| bool | valueIsNegative () const |
| Test for Negative. | |
| std::string | valueAsString (bool negate=false) const |
| Return Value as a formatted String. | |
| auto | set_value (GCW_NUMERIC _value) -> void |
| GCW_NUMERIC | quantity () const |
| Return 'quantity' as a decimal.h number. | |
| std::string | quantityAsString () const |
| auto | quantityIsNegative () const -> bool |
| auto | set_quantity (GCW_NUMERIC _value) -> void |
| template<class Action > | |
| void | persist (Action &action) |
Public Member Functions inherited from GCW::Dbo::BaseItem< Item > | |
| BaseItem () | |
Public Member Functions inherited from Wt::Dbo::Dbo< class C > | |
| Dbo () | |
| Dbo (const Dbo< C > &other) | |
| dbo_traits< C >::IdType | id () const |
| Session * | session () const |
| void | setDirty () |
| bool | isDirty () const |
| ptr< C > | self () const |
Private Attributes | |
| std::string | m_guid |
| std::string | m_tx_guid |
| std::string | m_account_guid |
| std::string | m_memo |
| std::string | m_action |
| std::string | m_reconcile_state = GCW_RECONCILE_NO |
| std::string | m_reconcile_date |
| int | m_value_num = 0 |
| int | m_value_denom = 0 |
| int | m_quantity_num = 0 |
| int | m_quantity_denom = 0 |
| std::string | m_lot_guid |
Additional Inherited Members | |
Public Types inherited from GCW::Dbo::BaseItem< Item > | |
| using | Ptr = Wt::Dbo::ptr< Item > |
| using | Collection = Wt::Dbo::collection< Ptr > |
| using | Vector = std::vector< Ptr > |
Split Item Class.
This class represents a 'split' within gnucash
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return true/false if the split is reconciled or not
Definition at line 158 of file Splits.h.
References GCW_RECONCILE_YES, and m_reconcile_state.
|
inline |
|
inline |
|
inline |
Definition at line 265 of file Splits.h.
References action(), Wt::Dbo::field(), Wt::Dbo::id(), m_account_guid, m_action, m_guid, m_lot_guid, m_memo, m_quantity_denom, m_quantity_num, m_reconcile_date, m_reconcile_state, m_tx_guid, m_value_denom, and m_value_num.
|
inline |
Return 'quantity' as a decimal.h number.
This converts the stored number in to a proper decimal<> number type. It can then be used in regular accounting calculations.
Definition at line 246 of file Splits.h.
References GCW_NUMERIC, quantity_denom(), and quantity_num().
Referenced by quantityAsString(), and quantityIsNegative().
|
inline |
Quantity Denominator field
Definition at line 188 of file Splits.h.
References m_quantity_denom.
Referenced by quantity().
|
inline |
Quantity Number field
Definition at line 183 of file Splits.h.
References m_quantity_num.
Referenced by quantity().
|
inline |
Definition at line 253 of file Splits.h.
References GCW::Cfg::decimal_format(), and quantity().
|
inline |
Definition at line 258 of file Splits.h.
References quantity().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| auto GCW::Dbo::Splits::Item::set_quantity | ( | GCW_NUMERIC | _value | ) | -> void |
Definition at line 225 of file Splits.cpp.
References GCW::Dbo::Accounts::byGuid().
|
inline |
|
inline |
|
inline |
| auto GCW::Dbo::Splits::Item::set_value | ( | GCW_NUMERIC | _value | ) | -> void |
Definition at line 214 of file Splits.cpp.
References GCW::Dbo::Accounts::byGuid().
|
inline |
|
inline |
Return 'value' as a decimal.h number.
This converts the stored number in to a proper decimal<> number type. It can then be used in regular accounting calculations. The inversion flag can be used to 'reset' the sign of the value for the purpose of displaying (otherwise negative) numbers with positive values only.
Definition at line 204 of file Splits.h.
References GCW_NUMERIC, value_denom(), and value_num().
Referenced by valueAsString(), and valueIsNegative().
|
inline |
Value Denominator field
Definition at line 178 of file Splits.h.
References m_value_denom.
Referenced by value().
|
inline |
Value Number field
Definition at line 173 of file Splits.h.
References m_value_num.
Referenced by value().
|
inline |
Return Value as a formatted String.
This uses the decimal.h library to format the number as a std::string.
Definition at line 232 of file Splits.h.
References GCW::Cfg::decimal_format(), and value().
|
inline |
|
private |
Definition at line 289 of file Splits.h.
Referenced by account_guid(), persist(), and set_account_guid().
|
private |
Definition at line 291 of file Splits.h.
Referenced by action(), persist(), and set_action().
|
private |
Definition at line 287 of file Splits.h.
Referenced by guid(), persist(), and set_guid().
|
private |
Definition at line 298 of file Splits.h.
Referenced by lot_guid(), and persist().
|
private |
Definition at line 290 of file Splits.h.
Referenced by memo(), persist(), and set_memo().
|
private |
Definition at line 297 of file Splits.h.
Referenced by persist(), and quantity_denom().
|
private |
Definition at line 296 of file Splits.h.
Referenced by persist(), and quantity_num().
|
private |
Definition at line 293 of file Splits.h.
Referenced by persist(), reconcile_date(), and set_reconcile_date().
|
private |
Definition at line 292 of file Splits.h.
Referenced by isReconciled(), persist(), reconcile_state(), and set_reconcile_state().
|
private |
Definition at line 288 of file Splits.h.
Referenced by persist(), set_tx_guid(), and tx_guid().
|
private |
Definition at line 295 of file Splits.h.
Referenced by persist(), and value_denom().
|
private |
Definition at line 294 of file Splits.h.
Referenced by persist(), and value_num().