GnuCashew ~ GnuCash Enabled Web
GCW
Prefrences.cpp
Go to the documentation of this file.
1 #line 2 "src/Dbo/Prefrences.cpp"
2 
3 #include <Wt/Json/Parser.h>
4 #include <Wt/Json/Object.h>
5 #include <Wt/Json/Serializer.h>
6 
7 #include "../App.h"
8 #include "Prefrences.h"
9 
10 
13 {
14 }
15 
16 
17 auto
20 {
21  Wt::Dbo::Transaction t( GCW::app()-> gnucashew_session() );
22 
23  GCW::Dbo::Prefrences::Item retVal( GCW::Dbo::Vars::get( "prefrences", "system" ) );
24 
25  return retVal;
26 
27 } // endget()
28 
29 auto
31 reverseBalanceAccounts() const-> GCW::Dbo::Prefrences::ReverseBalanceAccounts
32 {
33 // return GCW::Dbo::Prefrences::ReverseBalanceAccounts::NONE;
34 // return GCW::Dbo::Prefrences::ReverseBalanceAccounts::INCOME_EXPENSE;
36 }
37 
38 auto
41 {
42 // if( _value == AccountRegisterHighlight::NEGVAL_EXTRA )
43 // return true;
44 
45  if( _value == AccountRegisterHighlight::NORMAL )
46  return true;
47 
48  return false;
49 
50 } // endaccountRegisterHighlight( AccountRegisterHighlight _value ) const-> bool
51 
52 auto
54 askOnDelete() const-> bool
55 {
56  return false;
57 
58 } // endaskOnDelete() const-> bool
59 
60 
61 
62 
Wt::Dbo::ptr< Item > Ptr
Definition: BaseItem.h:39
Variables Item Class.
Definition: Prefrences.h:65
auto reverseBalanceAccounts() const -> ReverseBalanceAccounts
Definition: Prefrences.cpp:31
Item(GCW::Dbo::Vars::Item::Ptr _varItem)
Definition: Prefrences.cpp:12
auto askOnDelete() const -> bool
Definition: Prefrences.cpp:54
auto accountRegisterHighlight(AccountRegisterHighlight _value) const -> bool
Definition: Prefrences.cpp:40
@ CREDIT
credit account balances are reversed
AccountRegisterHighlight
Account Register Highlighting.
Definition: Prefrences.h:48
@ NORMAL
normal handling - neg values are red
auto get() -> GCW::Dbo::Prefrences::Item
Definition: Prefrences.cpp:19
GCW::Dbo::Vars::Item::Ptr get(const std::string &_keyValue, const std::string &_cfyValue="*", bool _add=true)
Definition: Vars.cpp:16
Definition: App.h:17
App * app()
Definition: App.cpp:67