GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
BudgetAmounts.cpp
Go to the documentation of this file.
1#line 2 "src/Dbo/BudgetAmounts/BudgetAmounts.cpp"
2
3#include "../App.h"
4#include "../Glb/Core.h"
5
6#include "BudgetAmounts.h"
7
8const char * GCW::Dbo::Invoices::s_tableName = "budget_amounts";
9
10const Wt::WFormModel::Field GCW::Dbo::Invoices::Field::guid = "guid" ; // text(32) PRIMARY KEY NOT NULL,
11const Wt::WFormModel::Field GCW::Dbo::Invoices::Field::id = "id" ; // text(2048) NOT NULL,
14const Wt::WFormModel::Field GCW::Dbo::Invoices::Field::notes = "notes" ; // text(2048) NOT NULL,
15const Wt::WFormModel::Field GCW::Dbo::Invoices::Field::active = "active" ; // integer NOT NULL,
16const Wt::WFormModel::Field GCW::Dbo::Invoices::Field::currency = "currency" ; // text(32) NOT NULL,
28
29auto
31load( const std::string & _guid )-> GCW::Dbo::Invoices::Item::Ptr
32{
34
35 if( _guid != "" )
36 {
37
38 Wt::Dbo::Transaction t( GCW::app()-> gnucashew_session() );
39
40 try
41 {
42 retVal =
43 GCW::app()-> gnucashew_session().load< GCW::Dbo::Invoices::Item >( _guid )
44 ;
45 }
46 catch( std::exception & e )
47 {
48 std::cout << __FILE__ << ":" << __LINE__ << " " << e.what() << std::endl;
49 }
50 }
51
52 return retVal;
53
54} // endload( const std::string & _guid )-> GCW::Dbo::Invoices::Item::Ptr
55
56auto
58byGuid( const std::string & _guid )-> GCW::Dbo::Invoices::Item::Ptr
59{
60 return load( _guid );
61
62} // endbyGuid( const std::string & _guid )-> GCW::Dbo::Invoices::Item::Ptr
63
64
const char * Field
const Wt::WFormModel::Field notes
const Wt::WFormModel::Field currency
const Wt::WFormModel::Field billing_id
const Wt::WFormModel::Field billto_guid
const Wt::WFormModel::Field date_posted
const Wt::WFormModel::Field active
const Wt::WFormModel::Field id
const Wt::WFormModel::Field post_lot
const Wt::WFormModel::Field billto_type
const Wt::WFormModel::Field post_acc
const Wt::WFormModel::Field owner_type
const Wt::WFormModel::Field date_opened
const Wt::WFormModel::Field charge_amt_num
const Wt::WFormModel::Field owner_guid
const Wt::WFormModel::Field post_txn
const Wt::WFormModel::Field guid
const Wt::WFormModel::Field charge_amt_denom
const Wt::WFormModel::Field terms
auto byGuid(const std::string &_guid) -> Item::Ptr
Load Invoice by Guid.
auto load(const std::string &_guid) -> Item::Ptr
Load Invoice by Guid.
const char * s_tableName
App * app()
Definition App.cpp:75