distinguished in summary pages between theoretical s+a and what is collected

pull/112/head
mariusrklein 11 months ago committed by marius.klein
parent df515d7cac
commit e73ec0938c

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-19 14:26+0100\n"
"POT-Creation-Date: 2025-01-25 11:56+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -32,6 +32,12 @@ msgstr ""
"Rechnung %(name)s erfolgreich eingereicht. Das Finanzreferat wird auf dich "
"sobald wie möglich zukommen."
#: finance/admin.py
#, fuzzy
#| msgid "Finance"
msgid "Finance overview"
msgstr "Finanzen"
#: finance/admin.py
msgid "Submit statement"
msgstr "Rechnung einreichen"
@ -182,13 +188,10 @@ msgid "Pay allowance to"
msgstr "Aufwandsentschädigung auszahlen an"
#: finance/models.py
msgid ""
"The youth leaders to which an allowance should be paid. The count must match "
"the number of permitted youth leaders."
msgid "The youth leaders to which an allowance should be paid."
msgstr ""
"Die Jugendleiter*innen an die eine Aufwandsentschädigung ausgezahlt werden "
"soll. Die Anzahl muss mit der Anzahl an zugelassenen Jugendleiter*innen "
"übereinstimmen. "
"soll."
#: finance/models.py
msgid "Pay subsidy to"
@ -412,8 +415,8 @@ msgstr "Ausfahrt"
#, python-format
msgid "This excursion featured %(staff_count)s youth leader(s), each costing"
msgstr ""
"Diese Ausfahrt hatte %(staff_count)s genehmigte Jugendleiter*innen. Auf "
"jede*n entfallen die folgenden Kosten:"
"Diese Ausfahrt hatte %(staff_count)s genehmigte Jugendleiter*innen. Für "
"jede*n besteht ein Anspruch auf folgende Zuschüsse und Aufwandsentschädigungen:"
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
@ -427,29 +430,33 @@ msgstr ""
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
msgid ""
"%(duration)s days for %(allowance_per_day)s€ per day making a total of "
"%(allowance_per_yl)s€."
"%(kilometers_traveled)s km by %(means_of_transport)s (%(euro_per_km)s € / "
"km) making a total of %(transportation_per_yl)s€."
msgstr ""
"%(duration)s Tage für %(allowance_per_day)s€ pro Tag. Das ergibt eine "
"Gesamtsumme von %(allowance_per_yl)s€."
"%(kilometers_traveled)s km mit %(means_of_transport)s (%(euro_per_km)s€ / "
"km). Das ergibt eine Gesamtsumme von %(transportation_per_yl)s€."
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
msgid ""
"%(kilometers_traveled)s km by %(means_of_transport)s (%(euro_per_km)s € / "
"km) making a total of %(transportation_per_yl)s€."
"%(duration)s days for %(allowance_per_day)s€ per day making a total of "
"%(allowance_per_yl)s€."
msgstr ""
"%(kilometers_traveled)s km mit %(means_of_transport)s (%(euro_per_km)s€ / "
"km). Das ergibt eine Gesamtsumme von %(transportation_per_yl)s€."
"%(duration)s Tage für %(allowance_per_day)s€ pro Tag. Das ergibt eine "
"Gesamtsumme von %(allowance_per_yl)s€."
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
msgid ""
"In total this is %(total_per_yl)s€ times %(staff_count)s, giving "
"%(total_staff)s€."
"%(theoretical_total_staff)s€."
msgstr ""
"Insgesamt sind das Kosten von %(total_per_yl)s€ mal %(staff_count)s, "
"insgesamt also %(total_staff)s€."
"insgesamt also maximal %(theoretical_total_staff)s€."
#: finance/templates/admin/overview_submitted_statement.html
msgid "Payment of subsidies and allowances"
msgstr "Auszahlung von Sektionszuschüssen und Aufwandsentschädigungen"
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
@ -458,6 +465,27 @@ msgstr ""
"Die Aufwandsentschädigung von %(allowance_per_yl)s€ pro Person soll "
"ausgezahlt werden an:"
#: finance/templates/admin/overview_submitted_statement.html
#: finance/templates/admin/submit_statement.html
msgid "IBAN valid"
msgstr "IBAN gültig"
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
msgid ""
"Only %(allowances_paid)s of the %(real_staff_count)s youth leaders have "
"requested the outpayment of their allowance."
msgstr ""
"Achtung: Nur für %(allowances_paid)s der %(real_staff_count)s "
"Jugendleiter*innen wird die Aufwandsentschädigung abgerufen."
#: finance/templates/admin/overview_submitted_statement.html
msgid ""
"No receivers of the allowance were provided. Allowance will not be used."
msgstr ""
"Keine Empfänger*innen für eine Aufwandsentschädigung angegeben. Es wird "
"daher keine Aufwandsentschädigung ausbezahlt."
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
msgid ""
@ -465,7 +493,14 @@ msgid ""
"should be paid to:"
msgstr ""
"Die Zuschüsse für Übernachtungs- und Fahrtkosten von %(total_subsidies)s€ "
"sollen ausgezahlt werden an:"
"für alle Jugendleiter*innen sollen ausgezahlt werden an:"
#: finance/templates/admin/overview_submitted_statement.html
msgid ""
"No receivers of the subsidies were provided. Subsidies will not be used."
msgstr ""
"Keine Empfänger*innen für Sektionszuschüsse angegeben. Es werden daher keine "
"Sektionszuschüsse ausbezahlt."
#: finance/templates/admin/overview_submitted_statement.html
#, python-format
@ -542,10 +577,6 @@ msgstr ""
"Bitte überprüfe, ob alle Ausgaben korrekt erfasst sind und ob alle "
"auslegenden Personen eine gültige IBAN haben."
#: finance/templates/admin/submit_statement.html
msgid "IBAN valid"
msgstr "IBAN gültig"
#: finance/templates/admin/submit_statement.html
msgid ""
"Do you want to submit the statement for further processing by the finance "

@ -164,8 +164,8 @@ class Statement(CommonModel):
@property
def allowance_to_valid(self):
"""Checks if the configured `allowance_to` field matches the regulations."""
if self.allowance_to.count() > self.real_staff_count:
# it is allows that less allowances are utilized than youth leaders are enlisted
if self.allowances_paid > self.real_staff_count:
# it is allowed that less allowances are utilized than youth leaders are enlisted
return False
if self.excursion is not None:
yls = self.excursion.jugendleiter.all()
@ -241,8 +241,7 @@ class Statement(CommonModel):
if self.subsidy_to:
ref = _("Night and travel costs for %(excu)s") % {'excu': self.excursion.name}
Transaction(statement=self, member=self.subsidy_to, amount=self.total_subsidies, confirmed=False, reference=ref).save()
else:
return False
return True
def reduce_transactions(self):
@ -301,9 +300,13 @@ class Statement(CommonModel):
return cvt_to_decimal(self.excursion.duration * settings.ALLOWANCE_PER_DAY)
@property
def allowances_paid(self):
return self.allowance_to.count()
@property
def total_allowance(self):
return self.allowance_per_yl * self.real_staff_count
return self.allowance_per_yl * self.allowances_paid
@property
def total_transportation(self):
@ -349,9 +352,19 @@ class Statement(CommonModel):
return cvt_to_decimal(0)
@property
def total_staff(self):
def theoretical_total_staff(self):
"""
the sum of subsidies and allowances if all eligible youth leaders would collect them.
"""
return self.total_per_yl * self.real_staff_count
@property
def total_staff(self):
"""
the sum of subsidies and allowances that youth leaders are actually collecting
"""
return self.total_allowance + self.total_subsidies
@property
def real_staff_count(self):
if self.excursion is None:
@ -402,11 +415,14 @@ class Statement(CommonModel):
'means_of_transport': self.excursion.get_tour_approach(),
'euro_per_km': self.euro_per_km,
'allowance_per_day': settings.ALLOWANCE_PER_DAY,
'allowances_paid': self.allowances_paid,
'nights_per_yl': self.nights_per_yl,
'allowance_per_yl': self.allowance_per_yl,
'transportation_per_yl': self.transportation_per_yl,
'total_per_yl': self.total_per_yl,
'total_staff': self.total_staff,
'theoretical_total_staff': self.theoretical_total_staff,
'real_staff_count': self.real_staff_count,
'total_subsidies': self.total_subsidies,
}
return dict(context, **excursion_context)

@ -71,9 +71,10 @@
</ul>
</p>
<p>
{% blocktrans %}In total this is {{ total_per_yl }}€ times {{ staff_count }}, giving {{ total_staff }}€.{% endblocktrans %}
{% blocktrans %}In total this is {{ total_per_yl }}€ times {{ staff_count }}, giving {{ theoretical_total_staff }}€.{% endblocktrans %}
</p>
<h2>{% trans "Payment of subsidies and allowances" %}</h2>
{% if allowances_paid > 0 %}
<p>
{% blocktrans %}The allowance of {{ allowance_per_yl }}€ per person should be paid to:{% endblocktrans %}
<table>
@ -81,25 +82,36 @@
<td>{% trans "IBAN valid" %}</td>
</th>
{% for member in statement.allowance_to.all %}
<tr>
<td> {{ member.name }}</td>
<tr>
<td>{{ member.name }}</td>
<td>{{ member.iban_valid|render_bool }}</td>
</tr>
</tr>
{% endfor %}
</table>
</p>
{% if allowances_paid < real_staff_count %}
<p>{% blocktrans %}Only {{ allowances_paid }} of the {{ real_staff_count }} youth leaders have requested the outpayment of their allowance.{% endblocktrans %}</p>
{% endif %}
{% else %}
<p>{% blocktrans %}No receivers of the allowance were provided. Allowance will not be used.{% endblocktrans %}</p>
{% endif %}
{% if statement.subsidy_to %}
<p>
{% blocktrans %}The subsidies for night and transportation costs of {{ total_subsidies }}€ should be paid to:{% endblocktrans %}
<table>
<th>
<td>{% trans "IBAN valid" %}</td>
<td>{% trans "IBAN valid" %}</td>
</th>
<tr>
<td> {{ statement.subsidy_to.name }}</td>
<td>{{ statement.subsidy_to.name }}</td>
<td>{{ statement.subsidy_to.iban_valid|render_bool }}</td>
</tr>
</table>
</p>
{% else %}
<p>{% blocktrans %}No receivers of the subsidies were provided. Subsidies will not be used.{% endblocktrans %}</p>
{% endif %}
{% endif %}

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-19 19:16+0100\n"
"POT-Creation-Date: 2025-01-25 11:56+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -268,15 +268,6 @@ msgstr ""
"Diese Ausfahrt hat nur bis zu %(approved_count)s zugelassene "
"Jugendleiter*innen, aber du hast %(entered_count)s eingetragen."
#: members/admin.py
#, python-format
msgid ""
"This excursion has %(approved_count)s approved youth leaders, but you listed "
"only %(entered_count)s."
msgstr ""
"Diese Ausfahrt hat %(approved_count)s zugelassene Jugendleiter*innen, aber "
"du hast nur %(entered_count)s eingetragen."
#: members/admin.py
msgid ""
"Please list here all expenses in relation with this excursion and upload "
@ -1129,20 +1120,20 @@ msgstr ""
#: members/templates/admin/freizeit_finance_overview.html
#, python-format
msgid ""
"%(duration)s days for %(allowance_per_day)s€ per day making a total of "
"%(allowance_per_yl)s€."
"%(kilometers_traveled)s km by %(means_of_transport)s (%(euro_per_km)s € / "
"km) making a total of %(transportation_per_yl)s€."
msgstr ""
"%(duration)s Tage für %(allowance_per_day)s€ pro Tag. Das ergibt eine "
"Gesamtsumme von %(allowance_per_yl)s€."
"%(kilometers_traveled)s km mit %(means_of_transport)s (%(euro_per_km)s€ / "
"km). Das ergibt eine Gesamtsumme von %(transportation_per_yl)s€."
#: members/templates/admin/freizeit_finance_overview.html
#, python-format
msgid ""
"%(kilometers_traveled)s km by %(means_of_transport)s (%(euro_per_km)s € / "
"km) making a total of %(transportation_per_yl)s€."
"%(duration)s days for %(allowance_per_day)s€ per day making a total of "
"%(allowance_per_yl)s€."
msgstr ""
"%(kilometers_traveled)s km mit %(means_of_transport)s (%(euro_per_km)s€ / "
"km). Das ergibt eine Gesamtsumme von %(transportation_per_yl)s€."
"%(duration)s Tage für %(allowance_per_day)s€ pro Tag. Das ergibt eine "
"Gesamtsumme von %(allowance_per_yl)s€."
#: members/templates/admin/freizeit_finance_overview.html
#, python-format
@ -1153,6 +1144,22 @@ msgstr ""
"Die Aufwandsentschädigung von %(allowance_per_yl)s€ pro Person wird "
"ausgezahlt an:"
#: members/templates/admin/freizeit_finance_overview.html
#, python-format
msgid ""
"Only %(allowances_paid)s of the %(real_staff_count)s youth leaders have "
"requested the outpayment of their allowance."
msgstr ""
"Achtung: Nur für %(allowances_paid)s der %(real_staff_count)s "
"Jugendleiter*innen wird die Aufwandsentschädigung abgerufen."
#: members/templates/admin/freizeit_finance_overview.html
msgid ""
"No receivers of the allowance were provided. Allowance will not be used."
msgstr ""
"Keine Empfänger*innen für eine Aufwandsentschädigung angegeben. Es wird "
"daher keine Aufwandsentschädigung ausbezahlt."
#: members/templates/admin/freizeit_finance_overview.html
#, python-format
msgid ""
@ -1160,7 +1167,14 @@ msgid ""
"configured to be paid to:"
msgstr ""
"Die Zuschüsse für Übernachtungs- und Fahrtkosten von %(total_subsidies)s€ "
"werden ausgezahlt an:"
"für alle Jugendleiter*innen werden ausgezahlt an:"
#: members/templates/admin/freizeit_finance_overview.html
msgid ""
"No receivers of the subsidies were provided. Subsidies will not be used."
msgstr ""
"Keine Empfänger*innen für Sektionszuschüsse angegeben. Es werden daher keine "
"Sektionszuschüsse ausbezahlt."
#: members/templates/admin/freizeit_finance_overview.html
msgid ""
@ -1486,13 +1500,13 @@ msgstr "Speichern und Registrierung bestätigen"
msgid "Echo"
msgstr "Rückmeldung"
#: members/templates/members/echo.html
#: members/templates/members/echo.html members/tests.py
msgid "Thanks for echoing back. Here is your current data:"
msgstr ""
"Vielen Dank, dass du dich rückmeldest. Hier siehst du deine aktuellen Daten. "
"Falls sich etwas geändert hat, trage das bitte hier ein."
#: members/templates/members/echo_failed.html
#: members/templates/members/echo_failed.html members/tests.py
msgid "Echo failed"
msgstr "Rückmeldung fehlgeschlagen"
@ -1513,7 +1527,7 @@ msgstr "Wenn du denkst, dass das ein Fehler ist, "
msgid "contact us."
msgstr "kontaktiere uns."
#: members/templates/members/echo_password.html
#: members/templates/members/echo_password.html members/tests.py
msgid ""
"Thanks for echoing back. Please enter the password, which you can find in "
"the email we sent you.\n"
@ -1535,7 +1549,7 @@ msgstr "Rückmeldung erfolgreich"
msgid "Thank you"
msgstr "Danke"
#: members/templates/members/echo_success.html
#: members/templates/members/echo_success.html members/tests.py
msgid "Your data was successfully updated."
msgstr "Deine Daten wurden erfolgreich aktualisiert."
@ -1562,16 +1576,16 @@ msgstr "Registrierung fehlgeschlagen"
msgid "Registration"
msgstr "Registrierung"
#: members/templates/members/mail_confirmation_invalid.html
#: members/templates/members/mail_confirmation_invalid.html members/tests.py
msgid "Mail confirmation failed"
msgstr "Emailbestätigung fehlgeschlagen"
#: members/templates/members/mail_confirmation_invalid.html
#: members/templates/members/waiting_confirmation_invalid.html
#: members/templates/members/waiting_confirmation_invalid.html members/tests.py
msgid "The supplied link is invalid."
msgstr "Der verwendete Link ist ungültig."
#: members/templates/members/mail_confirmation_success.html
#: members/templates/members/mail_confirmation_success.html members/tests.py
msgid "Mail confirmed"
msgstr "Emailadresse bestätigt"
@ -1644,7 +1658,7 @@ msgstr "Registrieren"
msgid "Here you can register for group"
msgstr "Hier kannst du dich registrieren für die Gruppe"
#: members/templates/members/register_failed.html
#: members/templates/members/register_failed.html members/tests.py
msgid "Something went wrong while processing your registration."
msgstr "Etwas ist schief gelaufen, bei der Verarbeitung deiner Registrierung."
@ -1699,6 +1713,7 @@ msgid "Registration for waiting list."
msgstr "Registrierung für die Warteliste."
#: members/templates/members/register_waiting_list_success.html
#: members/tests.py
msgid "Your registration for the waiting list was successful."
msgstr "Du wurdest auf die Warteliste gesetzt."
@ -1724,7 +1739,7 @@ msgstr ""
msgid "Reject invitation"
msgstr "Einladung ablehnen"
#: members/templates/members/reject_invalid.html
#: members/templates/members/reject_invalid.html members/tests.py
msgid "This invitation is invalid or expired."
msgstr "Diese Einladung ist ungültig oder abgelaufen."
@ -1792,7 +1807,7 @@ msgstr ""
"zustimmst, unterschreibe bitte das Formular und lade hier einen Scan oder "
"ein Bild hoch."
#: members/templates/members/upload_registration_form.html
#: members/templates/members/upload_registration_form.html members/tests.py
msgid ""
"If you are not an adult yet, please let someone responsible for you sign the "
"agreement."
@ -1805,10 +1820,12 @@ msgid "Upload"
msgstr "Hochladen"
#: members/templates/members/upload_registration_form_invalid.html
#: members/tests.py
msgid "The supplied key for uploading a registration form is invalid."
msgstr "Der verwendete Link zum Hochladen eines Anmeldeformulars ist ungültig."
#: members/templates/members/upload_registration_form_success.html
#: members/tests.py
msgid ""
"Thank you for uploading the registration form. Our team will process your "
"registration shortly."
@ -1828,11 +1845,11 @@ msgstr ""
"Leider hast du deinen Wartelistenplatz nicht rechtzeitig bestätigt und hast "
"somit deinen Platz verloren. Du kannst"
#: members/templates/members/waiting_confirmation_invalid.html
#: members/templates/members/waiting_confirmation_invalid.html members/tests.py
msgid "rejoin the waiting list"
msgstr "der Warteliste erneut beitreten"
#: members/templates/members/waiting_confirmation_success.html
#: members/templates/members/waiting_confirmation_success.html members/tests.py
msgid "Waiting confirmed"
msgstr "Wartelistenplatz bestätigt"
@ -1854,6 +1871,22 @@ msgstr ""
"Danke %(prename)s für dein Interesse auf der Warteliste zu bleiben.\n"
"Dein Platz wurde bestätigt."
#: members/tests.py
msgid "This field is required."
msgstr ""
#: members/tests.py members/views.py
msgid "The entered password is wrong."
msgstr "Das eingegebene Passwort ist falsch."
#: members/tests.py members/views.py
msgid "invalid"
msgstr "ungültig"
#: members/tests.py members/views.py
msgid "expired"
msgstr "abgelaufen"
#: members/views.py
msgid "Prename of the member."
msgstr "Vorname des*der Teilnehmenden"
@ -1876,22 +1909,18 @@ msgstr ""
msgid "optional additional email address"
msgstr "Optionale zusätzliche E-Mailadresse"
#: members/views.py
msgid "The entered password is wrong."
msgstr "Das eingegebene Passwort ist falsch."
#: members/views.py
msgid "invalid"
msgstr "ungültig"
#: members/views.py
msgid "expired"
msgstr "abgelaufen"
#: members/views.py
msgid "Invalid emergency contacts"
msgstr "Ungültige Notfallkontakte"
#, python-format
#~ msgid ""
#~ "This excursion has %(approved_count)s approved youth leaders, but you "
#~ "listed only %(entered_count)s."
#~ msgstr ""
#~ "Diese Ausfahrt hat %(approved_count)s zugelassene Jugendleiter*innen, "
#~ "aber du hast nur %(entered_count)s eingetragen."
#, python-format
#~ msgid ""
#~ "In total these are contributions of %(total_per_yl)s€ times "

@ -86,6 +86,7 @@ cost plan!
</ul>
</p>
<p>
{% if allowances_paid > 0 %}
{% blocktrans %}The allowance of {{ allowance_per_yl }}€ per person is configured to be paid to:{% endblocktrans %}
<table>
<th>
@ -99,6 +100,14 @@ cost plan!
{% endfor %}
</table>
</p>
{% if memberlist.statement.allowances_paid < memberlist.statement.real_staff_count %}
<p>{% blocktrans %}Only {{ allowances_paid }} of the {{ real_staff_count }} youth leaders have requested the outpayment of their allowance.{% endblocktrans %}</p>
{% endif %}
{% else %}
<p>{% blocktrans %}No receivers of the allowance were provided. Allowance will not be used.{% endblocktrans %}</p>
{% endif %}
{% if memberlist.statement.subsidy_to %}
<p>
{% blocktrans %}The subsidies for night and transportation costs of {{ total_subsidies }}€ is configured to be paid to:{% endblocktrans %}
<table>
@ -111,6 +120,10 @@ cost plan!
</tr>
</table>
</p>
{% else %}
<p>{% blocktrans %}No receivers of the subsidies were provided. Subsidies will not be used.{% endblocktrans %}</p>
{% endif %}
{% if not memberlist.statement.allowance_to_valid %}
<p>
{% 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 %}

Loading…
Cancel
Save