From afdbb56d8141ddca0b0026547eee9f9717c2417e Mon Sep 17 00:00:00 2001 From: Christian Merten Date: Sat, 18 Jan 2025 23:38:18 +0100 Subject: [PATCH] finance: don't include subsidies in theoretic total Subsidies paid for night and travel costs are expected to be listed in the bills of the associated statement. Hence, they should not be counted a second time in the theoretic total. This affects LJP and SJR applications. --- jdav_web/finance/models.py | 8 +++++++- jdav_web/members/templates/members/seminar_report.tex | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/jdav_web/finance/models.py b/jdav_web/finance/models.py index cf084ca..87f0e28 100644 --- a/jdav_web/finance/models.py +++ b/jdav_web/finance/models.py @@ -366,7 +366,13 @@ class Statement(CommonModel): @property def total_theoretic(self): - return self.total_bills_theoretic + self.total_staff + """ + The theoretic total used in SJR and LJP applications. This is the sum of all + bills (ignoring whether they are paid by the association or not) plus the + total allowance. This does not include the subsidies for night and travel costs, + since they are expected to be included in the bills. + """ + return self.total_bills_theoretic + self.total_allowance def total_pretty(self): return "{}€".format(self.total) diff --git a/jdav_web/members/templates/members/seminar_report.tex b/jdav_web/members/templates/members/seminar_report.tex index d73cb67..a5fc4d2 100644 --- a/jdav_web/members/templates/members/seminar_report.tex +++ b/jdav_web/members/templates/members/seminar_report.tex @@ -146,8 +146,6 @@ \textbf{Beschreibung} & \textbf{Betrag} \\ \midrule Aufwandsentschädigung & {{ memberlist.statement.total_allowance }} € \\ - Fahrtkosten & {{ memberlist.statement.total_transportation }} € \\ - Übernachtungskosten & {{ memberlist.statement.total_nights }} € \\ {% for bill in memberlist.statement.grouped_bills %} {{ bill.short_description|esc_all }} & {{ bill.amount }} € \\ {% endfor %}