Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a16eb12
build(deps): update google-auth requirement
dependabot[bot] Aug 31, 2026
ea041f2
Added MAXIMUM_DIRECT_DEBIT_AMOUNT environment variable. Rows above th…
Jul 15, 2026
5a58262
Adding error icon
Jul 15, 2026
9be885f
Fix double description
Sep 1, 2026
5dc349e
Change Declaration reply-to email soccie
Sep 1, 2026
14d213f
Merge pull request #1344 from Inter-Actief/Change-soccie-treasurer-email
Kurocon Sep 1, 2026
9c6e45a
Merge pull request #1340 from Inter-Actief/dependabot/pip/google-auth…
Kurocon Sep 1, 2026
6abc84b
build(deps): update django-debug-toolbar requirement
dependabot[bot] Sep 7, 2026
b45aca2
updated birthday picture
Towertje Sep 10, 2026
f5ac12d
Merge pull request #1347 from Inter-Actief/change-board-birthday-picture
Kurocon Sep 10, 2026
1b9a42b
build(deps): update google-auth requirement
dependabot[bot] Sep 14, 2026
f0c3db6
build(deps): update sentry-sdk requirement
dependabot[bot] Sep 14, 2026
3fbdd5f
Added overflow: auto to 3 divs
Towertje Sep 14, 2026
b045750
Wrapped the tables in a div with 'table-responsive'
Towertje Sep 15, 2026
20adde9
Merge pull request #1353 from Inter-Actief/1352-roomduty-overview-on-…
Kurocon Sep 15, 2026
b7ac51d
Merge pull request #1346 from Inter-Actief/dependabot/pip/django-debu…
Kurocon Sep 15, 2026
e9a1965
Merge pull request #1350 from Inter-Actief/dependabot/pip/google-auth…
Kurocon Sep 15, 2026
bc5c41e
Merge pull request #1351 from Inter-Actief/dependabot/pip/sentry-sdk-…
Kurocon Sep 15, 2026
d3db3b3
Merge pull request #1290 from Inter-Actief/1286-automatically-deselec…
Kurocon Sep 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified amelie/members/static/img/board_happy_birthday.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions amelie/personal_tab/debt_collection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import datetime

from django.db import transaction
from django.conf import settings
from django.db.models import Sum, Q
from django.template.defaultfilters import date as _date
from django.utils import timezone, translation
Expand Down Expand Up @@ -188,9 +189,10 @@ def generate_cookie_corner_instructions(end_date):
person = Person.objects.get(id=p['person'])
transactions = all_transactions.filter(person=person)
price = transactions.aggregate(Sum('price'))['price__sum']
above_maximum = False

if price == 0:
continue
continue

authorization = authorization_cookie_corner(person)
instruction = None
Expand All @@ -211,13 +213,17 @@ def generate_cookie_corner_instructions(end_date):
instruction = DebtCollectionInstruction(amount=price, authorization=authorization,
description=description,
amendment=authorization.next_amendment())

if price > settings.MAXIMUM_DIRECT_DEBIT_AMOUNT:
above_maximum = True

row = {
'person': person,
'authorization': authorization,
'sum': price,
'instruction': instruction,
'transactions': transactions
'transactions': transactions,
'above_maximum': above_maximum,
}

if price < 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@
{% for row in rows %}
<tr>
{% if enabled %}
<td>
<input type="checkbox" {% if default %}checked="checked"{% endif %}
name="cookie_corner_{{ row.person.id }}" value="true"/>
</td>
{% if not row.above_maximum %}
<td>
<input type="checkbox" {% if default %}checked="checked"{% endif %}
name="cookie_corner_{{ row.person.id }}" value="true"/>
</td>
{% else %}
<td>
<p class="icon icon-error"></p>
</td>
{% endif %}
{% endif %}
<td>
<a href="{{ row.person.get_absolute_url }}">
Expand All @@ -46,7 +52,11 @@
{% if row.instruction.description %}
<tr>
<td colspan="{% if enabled %}4{% else %}3{% endif %}">
{% if not row.above_maximum %}
{{ row.instruction.description }}
{% else %}
<b>{% blocktrans with maximum=maximum_debit_amount|floatformat:2 %}This person's balance is higher than &euro; {{ maximum }}, so they cannot be debited.{% endblocktrans %}</b>
{% endif %}
</td>
</tr>
{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion amelie/personal_tab/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,8 @@ def debt_collection_new(request):
'contribution_instructions': contribution_instructions,
'contribution_totals': contribution_totals,
'cookie_corner_instructions': cookie_corner_instructions,
'cookie_corner_totals': cookie_corner_totals
'cookie_corner_totals': cookie_corner_totals,
'maximum_debit_amount': settings.MAXIMUM_DIRECT_DEBIT_AMOUNT,
})


Expand Down
68 changes: 35 additions & 33 deletions amelie/room_duty/templates/room_duty/table/fill.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,43 @@ <h2>{% blocktrans %}Fill in {{ table }} availability{% endblocktrans %}</h2>
{% for error in form.non_field_errors %}
{{ error|safe }}
{% endfor %}
<form method="post">
<form method="post" >
{% csrf_token %}
<table>
<tr>
<th>{% trans "Begin" %}</th>
<th>{% trans "End" %}</th>
<th colspan="2">{% trans "Availability" %}</th>
<th>{% trans "Comments" %}</th>
</tr>
{% for room_duty, availability, form in availabilities %}
<tr class="room-duty-weekday-{{ room_duty.begin.weekday|divisibleby:"2"|yesno:"even,odd" }}">
{% for error in form.non_field_errors %}
<td class="icon-error">{{ error }}</td>
{% endfor %}
<td>
{{ room_duty.begin|date:"D d/m H:i" }}
</td>
<td>
{{ room_duty.end|date:"D d/m H:i" }}
</td>
<td>
{{ form.availability.errors|safe }}
{{ form.availability }}
</td>
<td>
{{ form.hungover.errors|safe }}
<label for="{{ form.hungover.id_for_label }}">{{ form.hungover }} {% trans 'Hungover' %}</label>
</td>
<td>
{{ form.comments.errors|safe }}
{{ form.comments }}
</td>
<div class="table-responsive">
<table>
<tr>
<th>{% trans "Begin" %}</th>
<th>{% trans "End" %}</th>
<th colspan="2">{% trans "Availability" %}</th>
<th>{% trans "Comments" %}</th>
</tr>
{% endfor %}
</table>
{% for room_duty, availability, form in availabilities %}
<tr class="room-duty-weekday-{{ room_duty.begin.weekday|divisibleby:"2"|yesno:"even,odd" }}">
{% for error in form.non_field_errors %}
<td class="icon-error">{{ error }}</td>
{% endfor %}
<td>
{{ room_duty.begin|date:"D d/m H:i" }}
</td>
<td>
{{ room_duty.end|date:"D d/m H:i" }}
</td>
<td>
{{ form.availability.errors|safe }}
{{ form.availability }}
</td>
<td>
{{ form.hungover.errors|safe }}
<label for="{{ form.hungover.id_for_label }}">{{ form.hungover }} {% trans 'Hungover' %}</label>
</td>
<td>
{{ form.comments.errors|safe }}
{{ form.comments }}
</td>
</tr>
{% endfor %}
</table>
</div>
<input type="submit" value="{% trans 'Save' %}">
</form>
</div>
Expand Down
144 changes: 74 additions & 70 deletions amelie/room_duty/templates/room_duty/table/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,55 +95,57 @@ <h2>
<a href="{% url 'room_duty:table_fill' table.pk %}" class="looks-like-a-button">{% trans "Fill in" %}</a>
<label for="edit-participants"><a class="looks-like-a-button">{% blocktrans %}Toggle assignment{% endblocktrans %}</a></label>
<input id="edit-participants" type="checkbox" style="display: none">
<table>
<tr id="row-names">
<th>{% trans "Begin" %}</th>
<th>{% trans "End" %}</th>
<th>{% trans "Assignment" %}</th>
{% for person in table.persons %}
<th data-person="{{ person.pk }}">{{ person.first_name }}</th>
{% endfor %}
</tr>
{% for room_duty in room_duties %}
{% with room_duty.begin|timezone:"Europe/Amsterdam" as rd_begin %}
<tr class="room-duty room-duty-weekday-{{ room_duty.begin.weekday|divisibleby:"2"|yesno:"even,odd" }}"
data-morning="{% if rd_begin.hour < 12 %}1{% else %}0{% endif %}"
data-duration="{{ room_duty.duration|escapejs }}">
<td style="{% if request.person in room_duty.participant_set.all %}font-weight:bold;{% endif %}">{{ room_duty.begin|date:"D d/m H:i" }}</td>
<td style="{% if request.person in room_duty.participant_set.all %}font-weight:bold;{% endif %}">{{ room_duty.end|date:"D d/m H:i" }}</td>
<td class="division" style="{% if request.person in room_duty.participant_set.all %}font-weight:bold;{% endif %}">{{ room_duty.participant_names|join:", " }}</td>
{% for availability, checkbox in room_duty.template_data %}
<td class="availability
{{ availability.css_class }}
{% if availability.hungover %}room-duty-hungover{% endif %}"
data-person="{{ checkbox.data.value }}">
<div class="table-responsive">
<table>
<tr id="row-names">
<th>{% trans "Begin" %}</th>
<th>{% trans "End" %}</th>
<th>{% trans "Assignment" %}</th>
{% for person in table.persons %}
<th data-person="{{ person.pk }}">{{ person.first_name }}</th>
{% endfor %}
</tr>
{% for room_duty in room_duties %}
{% with room_duty.begin|timezone:"Europe/Amsterdam" as rd_begin %}
<tr class="room-duty room-duty-weekday-{{ room_duty.begin.weekday|divisibleby:"2"|yesno:"even,odd" }}"
data-morning="{% if rd_begin.hour < 12 %}1{% else %}0{% endif %}"
data-duration="{{ room_duty.duration|escapejs }}">
<td style="{% if request.person in room_duty.participant_set.all %}font-weight:bold;{% endif %}">{{ room_duty.begin|date:"D d/m H:i" }}</td>
<td style="{% if request.person in room_duty.participant_set.all %}font-weight:bold;{% endif %}">{{ room_duty.end|date:"D d/m H:i" }}</td>
<td class="division" style="{% if request.person in room_duty.participant_set.all %}font-weight:bold;{% endif %}">{{ room_duty.participant_names|join:", " }}</td>
{% for availability, checkbox in room_duty.template_data %}
<td class="availability
{{ availability.css_class }}
{% if availability.hungover %}room-duty-hungover{% endif %}"
data-person="{{ checkbox.data.value }}">

{{ checkbox.tag }}
{{ checkbox.tag.errors }}
{{ checkbox.tag }}
{{ checkbox.tag.errors }}

{% if availability == None %}
-
{% else %}
{{ availability.availability }}{% if availability.hungover %}B{% endif %}
{% if availability.comments %}
<span class="icon icon-comment"
onclick="alert('{{ availability.comments|escapejs }}');"
title="{{ availability.comments }}">
</span>
{% if availability == None %}
-
{% else %}
{{ availability.availability }}{% if availability.hungover %}B{% endif %}
{% if availability.comments %}
<span class="icon icon-comment"
onclick="alert('{{ availability.comments|escapejs }}');"
title="{{ availability.comments }}">
</span>
{% endif %}
{% endif %}
{% endif %}
</td>
</td>
{% endfor %}
</tr>
{% endwith %}
{% endfor %}
<tr id="row-schema">
<td colspan="3">{% trans 'Total' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}">{{ person.room_duty_stats_table.total|escapejs }}</td>
{% endfor %}
</tr>
{% endwith %}
{% endfor %}
<tr id="row-schema">
<td colspan="3">{% trans 'Total' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}">{{ person.room_duty_stats_table.total|escapejs }}</td>
{% endfor %}
</tr>
</table>
</table>
</div>
<input type="submit" value="{% trans 'Save' %}">
</form>
</div>
Expand All @@ -152,32 +154,34 @@ <h2>
<div class="ia">
<h2>{% trans 'Statistics' %}</h2>
<div class="content">
<table>
<tr>
<th><!-- Dummy --></th>
{% for person in table.persons %}
<th>{{ person.first_name }}</th>
{% endfor %}
</tr>
<tr id="row-morning">
<td>{% trans 'Morning office duties' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}" data-base="{{ person.room_duty_stats_base.morning }}">{{ person.room_duty_stats.morning|escapejs }}</td>
{% endfor %}
</tr>
<tr id="row-afternoon">
<td>{% trans 'Afternoon office duties' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}" data-base="{{ person.room_duty_stats_base.afternoon }}">{{ person.room_duty_stats.afternoon|escapejs }}</td>
{% endfor %}
</tr>
<tr id="row-total">
<td>{% trans 'Total' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}" data-base="{{ person.room_duty_stats_base.total }}">{{ person.room_duty_stats.total|escapejs }}</td>
{% endfor %}
</tr>
</table>
<div class="table-responsive">
<table>
<tr>
<th><!-- Dummy --></th>
{% for person in table.persons %}
<th>{{ person.first_name }}</th>
{% endfor %}
</tr>
<tr id="row-morning">
<td>{% trans 'Morning office duties' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}" data-base="{{ person.room_duty_stats_base.morning }}">{{ person.room_duty_stats.morning|escapejs }}</td>
{% endfor %}
</tr>
<tr id="row-afternoon">
<td>{% trans 'Afternoon office duties' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}" data-base="{{ person.room_duty_stats_base.afternoon }}">{{ person.room_duty_stats.afternoon|escapejs }}</td>
{% endfor %}
</tr>
<tr id="row-total">
<td>{% trans 'Total' %}</td>
{% for person in table.persons %}
<td class="statistic" data-person="{{ person.pk }}" data-base="{{ person.room_duty_stats_base.total }}">{{ person.room_duty_stats.total|escapejs }}</td>
{% endfor %}
</tr>
</table>
</div>
</div>
</div>
{% endblock %}
4 changes: 4 additions & 0 deletions amelie/settings/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,10 @@ def custom_show_toolbar(request):
# Cookie corner Wrapped
COOKIE_CORNER_WRAPPED_YEAR = env.int("COOKIE_CORNER_WRAPPED_YEAR", default=COOKIE_CORNER_WRAPPED_YEAR)

# The maximum amount Inter-Actief can debit from a person per direct debit
MAXIMUM_DIRECT_DEBIT_AMOUNT = Decimal(env("MAXIMUM_DIRECT_DEBIT_AMOUNT", default=MAXIMUM_DIRECT_DEBIT_AMOUNT))


# Printer configuration

# Maximum file size for printed files, in bytes (i.e. 50MB = 50 * 1024 * 1024 bytes)
Expand Down
5 changes: 4 additions & 1 deletion amelie/settings/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
# The direct debit debtor ID of Inter-Actief that needs to be printed on the autorization forms
DIRECT_DEBIT_DEBTOR_ID = 'NL81ZZZ400749470000'

# The maximum amount Inter-Actief can debit from a person per direct debit
MAXIMUM_DIRECT_DEBIT_AMOUNT = 250.00

# The ID of the personal_tab.PaymentMethod object representing an early termination (no payment needed).
MEMBERS_EARLY_TERMINATION_PAYMENT_METHOD_ID = 10
# The ID of the personal_tab.PaymentMethod object representing a Forgiven payment (no payment needed).
Expand Down Expand Up @@ -605,7 +608,7 @@
}
TREASURER_EMAIL = 'Penningmeester Inter-Actief <penningmeester@inter-actief.net>'
TREASURER_EMAIL_COMMITTEE_OVERRIDE = {
"SocCie": "Sociëteitscommissie <soccie@inter-actief.net>",
"SocCie": "Quaestor SocCie <quaestor@soccie.net>",
"Kick-IT": "Kick-IT <kick-it@inter-actief.net>",
}
PERSONAL_TAB_DECLARATION_MAX_FILE_SIZE = 20 * 1024 * 1024 # 20 MB total, because email size limit is 25 MB
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ dependencies = [

# Google API Client
"google-api-python-client>=2.192.0,<3",
"google-auth>=2.49.1,<2.57",
"google-auth>=2.49.1,<2.59",
"pyOpenSSL>=26.0.0,<26.5.0",

# Development
"django-debug-toolbar>=3.7,<7.2",
"django-debug-toolbar>=3.7,<8.1",
"django-rosetta>=0.10.3,<0.11",
"docutils>=0.19,<0.24",
"pyinotify",
Expand All @@ -115,7 +115,7 @@ dependencies = [
"mozilla-django-oidc>=5.0.2,<5.1",

# Sentry error logging
"sentry-sdk>=2.54.0,<2.69",
"sentry-sdk>=2.54.0,<2.70",

# Health checks for Django
"django-health-check[psutil,celery,rabbitmq,redis]>=4.0,<4.6",
Expand Down
Loading