Пример #1
0
        def testmatches(self, filter_id):
            u = accounts.user(cherrypy.request.login)
            f = accounts.importfilters(u)
            f.load_test_filter(u.id, filter_id)
            transactions = []
            for a in u.get_accounts():
                for t in a.get_transactions():
                    if f.testmatch(t):
                        transactions.append(t)

            return serve_template('/management/importfilters/testmatches.html', self, matches=transactions)
Пример #2
0
 def import1(self, accid):
     """begin import system for importing data into an account"""
     self.page = htmlobjects.Page('Import Account')
     return serve_template('account/import1.html', self, accid=accid, profiles=[{'id': p, 'name': p} for p in accounts.importprofile.profiles.keys()])
Пример #3
0
 def view(self, accid, description=None, category=None):
     acc = accounts.account(accid)
     _page = htmlobjects.Page(acc.name, "{}    {}".format(acc.number, acc.sortcode))
     return serve_template('account/view.html', _page, transactions=acc.get_transactions(description, category), categories=accounts.transaction.get_categories())
Пример #4
0
 def new(self):
     self.page = htmlobjects.Page('New Account')
     return serve_template('account/new.html', self, profiles=[{'id': p, 'name': p} for p in accounts.importprofile.profiles.keys()])
Пример #5
0
 def index(self, query):
     user = accounts.user(cherrypy.request.login)
     transactions = accounts.account.search_transactions(user, query)
     return serve_template('search/index.html', self, transactions=transactions, categories=accounts.transaction.get_categories())
Пример #6
0
 def index(self):
     user = accounts.user(cherrypy.request.login)
     return serve_template('index.html', self, accounts=user.get_accounts())
Пример #7
0
 def monthly_change(self):
     u = accounts.user(cherrypy.request.login)
     months, data = accounts.reports.monthly_change(u.id)
     return serve_template('/reports/monthly_change.html', self, months=months, data=data, categories=accounts.transaction.category_lookup())
Пример #8
0
 def category_totals(self):
     u = accounts.user(cherrypy.request.login)
     return serve_template('/reports/category_totals.html', self, totals=accounts.reports.category_totals(u.id))
Пример #9
0
 def index(self):
     return serve_template('/reports/index.html', self)
Пример #10
0
 def edit(self, filter_id):
     return serve_template('/management/importfilters/edit.html', self,
                           positions=accounts.importfilters.filter.positions.keys(),
                           fields=accounts.importfilters.filter.fields,
                           categories=accounts.transaction.get_categories(),
                           f=accounts.importfilters.get_one(filter_id))
Пример #11
0
 def new(self, pattern=''):
     return serve_template('/management/importfilters/new.html', self,
                           pattern=pattern,
                           positions=accounts.importfilters.filter.positions.keys(),
                           fields=accounts.importfilters.filter.fields,
                           categories=accounts.transaction.get_categories())
Пример #12
0
 def index(self):
     u = accounts.user(cherrypy.request.login)
     filters = accounts.importfilters.get_all(u.id)
     return serve_template('/management/importfilters/index.html', self, filters=filters)
Пример #13
0
 def new(self):
     return serve_template('/management/transactiontypes/new.html', self, categories=accounts.transaction.get_categories())
Пример #14
0
 def index(self):
     ttypes = accounts.transaction.types.get_all()
     return serve_template('/management/transactiontypes/index.html', self, types=ttypes)
Пример #15
0
 def index(self):
     return serve_template('/management/index.html', self)