From 633230b6070501d545d2ec3207dbad7458de7202 Mon Sep 17 00:00:00 2001 From: mariusrklein <47218379+mariusrklein@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:03:32 +0200 Subject: [PATCH] abstract org fee into config variable --- jdav_web/finance/locale/de/LC_MESSAGES/django.po | 6 +++--- jdav_web/finance/models.py | 5 +++-- .../admin/overview_submitted_statement.html | 2 +- .../templates/finance/statement_summary.tex | 4 ++-- jdav_web/jdav_web/settings/local.py | 2 ++ jdav_web/members/locale/de/LC_MESSAGES/django.po | 16 ++++++++-------- .../admin/freizeit_finance_overview.html | 2 +- 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/jdav_web/finance/locale/de/LC_MESSAGES/django.po b/jdav_web/finance/locale/de/LC_MESSAGES/django.po index c875643..df726c6 100644 --- a/jdav_web/finance/locale/de/LC_MESSAGES/django.po +++ b/jdav_web/finance/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-04-15 21:12+0200\n" +"POT-Creation-Date: 2025-04-27 23:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -553,12 +553,12 @@ msgstr "Organisationsbeitrag" #, python-format msgid "" "Since overaged people where part of the excursion, an organisational fee of " -"10,00€ per person per day has to be paid. This totals to " +"%(org_fee)s€ per person per day has to be paid. This totals to " "%(total_org_fee_theoretical)s€. This organisational fee will be accounted " "against allowances and subsidies." msgstr "" "Da Personen über 27 an der Ausfahrt teilnehommen haben, wird ein " -"Organisationsbeitrag von 10,00€ pro Person und Tag fällig. Der Gesamtbetrag " +"Organisationsbeitrag von %(org_fee)s€ pro Person und Tag fällig. Der Gesamtbetrag " "von %(total_org_fee_theoretical)s€ wird mit Zuschüssen und " "Aufwandsentschädigungen verrechnet." diff --git a/jdav_web/finance/models.py b/jdav_web/finance/models.py index 7c36025..2e4b3e1 100644 --- a/jdav_web/finance/models.py +++ b/jdav_web/finance/models.py @@ -381,10 +381,10 @@ class Statement(CommonModel): @property def total_org_fee_theoretical(self): - """participants older than 26.99 years need to pay a fee of 10€ per person per day.""" + """participants older than 26.99 years need to pay a specified organisation fee per person per day.""" if self.excursion is None: return 0 - return cvt_to_decimal(10 * self.excursion.duration * self.excursion.old_participant_count) + return cvt_to_decimal(settings.EXCURSION_ORG_FEE * self.excursion.duration * self.excursion.old_participant_count) @property def total_org_fee(self): @@ -523,6 +523,7 @@ class Statement(CommonModel): 'total_org_fee': self.total_org_fee, 'old_participant_count': self.excursion.old_participant_count, 'total_staff_paid': self.total_staff_paid, + 'org_fee': cvt_to_decimal(settings.EXCURSION_ORG_FEE), } return dict(context, **excursion_context) else: diff --git a/jdav_web/finance/templates/admin/overview_submitted_statement.html b/jdav_web/finance/templates/admin/overview_submitted_statement.html index c93cc08..c8dc382 100644 --- a/jdav_web/finance/templates/admin/overview_submitted_statement.html +++ b/jdav_web/finance/templates/admin/overview_submitted_statement.html @@ -116,7 +116,7 @@ {% if total_org_fee %}

{% trans "Org fee" %}

-{% blocktrans %}Since overaged people where part of the excursion, an organisational fee of 10,00€ per person per day has to be paid. This totals to {{ total_org_fee_theoretical }}€. This organisational fee will be accounted against allowances and subsidies.{% endblocktrans %} +{% blocktrans %}Since overaged people where part of the excursion, an organisational fee of {{ org_fee }}€ per person per day has to be paid. This totals to {{ total_org_fee_theoretical }}€. This organisational fee will be accounted against allowances and subsidies.{% endblocktrans %} {% endif %} diff --git a/jdav_web/finance/templates/finance/statement_summary.tex b/jdav_web/finance/templates/finance/statement_summary.tex index d9bac97..99657e4 100644 --- a/jdav_web/finance/templates/finance/statement_summary.tex +++ b/jdav_web/finance/templates/finance/statement_summary.tex @@ -86,7 +86,7 @@ in der Ausgabenübersicht gesondert aufgeführt. {% if statement.total_org_fee %} \noindent\textbf{Organisationsbeitrag} -\noindent An der Ausfahrt haben {{ statement.old_participant_count }} Personen teilgenommen, die 27 Jahre alt oder älter sind. Für sie wird pro Tag ein Organisationsbeitrag von 10,00 € erhoben und mit den bezahlten Zuschüssen und Aufwandsentschädigungen verrechnet. +\noindent An der Ausfahrt haben {{ statement.old_participant_count }} Personen teilgenommen, die 27 Jahre alt oder älter sind. Für sie wird pro Tag ein Organisationsbeitrag von {{ statement.org_fee }} € erhoben und mit den bezahlten Zuschüssen und Aufwandsentschädigungen verrechnet. {% endif %} {% else %} @@ -123,7 +123,7 @@ in der Ausgabenübersicht gesondert aufgeführt. \multicolumn{2}{l}{Zuschuss Übernachtung und Anreise für alle Jugendleiter*innen} & {{ statement.subsidy_to.name|esc_all }} & {{ statement.total_subsidies }} €\\ {% endif %} {% if statement.total_org_fee %} - \multicolumn{2}{l}{abzüglich Organisationsbeitrag für {{ old_participant_count }} Teilnehmende über 27 } & & -{{ statement.total_org_fee }} €\\ + \multicolumn{2}{l}{abzüglich Organisationsbeitrag für {{ statement.old_participant_count }} Teilnehmende über 27 } & & -{{ statement.total_org_fee }} €\\ {% endif %} \midrule \multicolumn{3}{l}{\textbf{Summe Zuschüsse und Aufwandsentschädigung Jugendleitende}} & \textbf{ {{ statement.total_staff_paid }} }€\\ diff --git a/jdav_web/jdav_web/settings/local.py b/jdav_web/jdav_web/settings/local.py index 7d7ebcc..34dbe5c 100644 --- a/jdav_web/jdav_web/settings/local.py +++ b/jdav_web/jdav_web/settings/local.py @@ -55,6 +55,8 @@ DOMAIN = get_var('misc', 'domain', default='example.org') ALLOWANCE_PER_DAY = get_var('finance', 'allowance_per_day', default=22) MAX_NIGHT_COST = get_var('finance', 'max_night_cost', default=11) +EXCURSION_ORG_FEE = get_var('finance', 'org_fee', default=10) + # links CLOUD_LINK = get_var('links', 'cloud', default='https://startpage.com') diff --git a/jdav_web/members/locale/de/LC_MESSAGES/django.po b/jdav_web/members/locale/de/LC_MESSAGES/django.po index 763364f..3a5cb55 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-04-15 22:36+0200\n" +"POT-Creation-Date: 2025-04-27 23:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1387,12 +1387,12 @@ msgstr "Organisationsbeitrag" #, python-format msgid "" "Warning: %(old_participant_count)s participant(s) of the excursion are 27 or " -"older. For each of them, an organisation fee of 10,00 € per day has to be " -"paid to the account. With a duration of %(duration)s days, a total of " +"older. For each of them, an organisation fee of %(org_fee)s € per day has to " +"be paid to the account. With a duration of %(duration)s days, a total of " "%(total_org_fee_theoretical)s € is charged against the other transactions." msgstr "" "Achtung: %(old_participant_count)s Teilnehmende der Ausfahrt sind 27 oder " -"älter. Für diese Teilnehmende(n) ist ein Org-Beitrag von 10,00 € pro Tag " +"älter. Für diese Teilnehmende(n) ist ein Org-Beitrag von %(org_fee)s € pro Tag " "fällig. Durch die Länge der Ausfahrt von %(duration)s Tagen werden insgesamt " "%(total_org_fee_theoretical)s € mit den Zuschüssen und " "Aufwandsentschädigungen verrechnet, sofern diese in Anspruch genommen werden." @@ -1458,10 +1458,10 @@ msgid "" msgstr "" "Indem du einen Seminarbericht anfertigst, kannst du Landesjugendplan (LJP) " "Zuschüsse beantragen. In diesem Fall kannst du bis zu 25€ mal %(duration)s " -"Tage für %(theoretic_ljp_participant_count)s Teilnehmende, aber nicht mehr als 90%% der " -"Gesamtausgaben erhalten. Das resultiert in einem Gesamtzuschuss von " -"%(ljp_contributions)s€. Wenn du schon einen Seminarbericht erstellt hast, " -"musst du im Tab 'Abrechnungen' noch angeben, an wen die LJP-Zuschüsse " +"Tage für %(theoretic_ljp_participant_count)s Teilnehmende, aber nicht mehr " +"als 90%% der Gesamtausgaben erhalten. Das resultiert in einem Gesamtzuschuss " +"von %(ljp_contributions)s€. Wenn du schon einen Seminarbericht erstellt " +"hast, musst du im Tab 'Abrechnungen' noch angeben, an wen die LJP-Zuschüsse " "ausgezahlt werden sollen." #: members/templates/admin/freizeit_finance_overview.html diff --git a/jdav_web/members/templates/admin/freizeit_finance_overview.html b/jdav_web/members/templates/admin/freizeit_finance_overview.html index b0325e8..8cc7a52 100644 --- a/jdav_web/members/templates/admin/freizeit_finance_overview.html +++ b/jdav_web/members/templates/admin/freizeit_finance_overview.html @@ -127,7 +127,7 @@ cost plan! {% if total_org_fee %}

{% trans "Org fee" %}

-{% blocktrans %}Warning: {{ old_participant_count }} participant(s) of the excursion are 27 or older. For each of them, an organisation fee of 10,00 € per day has to be paid to the account. With a duration of {{ duration }} days, a total of {{ total_org_fee_theoretical }} € is charged against the other transactions.{% endblocktrans %} +{% blocktrans %}Warning: {{ old_participant_count }} participant(s) of the excursion are 27 or older. For each of them, an organisation fee of {{ org_fee }} € per day has to be paid to the account. With a duration of {{ duration }} days, a total of {{ total_org_fee_theoretical }} € is charged against the other transactions.{% endblocktrans %}

{% endif %}