From c7cd2c4d5a4b8d2dd177712d6061d0ac898ead27 Mon Sep 17 00:00:00 2001 From: Sebastien Renard Date: Sun, 13 Oct 2024 17:05:33 +0200 Subject: [PATCH] fix editable vat for expense payement --- expense/tables.py | 2 +- templates/expense/expense.html | 5 ----- templates/expense/expense_payment_detail.html | 13 ------------- templates/expense/expense_payments.html | 10 ---------- 4 files changed, 1 insertion(+), 29 deletions(-) diff --git a/expense/tables.py b/expense/tables.py index 1043cd21..34cabdcc 100644 --- a/expense/tables.py +++ b/expense/tables.py @@ -134,7 +134,7 @@ def render_user(self, value): return link_to_consultant(value) def render_vat(self, record): - return self.vat_template.render(context={"expense": record, "can_edit_vat": True}, request=self.request) + return self.vat_template.render(context={"expense": record, "can_edit_vat": True}) class Meta: model = Expense diff --git a/templates/expense/expense.html b/templates/expense/expense.html index 9e1954ee..347aac51 100644 --- a/templates/expense/expense.html +++ b/templates/expense/expense.html @@ -6,13 +6,8 @@ {% load render_table from django_tables2 %} {% load crispy_forms_tags %} -{% block extrajs %} - -{% endblock %} - {% block title %}{% trans "Expense" %}{% endblock %} - {% block content %}

diff --git a/templates/expense/expense_payment_detail.html b/templates/expense/expense_payment_detail.html index cbff19a7..d5d09b49 100644 --- a/templates/expense/expense_payment_detail.html +++ b/templates/expense/expense_payment_detail.html @@ -4,10 +4,6 @@ {% load pydici_filters %} {% load render_table from django_tables2 %} -{% block extrajs %} - -{% endblock %} - {% block extrastyle %} @@ -26,15 +22,6 @@

{% trans "Expenses of payment n°" %}{{ expense_payment.id }} ({{ expense_pa

{% trans "Total: " %} {{ expense_payment.amount }} €

{% endif %} -{% if can_edit_vat %} - {% include "expense/_make_vat_editable.html" %} - -{% endif %} - {% endblock %} \ No newline at end of file diff --git a/templates/expense/expense_payments.html b/templates/expense/expense_payments.html index ed358f88..3955648f 100644 --- a/templates/expense/expense_payments.html +++ b/templates/expense/expense_payments.html @@ -69,14 +69,4 @@

{% trans "Expenses payments" %}

{% include "core/_datepicker.html" %} -{% if can_edit_vat %} - {% include "expense/_make_vat_editable.html" %} - -{% endif %} - - {% endblock %} \ No newline at end of file