def trip_summary(trip_id): trip = Trip.query.get(trip_id) daily_budget_remaining = summary.current_daily_budget(trip_id) total_spent_trip = summary.total_spent_trip(trip_id) total_trip_budget = summary.total_trip_budget(trip_id) currency = currencyutil.currencies[trip.preferred_currency_id] expense_list_html = summary.get_expense_summary_html(trip_id, 'category', currency) return flask.render_template('trips/summary.html', trip=trip, currency=currency, expense_list_html=expense_list_html, daily_budget_remaining=daily_budget_remaining, total_spent_trip=total_spent_trip, total_trip_budget=total_trip_budget)
def trip_summary(trip_id): trip = Trip.query.get(trip_id) daily_budget_remaining = summary.current_daily_budget(trip_id) total_spent_trip = summary.total_spent_trip(trip_id) total_trip_budget = summary.total_trip_budget(trip_id) currency = currencyutil.currencies[trip.preferred_currency_id] expense_list_html = summary.get_expense_summary_html( trip_id, 'category', currency) return flask.render_template('trips/summary.html', trip=trip, currency=currency, expense_list_html=expense_list_html, daily_budget_remaining=daily_budget_remaining, total_spent_trip=total_spent_trip, total_trip_budget=total_trip_budget)
def get_expense_summary(trip_id, group_type): trip = Trip.query.get(trip_id) currency = currencyutil.currencies[trip.preferred_currency_id] expense_list_html = summary.get_expense_summary_html(trip_id, group_type, currency) return flask.jsonify(expense_list_html=expense_list_html)
def get_expense_summary(trip_id, group_type): trip = Trip.query.get(trip_id) currency = currencyutil.currencies[trip.preferred_currency_id] expense_list_html = summary.get_expense_summary_html( trip_id, group_type, currency) return flask.jsonify(expense_list_html=expense_list_html)