diff --git a/accounting/templates/accounting/journal_bilan_accounting.jinja b/accounting/templates/accounting/journal_statement_accounting.jinja
similarity index 84%
rename from accounting/templates/accounting/journal_bilan_accounting.jinja
rename to accounting/templates/accounting/journal_statement_accounting.jinja
index b9faf5d0..8e6cd8fc 100644
--- a/accounting/templates/accounting/journal_bilan_accounting.jinja
+++ b/accounting/templates/accounting/journal_statement_accounting.jinja
@@ -6,7 +6,7 @@
{% block content %}
-
{% trans %}Accounting bilan: {% endtrans %} {{ object.name }}
+{% trans %}Accounting statement: {% endtrans %} {{ object.name }}
@@ -16,7 +16,7 @@
- {% for k,v in bilan.items() %}
+ {% for k,v in statement.items() %}
{{ k }} |
{{ v }} |
diff --git a/accounting/templates/accounting/journal_bilan_nature.jinja b/accounting/templates/accounting/journal_statement_nature.jinja
similarity index 86%
rename from accounting/templates/accounting/journal_bilan_nature.jinja
rename to accounting/templates/accounting/journal_statement_nature.jinja
index 2e82b5fd..fb320dad 100644
--- a/accounting/templates/accounting/journal_bilan_nature.jinja
+++ b/accounting/templates/accounting/journal_statement_nature.jinja
@@ -5,7 +5,7 @@
{% endblock %}
{% macro display_tables(dict) %}
-{% trans %}Credit{% endtrans %}
+{% trans %}Credit{% endtrans %}
{% trans %}Total: {% endtrans %}{{ dict['CREDIT_sum'] }}
-{% trans %}Debit{% endtrans %}
+{% trans %}Debit{% endtrans %}
@@ -45,10 +45,10 @@
{% endmacro %}
{% block content %}
-{% trans %}Statement by nature: {% endtrans %} {{ object.name }}
+{% trans %}Statement by nature: {% endtrans %} {{ object.name }}
{% for k,v in statement.items() %}
-{{ k }}
+{{ k }}
{{ display_tables(v) }}
{% endfor %}
diff --git a/accounting/templates/accounting/journal_bilan_person.jinja b/accounting/templates/accounting/journal_statement_person.jinja
similarity index 78%
rename from accounting/templates/accounting/journal_bilan_person.jinja
rename to accounting/templates/accounting/journal_statement_person.jinja
index 8b913123..89b54cd8 100644
--- a/accounting/templates/accounting/journal_bilan_person.jinja
+++ b/accounting/templates/accounting/journal_statement_person.jinja
@@ -6,9 +6,9 @@
{% block content %}
- {% trans %}Person bilan: {% endtrans %} {{ object.name }}
+ {% trans %}Statement by person: {% endtrans %} {{ object.name }}
- {% trans %}Credit{% endtrans %}
+ {% trans %}Credit{% endtrans %}
@@ -18,14 +18,14 @@
- {% for key in bilan_credit.keys() %}
+ {% for key in credit_statement.keys() %}
{% if key.target_type == "OTHER" %}
{{ o.target_label }} |
{% else %}
{{ key.get_display_name() }} |
{% endif %}
- {{bilan_credit[key]}} |
+ {{credit_statement[key]}} |
{% endfor %}
@@ -34,8 +34,8 @@
Total : {{total_credit}}
- {% trans %}Debit{% endtrans %}
-
+ {% trans %}Debit{% endtrans %}
+
@@ -44,14 +44,14 @@
- {% for key in bilan_debit.keys() %}
+ {% for key in debit_statement.keys() %}
{% if key.target_type == "OTHER" %}
{{ o.target_label }} |
{% else %}
{{ key.get_display_name() }} |
{% endif %}
- {{bilan_debit[key]}} |
+ {{debit_statement[key]}} |
{% endfor %}
@@ -60,4 +60,4 @@
Total : {{total_debit}}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/accounting/urls.py b/accounting/urls.py
index b91620a2..3255cb9d 100644
--- a/accounting/urls.py
+++ b/accounting/urls.py
@@ -26,9 +26,9 @@ urlpatterns = [
url(r'^journal/create$', JournalCreateView.as_view(), name='journal_new'),
url(r'^journal/(?P[0-9]+)$', JournalDetailView.as_view(), name='journal_details'),
url(r'^journal/(?P[0-9]+)/edit$', JournalEditView.as_view(), name='journal_edit'),
- url(r'^journal/(?P[0-9]+)/bilan/nature$', JournalBilanNatureView.as_view(), name='journal_bilan_nature'),
- url(r'^journal/(?P[0-9]+)/bilan/person$', JournalBilanPersonView.as_view(), name='journal_bilan_person'),
- url(r'^journal/(?P[0-9]+)/bilan/accounting$', JournalBilanAccountingView.as_view(), name='journal_bilan_accounting'),
+ url(r'^journal/(?P[0-9]+)/statement/nature$', JournalNatureStatementView.as_view(), name='journal_nature_statement'),
+ url(r'^journal/(?P[0-9]+)/statement/person$', JournalPersonStatementView.as_view(), name='journal_person_statement'),
+ url(r'^journal/(?P[0-9]+)/statement/accounting$', JournalAccountingStatementView.as_view(), name='journal_accounting_statement'),
# Operations
url(r'^operation/create/(?P[0-9]+)$', OperationCreateView.as_view(), name='op_new'),
diff --git a/accounting/views.py b/accounting/views.py
index 5b691ca3..e9628320 100644
--- a/accounting/views.py
+++ b/accounting/views.py
@@ -179,19 +179,19 @@ class JournalTabsMixin(TabedViewMixin):
'name': _("Journal"),
})
tab_list.append({
- 'url': reverse('accounting:journal_bilan_nature', kwargs={'j_id': self.object.id}),
- 'slug': 'bilan_nature',
- 'name': _("Bilan nature"),
+ 'url': reverse('accounting:journal_nature_statement', kwargs={'j_id': self.object.id}),
+ 'slug': 'nature_statement',
+ 'name': _("Statement by nature"),
})
tab_list.append({
- 'url': reverse('accounting:journal_bilan_person', kwargs={'j_id': self.object.id}),
- 'slug': 'bilan_person',
- 'name': _("Bilan person"),
+ 'url': reverse('accounting:journal_person_statement', kwargs={'j_id': self.object.id}),
+ 'slug': 'person_statement',
+ 'name': _("Statement by person"),
})
tab_list.append({
- 'url': reverse('accounting:journal_bilan_accounting', kwargs={'j_id': self.object.id}),
- 'slug': 'bilan_accounting',
- 'name': _("Bilan accounting"),
+ 'url': reverse('accounting:journal_accounting_statement', kwargs={'j_id': self.object.id}),
+ 'slug': 'accounting_statement',
+ 'name': _("Accounting statement"),
})
return tab_list
@@ -470,14 +470,14 @@ class OperationPDFView(CanViewMixin, DetailView):
p.save()
return response
-class JournalBilanNatureView(JournalTabsMixin, CanViewMixin, DetailView):
+class JournalNatureStatementView(JournalTabsMixin, CanViewMixin, DetailView):
"""
Display a statement sorted by labels
"""
model = GeneralJournal
pk_url_kwarg = "j_id"
- template_name='accounting/journal_bilan_nature.jinja'
- current_tab='bilan_nature'
+ template_name='accounting/journal_statement_nature.jinja'
+ current_tab='nature_statement'
def statement(self, queryset, movement_type):
ret = collections.OrderedDict()
@@ -514,18 +514,18 @@ class JournalBilanNatureView(JournalTabsMixin, CanViewMixin, DetailView):
def get_context_data(self, **kwargs):
""" Add infos to the context """
- kwargs = super(JournalBilanNatureView, self).get_context_data(**kwargs)
+ kwargs = super(JournalNatureStatementView, self).get_context_data(**kwargs)
kwargs['statement'] = self.big_statement()
return kwargs
-class JournalBilanPersonView(JournalTabsMixin, CanViewMixin, DetailView):
+class JournalPersonStatementView(JournalTabsMixin, CanViewMixin, DetailView):
"""
Calculate a dictionary with operation target and sum of operations
"""
model = GeneralJournal
pk_url_kwarg = "j_id"
- template_name='accounting/journal_bilan_person.jinja'
- current_tab='bilan_person'
+ template_name='accounting/journal_statement_person.jinja'
+ current_tab='person_statement'
def sum_by_target(self, target_id):
from decimal import Decimal
@@ -553,21 +553,21 @@ class JournalBilanPersonView(JournalTabsMixin, CanViewMixin, DetailView):
def get_context_data(self, **kwargs):
""" Add journal to the context """
- kwargs = super(JournalBilanPersonView, self).get_context_data(**kwargs)
+ kwargs = super(JournalPersonStatementView, self).get_context_data(**kwargs)
kwargs['credit_statement'] = self.credit_statement()
kwargs['debit_statement'] = self.debit_statement()
kwargs['total_credit'] = self.total_credit()
kwargs['total_debit'] = self.total_debit()
return kwargs
-class JournalBilanAccountingView(JournalTabsMixin, CanViewMixin, DetailView):
+class JournalAccountingStatementView(JournalTabsMixin, CanViewMixin, DetailView):
"""
Calculate a dictionary with operation type and sum of operations
"""
model = GeneralJournal
pk_url_kwarg = "j_id"
- template_name='accounting/journal_bilan_accounting.jinja'
- current_tab = "bilan_accounting"
+ template_name='accounting/journal_statement_accounting.jinja'
+ current_tab = "accounting_statement"
def statement(self):
statement = collections.OrderedDict()
@@ -580,7 +580,7 @@ class JournalBilanAccountingView(JournalTabsMixin, CanViewMixin, DetailView):
def get_context_data(self, **kwargs):
""" Add journal to the context """
- kwargs = super(JournalBilanAccountingView, self).get_context_data(**kwargs)
+ kwargs = super(JournalAccountingStatementView, self).get_context_data(**kwargs)
kwargs['statement'] = self.statement()
return kwargs