{% extends 'sstreasury/base.html' %} {# Society Self-Service Copyright © 2018–2020 Yingtong Li (RunasSudo) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . #} {% block title %}{{ revision.name }}{% endblock %} {% block maincontent %}

{{ revision.name }}

Status: {{ revision.get_state_display() }} {% if is_latest %} {% if revision.can_submit(request.user) %} {% endif %} {% if revision.can_endorse(request.user) %} {% endif %} {% if revision.can_approve(request.user) %} {% endif %} {% if revision.can_withdraw(request.user) %} {% endif %} {% if revision.can_edit(request.user) %} Edit {% endif %} Print {% if not revision.can_edit(request.user) and revision.can_withdraw(request.user) %}

This budget has been submitted and is now awaiting approval. If you wish to edit this budget, you must first withdraw it. This will revert the budget to a draft.

{% endif %} {% else %} Print

You are viewing an older version of this budget. To make any changes, click here to return to the current version.

{% endif %}
ID BU-{{ revision.budget.id }}
Title {{ revision.name }}
Due date {{ revision.date or '' }}
Event details {% if revision.event_dt %}{{ localtime(revision.event_dt) }}.{% endif %} {% if revision.event_attendees %}{{ revision.event_attendees }} attendees.{% endif %} {% if not revision.event_dt and not revision.event_attendees %}N/A{% endif %}
Contributors
Comments {{ revision.comments|markdown }}
Revenue
{% if revision.revenue_comments %}
Revenue comments
{{ revision.revenue_comments|markdown }}
{% endif %}
Expenses {% if revision.expense_no_emergency_fund %}

No emergency fund required (please add a comment explaining why)

{% endif %}
{% if revision.expense_comments %}
Expense comments
{{ revision.expense_comments|markdown }}
{% endif %}
Total Profit (Loss) {{ '${:.2f}'.format(revision.get_revenue_total() - revision.get_expense_total()) if revision.get_revenue_total() >= revision.get_expense_total() else '(${:.2f})'.format(revision.get_expense_total() - revision.get_revenue_total()) }}
{% if is_latest %}
{% if revision.state == import('sstreasury.models').BudgetState.AWAIT_REVIEW.value and request.user.groups.filter(name='Treasury').exists() %} {% elif revision.state != import('sstreasury.models').BudgetState.APPROVED.value and request.user.groups.filter(name='Secretary').exists() %} {% endif %}
{% for item in history %} {% if item.__class__.__name__ == 'BudgetComment' %}
{{ item.author.first_name }} {{ item.author.last_name }} commented
{{ localtime(item.time) }}
{{ item.content|markdown }}
{% elif item.__class__.__name__ == 'BudgetRevision' %}
{% if item.action == import('sstreasury.models').BudgetAction.CREATE.value %} {{ item.author.first_name }} {{ item.author.last_name }} created the budget (view) {% elif item.action == import('sstreasury.models').BudgetAction.EDIT.value %} {{ item.author.first_name }} {{ item.author.last_name }} edited the budget (view) {% elif item.action == import('sstreasury.models').BudgetAction.UPDATE_STATE.value %} {{ item.author.first_name }} {{ item.author.last_name }} changed the state to: {{ item.get_state_display() }} {% else %} {{ item.author.first_name }} {{ item.author.last_name }} modified the budget (view) {% endif %}
{{ localtime(item.time) }}
{% endif %} {% endfor %}
{% endif %} {% endblock %} {% block head %} {{ super() }} {% endblock %} {% block script %} {{ super() }} {% endblock %}