1#line 2 "src/Dbo/Transactions.cpp"
10set_num(
const std::string & _value )->
void
20 m_enter_date = _value;
68 set_post_date( _value.toString(
"yyyy-MM-dd 10:59:00" ).toUTF8() );
76 m_description = _value;
89 if(
GCW::app()-> gnucashew_session().isOpen() )
111 return load( _txGuid );
122 GCW::app()-> gnucashew_session().addNew<
Item >( _txGuid );
136 if(
GCW::app()-> gnucashew_session().isOpen() )
149 .where(
"guid in (select tx_guid from splits where account_guid = ?)" )
150 .bind( _accountGuid )
151 .orderBy(
"post_date" )
155 for(
auto result : results )
156 retVal.push_back( result );
176 for(
auto item : byAccount( _accountGuid ) )
177 if( item-> post_date_as_date().date().month() == _month
178 && item-> post_date_as_date().date().year() == thisYear
180 retVal.push_back( item );
197 .where(
"num = ? and post_date LIKE ?" )
200 .orderBy(
"post_date" )
204 for(
auto item : results )
205 retVal.push_back( item );
auto set_num(const std::string &_value) -> void
auto set_post_date(const Wt::WDate &_value) -> void
std::vector< Ptr > Vector
auto set_enter_date(const Wt::WDate &_value) -> void
auto set_description(const std::string &_value) -> void
static WDate currentDate()
#define GCW_DATETIME_FORMAT_STORAGE
#define GCW_DATE_DEFAULT_TIME
Default Time.
auto add(const std::string &_txGuid) -> Item::Ptr
Add Transaction with Guid.
auto byGuid(const std::string &_txGuid) -> Item::Ptr
Load Transaction by Guid.
auto byAccount(const std::string &_accountGuid) -> Item::Vector
Load Transactions for Account Guid.
auto byNumMonth(const std::string &_num, int _month) -> Item::Vector
Load Transactions for 'num' and Month.
auto byAccountMonth(const std::string &_accountGuid, int _month) -> Item::Vector
auto load(const std::string &_txGuid) -> Item::Ptr
Load Transaction by Guid.