GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
BillTerms.cpp
Go to the documentation of this file.
1#line 2 "src/Dbo/BillTerms/BillTerms.cpp"
2
3#include "../App.h"
4#include "../Glb/Core.h"
5
6#include "BillTerms.h"
7
8const char * GCW::Dbo::BillTerms::s_tableName = "billterms";
9
10const Wt::WFormModel::Field GCW::Dbo::BillTerms::Field::guid = "guid" ; // text(32) PRIMARY KEY NOT NULL,
11const Wt::WFormModel::Field GCW::Dbo::BillTerms::Field::name = "name" ; // text(2048) NOT NULL,
12const Wt::WFormModel::Field GCW::Dbo::BillTerms::Field::description = "description" ; // text(2048) NOT NULL,
13const Wt::WFormModel::Field GCW::Dbo::BillTerms::Field::refcount = "refcount" ; // integer NOT NULL,
14const Wt::WFormModel::Field GCW::Dbo::BillTerms::Field::invisible = "invisible" ; // integer NOT NULL,
16const Wt::WFormModel::Field GCW::Dbo::BillTerms::Field::type = "type" ; // text(2048) NOT NULL,
22
23auto
25load( const std::string & _guid )-> GCW::Dbo::BillTerms::Item::Ptr
26{
28
29 if( _guid != "" )
30 {
31
32 Wt::Dbo::Transaction t( GCW::app()-> gnucashew_session() );
33
34 try
35 {
36 retVal =
37 GCW::app()-> gnucashew_session().load< GCW::Dbo::BillTerms::Item >( _guid )
38 ;
39 }
40 catch( std::exception & e )
41 {
42 std::cout << __FILE__ << ":" << __LINE__ << " " << e.what() << std::endl;
43 }
44 }
45
46 return retVal;
47
48} // endload( const std::string & _guid )-> GCW::Dbo::BillTerms::Item::Ptr
49
50auto
52byGuid( const std::string & _guid )-> GCW::Dbo::BillTerms::Item::Ptr
53{
54 return GCW::Dbo::BillTerms::load( _guid );
55
56} // endbyGuid( const std::string & _guid )-> GCW::Dbo::BillTerms::Item::Ptr
57
58
const char * Field
const Wt::WFormModel::Field description
Definition BillTerms.cpp:12
const Wt::WFormModel::Field refcount
Definition BillTerms.cpp:13
const Wt::WFormModel::Field discount_num
Definition BillTerms.cpp:19
const Wt::WFormModel::Field cutoff
Definition BillTerms.cpp:21
const Wt::WFormModel::Field parent
Definition BillTerms.cpp:15
const Wt::WFormModel::Field guid
Definition BillTerms.cpp:10
const Wt::WFormModel::Field discount_denom
Definition BillTerms.cpp:20
const Wt::WFormModel::Field discountdays
Definition BillTerms.cpp:18
const Wt::WFormModel::Field invisible
Definition BillTerms.cpp:14
const Wt::WFormModel::Field name
Definition BillTerms.cpp:11
const Wt::WFormModel::Field type
Definition BillTerms.cpp:16
const Wt::WFormModel::Field duedays
Definition BillTerms.cpp:17
const char * s_tableName
Definition BillTerms.cpp:8
auto byGuid(const std::string &_guid) -> Item::Ptr
Load by Guid.
Definition BillTerms.cpp:52
auto load(const std::string &_guid) -> Item::Ptr
Load by Guid.
Definition BillTerms.cpp:25
App * app()
Definition App.cpp:75