diff --git a/jdav_web/members/admin.py b/jdav_web/members/admin.py index 5311c40..56ca9c0 100644 --- a/jdav_web/members/admin.py +++ b/jdav_web/members/admin.py @@ -1094,6 +1094,10 @@ class FreizeitAdmin(CommonAdminMixin, nested_admin.NestedModelAdmin): if not memberlist.statement: messages.error(request, _("No statement found. Please add a statement and then retry.")) if "apply" in request.POST: + if not memberlist.statement.allowance_to_valid: + messages.error(request, + _("The configured recipients of the allowance don't match the regulations. Please correct this and try again.")) + return HttpResponseRedirect(reverse('admin:%s_%s_change' % (self.opts.app_label, self.opts.model_name), args=(memberlist.pk,))) memberlist.statement.submit(get_member(request)) messages.success(request, _("Successfully submited statement. The finance department will notify you as soon as possible.")) diff --git a/jdav_web/members/locale/de/LC_MESSAGES/django.po b/jdav_web/members/locale/de/LC_MESSAGES/django.po index b43fbfb..f52f21e 100644 --- a/jdav_web/members/locale/de/LC_MESSAGES/django.po +++ b/jdav_web/members/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-01-18 20:19+0100\n" +"POT-Creation-Date: 2025-01-18 23:22+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -390,6 +390,14 @@ msgstr "" "Keine Abrechnung angelegt. Bitte lege eine Abrechnung and und versuche es " "erneut." +#: members/admin.py +msgid "" +"The configured recipients of the allowance don't match the regulations. " +"Please correct this and try again." +msgstr "" +"Die ausgewählten Empfänger*innen der Aufwandsentschädigung stimmen nicht mit " +"den Richtlinien überein. Bitte korrigiere das und versuche es erneut. " + #: members/admin.py msgid "" "Successfully submited statement. The finance department will notify you as " @@ -1121,11 +1129,31 @@ msgstr "" #: members/templates/admin/freizeit_finance_overview.html #, python-format msgid "" -"In total these are contributions of %(total_per_yl)s€ times %(staff_count)s, " -"giving %(total_staff)s€." +"The allowance of %(allowance_per_yl)s€ per person is configured to be paid " +"to:" +msgstr "" +"Die Aufwandsentschädigung von %(allowance_per_yl)s€ pro Person wird " +"ausgezahlt an:" + +#: members/templates/admin/freizeit_finance_overview.html +#, python-format +msgid "" +"The subsidies for night and transportation costs of %(total_subsidies)s€ is " +"configured to be paid to:" msgstr "" -"Insgesamt sind das Kosten von %(total_per_yl)s€ mal %(staff_count)s, " -"insgesamt also %(total_staff)s€." +"Die Zuschüsse für Übernachtungs- und Fahrtkosten von %(total_subsidies)s€ " +"werden ausgezahlt an:" + +#: members/templates/admin/freizeit_finance_overview.html +msgid "" +"Warning: The configured recipients of the allowance don't match the " +"regulations. This might be because the number of recipients is bigger then " +"the number of admissable youth leaders for this excursion." +msgstr "" +"Warnung: Die ausgewählten Empfänger*innen der Aufwandsentschädigung stimmen " +"nicht mit den Richtlinien überein. Das kann daran liegen, dass die Anzahl " +"der ausgewählten Empfänger*innen die Anzahl genehmigter Jugendleiter*innen " +"übersteigt." #: members/templates/admin/freizeit_finance_overview.html msgid "LJP contributions" @@ -1824,6 +1852,14 @@ msgstr "abgelaufen" msgid "Invalid emergency contacts" msgstr "Ungültige Notfallkontakte" +#, python-format +#~ msgid "" +#~ "In total these are contributions of %(total_per_yl)s€ times " +#~ "%(staff_count)s, giving %(total_staff)s€." +#~ msgstr "" +#~ "Insgesamt sind das Kosten von %(total_per_yl)s€ mal %(staff_count)s, " +#~ "insgesamt also %(total_staff)s€." + #~ msgid "Your registration succeeded." #~ msgstr "Deine Registrierung war erfolgreich." diff --git a/jdav_web/members/templates/admin/freizeit_finance_overview.html b/jdav_web/members/templates/admin/freizeit_finance_overview.html index ffba21f..99aa909 100644 --- a/jdav_web/members/templates/admin/freizeit_finance_overview.html +++ b/jdav_web/members/templates/admin/freizeit_finance_overview.html @@ -77,8 +77,28 @@ cost plan!

-{% blocktrans %}In total these are contributions of {{ total_per_yl }}€ times {{ staff_count }}, giving {{ total_staff }}€.{% endblocktrans %} +{% blocktrans %}The allowance of {{ allowance_per_yl }}€ per person is configured to be paid to:{% endblocktrans %} +

+

+

+{% blocktrans %}The subsidies for night and transportation costs of {{ total_subsidies }}€ is configured to be paid to:{% endblocktrans %} +

+{% if not memberlist.statement.allowance_to_valid %} +

+{% blocktrans %}Warning: The configured recipients of the allowance don't match the regulations. This might be because the number of recipients is bigger then the number of admissable youth leaders for this excursion.{% endblocktrans %} +

+{% endif %}

{% trans "LJP contributions" %}