|
@@ -1,16 +1,23 @@
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
{% block content %}
|
|
|
-<h2>Facture N°{{ invoice.number }}</h2>
|
|
|
-<p>Émise le {{ invoice.date }}</p>
|
|
|
+<div class="row">
|
|
|
+ <div class="large-8 columns">
|
|
|
+ <h2>Facture N°{{ invoice.number }}</h2>
|
|
|
+ <p>Émise le {{ invoice.date }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="large-4 columns">
|
|
|
+ <a href="{% url 'billing:invoice_pdf' id=invoice.number %}" target="_blank" class="button">Télécharger en PDF</a>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
|
|
|
-<table id="invoice_details" class="full-width">
|
|
|
+<table id="invoice_details" class="invoice-table full-width">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th></th>
|
|
|
<th>Quantité</th>
|
|
|
<th>PU</th>
|
|
|
- <th>Total</th>
|
|
|
+ <th class="total">Total TTC</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
@@ -20,17 +27,47 @@
|
|
|
{% if detail.period_from and detail.period_to %}<br/><span class="period">Pour la période du {{ detail.period_from }} au {{ detail.period_to }}{% endif %}</span></td>
|
|
|
<td>{{ detail.quantity }}</td>
|
|
|
<td>{{ detail.amount }}€</td>
|
|
|
- <td>{{ detail.total }}€</td>
|
|
|
+ <td class="total">{{ detail.total }}€</td>
|
|
|
</tr>
|
|
|
{% endfor %}
|
|
|
<tr class="total">
|
|
|
- <td colspan="2"></td>
|
|
|
- <td><strong>Total</strong></td>
|
|
|
- <td>{{ invoice.amount }}</td>
|
|
|
+ <td class="" colspan="3">Total TTC</td>
|
|
|
+ <td class="total">{{ invoice.amount }}€</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
-<a href="{% url 'billing:invoice_pdf' id=invoice.number %}" target="_blank" class="button">Télécharger en PDF</a>
|
|
|
+<h3>Réglement</h3>
|
|
|
+
|
|
|
+{% if invoice.payments.exists %}
|
|
|
+ <table id="invoice_payments" class="invoice-table full-width">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Type de paiement</th>
|
|
|
+ <th>Date</th>
|
|
|
+ <th class="total">Montant</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {% for payment in invoice.payments.all %}
|
|
|
+ <tr class="payment">
|
|
|
+ <td>{{ payment.get_payment_mean_display }}</td>
|
|
|
+ <td>{{ payment.date }}</td>
|
|
|
+ <td class="total">-{{ payment.amount }}€</td>
|
|
|
+ </tr>
|
|
|
+ {% endfor %}
|
|
|
+ <tr class="total">
|
|
|
+ <td class="" colspan="2">Reste à payer</td>
|
|
|
+ <td class="total">{{ invoice.amount_remaining_to_pay }}€</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+{% endif %}
|
|
|
+
|
|
|
+{% if invoice.amount_remaining_to_pay > 0 %}
|
|
|
+ <div class="panel">
|
|
|
+ {% include "billing/payment_howto.html" %}
|
|
|
+ </div>
|
|
|
+{% endif %}
|
|
|
|
|
|
{% endblock %}
|