Skip to content

Commit

Permalink
fix editable vat for expense payement
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfox committed Oct 13, 2024
1 parent 4c81bef commit c7cd2c4
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
2 changes: 1 addition & 1 deletion expense/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions templates/expense/expense.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
{% load render_table from django_tables2 %}
{% load crispy_forms_tags %}

{% block extrajs %}
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.jeditable.mini.js"></script>
{% endblock %}

{% block title %}{% trans "Expense" %}{% endblock %}


{% block content %}

<h2>
Expand Down
13 changes: 0 additions & 13 deletions templates/expense/expense_payment_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
{% load pydici_filters %}
{% load render_table from django_tables2 %}

{% block extrajs %}
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.jeditable.mini.js"></script>
{% endblock %}

{% block extrastyle %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pydici.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}tables2/css/screen.css" />
Expand All @@ -26,15 +22,6 @@ <h2>{% trans "Expenses of payment n°" %}{{ expense_payment.id }} ({{ expense_pa
<h4>{% trans "Total: " %} {{ expense_payment.amount }} €</h4>
{% endif %}

{% if can_edit_vat %}
{% include "expense/_make_vat_editable.html" %}
<script type="text/javascript">
$(document).ready(function() {
make_vat_editable();
});
</script>
{% endif %}



{% endblock %}
10 changes: 0 additions & 10 deletions templates/expense/expense_payments.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,4 @@ <h2>{% trans "Expenses payments" %}</h2>

{% include "core/_datepicker.html" %}

{% if can_edit_vat %}
{% include "expense/_make_vat_editable.html" %}
<script type="text/javascript">
$(document).ready(function() {
make_vat_editable();
});
</script>
{% endif %}


{% endblock %}

0 comments on commit c7cd2c4

Please sign in to comment.