1 #line 2 "src/Dbo/Splits.cpp"
6 #include "../Transactions/Transactions.h"
42 auto trans1 = GCW::Dbo::Transactions::byGuid( item1-> tx_guid() );
43 auto trans2 = GCW::Dbo::Transactions::byGuid( item2-> tx_guid() );
53 return trans1-> post_date()
54 < trans2-> post_date();
70 if( _splitGuid !=
"" )
72 Wt::Dbo::Transaction t(
GCW::app()-> gnucashew_session() );
89 if( _splitGuid !=
"" )
91 Wt::Dbo::Transaction t(
GCW::app()-> gnucashew_session() );
107 if( results.size() == 1 )
108 retVal = *results.begin();
120 Wt::Dbo::Transaction t(
GCW::app()-> gnucashew_session() );
123 GCW::app()-> gnucashew_session().addNew<
Item >( _splitGuid );
133 if( _accountGuid !=
"" )
135 Wt::Dbo::Transaction t(
GCW::app()-> gnucashew_session() );
142 .where(
"account_guid = ?" )
143 .bind( _accountGuid )
150 for(
auto result : results )
151 retVal.push_back( result );
178 Wt::Dbo::Transaction t(
GCW::app()-> gnucashew_session() );
182 .where(
"tx_guid = ?" )
183 .bind( splitItem-> tx_guid() )
192 for(
auto result : results )
193 if( result->
guid() != _splitGuid )
194 retVal.push_back( result );
215 Wt::Dbo::Transaction t(
GCW::app()-> gnucashew_session() );
219 .where(
"tx_guid = ?" )
224 for(
auto result : results )
225 retVal.push_back( result );
242 m_value_num = (_value * 100).getAsInteger();
251 m_quantity_num = (_value * 100).getAsInteger();
252 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.
const Wt::WFormModel::Field guid
auto bySplit(const std::string &_splitGuid) -> Item::Vector
Load Splits by Split.
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 load(const std::string &_splitGuid) -> Item::Ptr
Load a single split.
auto find(const std::string &_splitGuid) -> Item::Ptr
Find a single split.