Update and lot of minors corrections.

This commit is contained in:
Gregory Trullemans 2022-04-25 10:19:54 +02:00
parent 0c6845c99a
commit 53f71752ec
14 changed files with 26 additions and 26 deletions

View File

@ -39,7 +39,7 @@ class Contract(models.Model):
description = models.TextField(verbose_name="Description", blank=True, null=True)
def __str__(self):
return "%s" % (self.name)
return "%s" % self.name
def __generate_reference(self):
""" Génère automatiquement la référence du contract """

View File

@ -85,7 +85,7 @@ def client_create_or_update(request, client_id=None):
form = ClientForm(instance=client)
context = {"form": form, "client_id": client_id}
return render(request, "billing/client/create.html", context)
return render(request, "billing/clients/create.html", context)
def contract_listing(request):

View File

@ -3,6 +3,6 @@ from django import template
register = template.Library()
@register.inclusion_tag("export_table.html")
@register.inclusion_tag("comptability/export_table.html")
def display_table(transactions_list):
return {"transactions_list": transactions_list}

View File

@ -25,24 +25,24 @@ urlpatterns = [
transaction_by_year_listing,
name="by_year_box",
),
re_path(
r"^listing/(?P<accounting_year>[0-9]{4})/<int:transaction_type_id>/$",
path(
r"listing/<int:accounting_year>/<int:transaction_type_id>/",
transaction_listing_for_year_and_type,
name="transaction_listing_for_year_and_type",
),
# http://127.0.0.1:8000/comptability/annual/listing/2017/3
re_path(
r"^listing/(?P<accounting_year>[0-9]{4})/$",
path(
r"listing/<int:accounting_year>/",
transaction_by_year_listing,
name="by_year",
),
path(
r"details/<int:transaction_id>/",
transaction_details,
name="compta_details",
name="transaction_details",
),
re_path(
r"^export/simple/(?P<accounting_year>[0-9]{4})/$",
path(
r"export/simple/<int:accounting_year>/",
export_year_spf_finance,
name="export_simple",
),
@ -51,8 +51,8 @@ urlpatterns = [
comptability_export,
name="export",
),
re_path(
r"^export/pdf/(?P<accounting_year>[0-9]{4})/$",
path(
r"export/pdf/<int:accounting_year>/",
generate_pdf_for_spf,
name="pdf_export",
),

Binary file not shown.

View File

@ -46,7 +46,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Facturation <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/billing/client/">Liste clients</a></li>
<li><a href="/billing/contract/">Liste contrats</a></li>
<li><a href="/billing/contract/">Liste factures</a></li>
</ul>
</li>
<li><a href="/admin/" target="_blank">Administration</a></li>

View File

@ -9,7 +9,7 @@
<div id="content">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<h1>{{ contract.name }} <small>({{ prestation_count }} prestations)</small></h1>
<h1>{{ contract.name }} <small>({{ prestation_count }} prestations{% if not contract.is_paid%} <b><u>non payées</u></b>{% endif %})</small></h1>
</div>
</div>
<div class="row">

View File

@ -8,7 +8,7 @@
<div id="content">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<h1>Liste des contrats</h1>
<h1>Liste des factures</h1>
</div>
</div>
<div class="row">
@ -23,7 +23,7 @@
<th class="centered"># Prest.</th>
</thead>
{% for contract in contract_list %}
<tr>
<tr {% if not contract.is_paid %}class="danger"{% endif %}>
<td class="centered">{{ contract.date.year }}</td>
<td class="centered">{{ contract.reference }}</td>
<td><a href="{% url 'contract_update' contract.id %}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>&nbsp;<a href="{% url 'contract_detail' contract.id %}">{{ contract.name }}</a></td>

View File

@ -19,7 +19,7 @@
<tr>
<td>{{ transaction.id }}</td>
<td class="push-right">{{ transaction.registrationDate | date:"d-m-Y" }}</td>
<td><a href="{% url 'compta_details' transaction.id %}">{{ transaction.description }}</a></td>
<td><a href="{% url 'transaction_details' transaction.id %}">{{ transaction.description }}</a></td>
<td>{% if transaction.bkExtractNumber %}{{ transaction.bkExtractNumber }}{% endif %}</td>
<td class="push-right">{{ transaction.bkAmount }}</td>
<td>{% if transaction.bxExtractNumber %}{{ transaction.bxExtractNumber }}{% endif %}</td>

View File

@ -34,8 +34,8 @@
<tr {% if transaction.0.is_done == False %}class="alert alert-danger"{% elif transaction.0.is_simulated == True %}class="alert alert-warning simulated"{% endif %}>
<td class="centered">{{ transaction.0.id }}</td>
<td class="push-right">{{ transaction.0.registrationDate | date:"d-m-Y" }}</td>
<td><a href="#">{{ transaction.0.description }}</a></td>
<td class="push-right alert alert-danger">{{ transaction.0.totalAmount }}</td>
<td><a href="{% url 'transaction_details' transaction.0.id %}">{{ transaction.0.description }}</a></td>
<td class="push-right">{{ transaction.0.totalAmount }}</td>
<td class="push-right">{{ transaction.1 }}</td>
</tr>
{% endfor %}

View File

@ -15,7 +15,7 @@
<div class="col-md-8 col-md-offset-2">
<table class="table table-striped table-bordered table-condensed col-md-8">
<thead>
<th class="centered">Années </th>
<th class="centered">Année</th>
<th class="centered"># Transactions</th>
<th class="centered" colspan="2">Suivi</th>
<th class="centered">Export SPF Finance</th>

View File

@ -155,7 +155,7 @@
</div>
<div class="row">
<div class="span12">
<p class="right"><a href="{% url 'annualcomptability:pdf_export' accounting_year %}" class="btn btn-default btn-primary" role="button">Comptes PDF</a></p>
<p class="right"><a href="{% url 'pdf_export' accounting_year %}" class="btn btn-default btn-primary" role="button">Comptes PDF</a></p>
</div>
</div>
</div>

View File

@ -46,12 +46,12 @@
{% else %}
<b>
{% endif %}
<a href="{% url 'annualcomptability:transaction_listing_for_year_and_type' accounting_year transactiontype.1.id %}">{{ transactiontype.1.label }}</a>
<a href="{% url 'transaction_listing_for_year_and_type' accounting_year transactiontype.1.id %}">{{ transactiontype.1.label }}</a>
{% if transactiontype.1.parent == None %}
</b>
{% endif %}
</td>
{% if transactiontype.1.parent %}
<td class="col-md-1 push-right">
{% if transactiontype.1.label %}{% if transactiontype.1.total_transactiontypes_value == None %}0,00{% else %}{{ transactiontype.1.total_transactiontypes_value|floatformat:2|intdot }}{% endif %}{% endif %}
@ -72,7 +72,7 @@
{% else %}
<b>
{% endif %}
<a href="{% url 'annualcomptability:transaction_listing_for_year_and_type' accounting_year transactiontype.0.id %}">{{ transactiontype.0.label }}</a>
<a href="{% url 'transaction_listing_for_year_and_type' accounting_year transactiontype.0.id %}">{{ transactiontype.0.label }}</a>
{% if transactiontype.0.parent == None %}
</b>
{% endif %}

View File

@ -40,8 +40,8 @@
{% for transaction in transaction_list %}
<tr {% if transaction.0.is_done == False %}class="alert alert-danger"{% elif transaction.0.is_simulated == True %}class="alert alert-warning simulated"{% endif %}>
<td class="centered">{{ transaction.0.id }}</td>
<td class="push-right">{{ transaction.0.registrationDate | date:"d-m-Y" }}</td>
<td><a href="{% url 'compta_details' transaction.0.id %}">{{ transaction.0.description }}</a></td>
<td class="push-right">{{ transaction.0.registrationDate | date:"j-n" }}</td>
<td><a href="{% url 'transaction_details' transaction.0.id %}">{{ transaction.0.description }}</a></td>
<td class="push-right">{{ transaction.0.counterpart }}</td>
{% if transaction.0.transaction_type.transaction_type == 0 %}
<td>&nbsp;</td>