diff --git a/src/backoffice/templates/reimbursement_list.html b/src/backoffice/templates/reimbursement_list.html index b145ca6c..da716159 100644 --- a/src/backoffice/templates/reimbursement_list.html +++ b/src/backoffice/templates/reimbursement_list.html @@ -34,7 +34,7 @@ {{ reim.notes|default:"N/A" }} {{ reim.amount }} DKK {{ reim.paid }} - {% for expense in reim.expenses.all %}{{ expense.pk }}
{% endfor %} + {% for expense in reim.expenses.all %}{% if not expense.paid_by_bornhack %}{{ expense.pk }} - {{ expense.amount }} DKK - {{ expense.description }}
{% endif %}{% endfor %} Details diff --git a/src/economy/models.py b/src/economy/models.py index 2a22ef02..925c7acc 100644 --- a/src/economy/models.py +++ b/src/economy/models.py @@ -175,7 +175,7 @@ class Reimbursement(CampRelatedModel, UUIDModel): The total amount for a reimbursement is calculated by adding up the amounts for all the related expenses """ amount = 0 - for expense in self.expenses.all(): + for expense in self.expenses.filter(paid_by_bornhack=False): amount += expense.amount return amount diff --git a/src/economy/templates/includes/reimbursement_detail_panel.html b/src/economy/templates/includes/reimbursement_detail_panel.html index 4bd83f70..3eee6131 100644 --- a/src/economy/templates/includes/reimbursement_detail_panel.html +++ b/src/economy/templates/includes/reimbursement_detail_panel.html @@ -3,17 +3,13 @@
- + - - - -
AmountTotal Amount {{ reimbursement.amount }} DKK
Economy Team Notes {{ reimbursement.notes|default:"N/A" }}
Total amount{{ reimbursement.amount }} DKK
Paid {{ reimbursement.paid }}