reverse graph

This commit is contained in:
deflax 2017-06-11 06:31:14 +03:00
parent b118f07df5
commit abc78fdaf6
2 changed files with 2 additions and 2 deletions

View file

@ -137,7 +137,7 @@ def transaction(user_pid=0):
transactions = cuser.inv_transactions.order_by(Transaction.date_created.desc()).all() transactions = cuser.inv_transactions.order_by(Transaction.date_created.desc()).all()
translist = [] translist = []
for tr in transactions: for tr in transactions:
translist.append(tr.value) translist.insert(0, tr.value)
current_app.logger.info('[{}] transactions: {}'.format(cuser.email, translist)) current_app.logger.info('[{}] transactions: {}'.format(cuser.email, translist))
return render_template('uinvoice/transactions.html', transactions=transactions, translist=translist) return render_template('uinvoice/transactions.html', transactions=transactions, translist=translist)

View file

@ -34,7 +34,7 @@ def transactions():
transactions = Transaction.query.filter_by(user_id=current_user.pid).order_by(Transaction.date_created.asc()).all() transactions = Transaction.query.filter_by(user_id=current_user.pid).order_by(Transaction.date_created.asc()).all()
translist = [] translist = []
for tr in transactions: for tr in transactions:
translist.append(tr.value) translist.insert(0, tr.value)
return render_template('uinvoice/transactions.html', page=page, transactions=transactions, translist=translist) return render_template('uinvoice/transactions.html', page=page, transactions=transactions, translist=translist)