def new_transaction(): merchants = merchant_repository.select_all() categorys = category_repository.select_all() users = user_repository.select_all() return render_template("transactions/new.html", merchants=merchants, categorys=categorys, users=users)
def edit_transaction(id): transaction = transaction_repository.select(id) merchants = merchant_repository.select_all() categorys = category_repository.select_all() users = user_repository.select_all() return render_template("transactions/edit.html", transaction=transaction, merchants=merchants, categorys=categorys, users=users)
def filter_category(): filter = request.form['filter'] filtered_transactions = transaction_repository.filter_by_category(filter) categorys = category_repository.select_all() users = user_repository.select_all() total = transaction_repository.total_amount(filtered_transactions) return render_template("transactions/index.html", transactions=filtered_transactions, categorys=categorys, users=users, total=total)
def transactions(): all_transactions = transaction_repository.select_all() total = transaction_repository.total_amount(all_transactions) transactions = transaction_repository.sort_transactions(all_transactions) users = user_repository.select_all() categorys = category_repository.select_all() return render_template("transactions/index.html", transactions=transactions, total=total, categorys=categorys, users=users)
def edit_company(id): company = company_repository.select(id) category = category_repository.select_all() account = account_repository.select_all() return render_template('companys/edit.html', company=company, all_category=category, accounts=account)
def company(): category = category_repository.select_all() company = company_repository.select_all() account = account_repository.select_all() users = user_repository.select_all() return render_template('index.html', all_company=company, all_category=category, accounts=account, users=users)
def users(): categorys = category_repository.select_all() return render_template("categorys/index.html", categorys=categorys)
def new_user(): categorys = category_repository.select_all() return render_template("categorys/new.html", categorys=categorys)