1#line 2 "src/Dbo/Splits.cpp"
6#include "../Transactions/Transactions.h"
42 auto trans1 = GCW::Dbo::Transactions::byGuid( splitItem1-> tx_guid() );
43 auto trans2 = GCW::Dbo::Transactions::byGuid( splitItem2-> tx_guid() );
72 if( trans1-> post_date()
73 == trans2-> post_date()
78 return splitItem1-> value()
79 > splitItem2-> value()
86 return trans1-> post_date()
87 < trans2-> post_date()
107 if( _splitGuid !=
"" )
126 if( _splitGuid !=
"" )
143 if( results.size() == 1 )
144 retVal = *results.begin();
159 GCW::app()-> gnucashew_session().addNew<
Item >( _splitGuid );
169 if( _accountGuid !=
"" )
178 .where(
"account_guid = ?" )
179 .bind( _accountGuid )
186 for(
auto result : results )
187 retVal.push_back( result );
217 .where(
"tx_guid = ?" )
218 .bind( splitItem-> tx_guid() )
226 for(
auto result : results )
227 if( result-> guid() != _splitGuid )
228 retVal.push_back( result );
252 .where(
"tx_guid = ?" )
257 for(
auto result : results )
258 retVal.push_back( result );
274 m_value_num = (_value * 100).getAsInteger();
283 m_quantity_num = (_value * 100).getAsInteger();
284 m_quantity_denom = 100;
std::vector< Ptr > Vector
auto set_quantity(GCW_NUMERIC _value) -> void
auto set_value(GCW_NUMERIC _value) -> void
#define GCW_NUMERIC
Internal Numeric Type.
auto byTransaction(const std::string &_txGuid) -> Item::Vector
Load Splits by Transaction.
auto byAccount(const std::string &_accountGuid) -> Item::Vector
Load Splits by Account.
auto add(const std::string &_splitGuid) -> Item::Ptr
Add a single split.
auto bySplitExcept(const std::string &_splitGuid) -> Item::Vector
Load Splits by Split.
auto load(const std::string &_splitGuid) -> Item::Ptr
Load a single split.
auto find(const std::string &_splitGuid) -> Item::Ptr
Find a single split.