GnuCashew ~ GnuCash Enabled Web
GCW
|
#include <Splits.h>
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 | 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. More... | |
bool | valueIsNegative () const |
Test for Negative. More... | |
std::string | valueAsString (bool negate=false) const |
Return Value as a formatted String. More... | |
auto | set_value (GCW_NUMERIC _value) -> void |
GCW_NUMERIC | quantity () const |
Return 'quantity' as a decimal.h number. More... | |
std::string | quantityAsString () const |
auto | quantityIsNegative () const -> bool |
auto | set_quantity (GCW_NUMERIC _value) -> void |
template<class Action > | |
void | persist (Action &action) |
![]() | |
BaseItem () | |
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 | |
![]() | |
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 266 of file Splits.h.
References action(), GCW::Dbo::Invoices::Field::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 247 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 254 of file Splits.h.
References GCW::Cfg::decimal_format(), quantity(), and GCW::Gui::BillPay::toString().
|
inline |
Definition at line 259 of file Splits.h.
References quantity().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
auto GCW::Dbo::Splits::Item::set_quantity | ( | GCW_NUMERIC | _value | ) | -> void |
Definition at line 248 of file Splits.cpp.
|
inline |
|
inline |
|
inline |
auto GCW::Dbo::Splits::Item::set_value | ( | GCW_NUMERIC | _value | ) | -> void |
Definition at line 239 of file Splits.cpp.
|
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 233 of file Splits.h.
References GCW::Cfg::decimal_format(), GCW::Gui::BillPay::toString(), and value().
|
inline |
|
private |
Definition at line 287 of file Splits.h.
Referenced by account_guid(), persist(), and set_account_guid().
|
private |
Definition at line 289 of file Splits.h.
Referenced by action(), persist(), and set_action().
|
private |
Definition at line 285 of file Splits.h.
Referenced by guid(), persist(), and set_guid().
|
private |
Definition at line 296 of file Splits.h.
Referenced by lot_guid(), and persist().
|
private |
|
private |
Definition at line 295 of file Splits.h.
Referenced by persist(), and quantity_denom().
|
private |
Definition at line 294 of file Splits.h.
Referenced by persist(), and quantity_num().
|
private |
Definition at line 291 of file Splits.h.
Referenced by persist(), reconcile_date(), and set_reconcile_date().
|
private |
Definition at line 290 of file Splits.h.
Referenced by isReconciled(), persist(), reconcile_state(), and set_reconcile_state().
|
private |
Definition at line 286 of file Splits.h.
Referenced by persist(), set_tx_guid(), and tx_guid().
|
private |
Definition at line 293 of file Splits.h.
Referenced by persist(), and value_denom().
|
private |
Definition at line 292 of file Splits.h.
Referenced by persist(), and value_num().