Fix empty invoice table

This commit is contained in:
Edgar P. Burkhart 2023-04-18 10:55:35 +02:00
parent 1b7cc543f0
commit e298ec88f1
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 60 additions and 48 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-17 18:15+0200\n"
"POT-Creation-Date: 2023-04-18 10:54+0200\n"
"PO-Revision-Date: 2022-12-21 17:30+0100\n"
"Last-Translator: edpibu <git@edgarpierre.fr>\n"
"Language-Team: edpibu <git@edgarpierre.fr>\n"
@ -35,14 +35,14 @@ msgstr "Utilisateur"
#: .\main\models.py:45 .\main\models.py:79 .\main\models.py:87
#: .\main\models.py:237 .\main\templates\main\base.html:39
#: .\main\templates\main\table\snapshot.html:10
#: .\main\templates\main\table\transaction.html:15
#: .\main\templates\main\table\snapshot.html:23
#: .\main\templates\main\table\transaction.html:32
msgid "Account"
msgstr "Compte"
#: .\main\models.py:45 .\main\models.py:97 .\main\models.py:208
#: .\main\models.py:278 .\main\templates\main\table\transaction.html:8
#: .\main\templates\main\transaction_form.html:28
#: .\main\models.py:278 .\main\templates\main\table\invoice.html:9
#: .\main\templates\main\table\transaction.html:25
msgid "Name"
msgstr "Nom"
@ -60,7 +60,8 @@ msgstr "Comptes"
#: .\main\models.py:97 .\main\models.py:121 .\main\models.py:227
#: .\main\templates\main\base.html:49
#: .\main\templates\main\table\transaction.html:12
#: .\main\templates\main\plot\category.html:14
#: .\main\templates\main\table\transaction.html:29
msgid "Category"
msgstr "Catégorie"
@ -89,7 +90,7 @@ msgstr "Valeur de fin"
msgid "Start value"
msgstr "Valeur de début"
#: .\main\models.py:141 .\main\templates\main\table\snapshot.html:13
#: .\main\models.py:141 .\main\templates\main\table\snapshot.html:26
msgid "Difference"
msgstr "Différence"
@ -98,6 +99,8 @@ msgid "Transaction difference"
msgstr "Différence des transactions"
#: .\main\models.py:154 .\main\models.py:283
#: .\main\templates\main\table\invoice.html:10
#: .\main\templates\main\table\invoice.html:21
msgid "File"
msgstr "Fichier"
@ -120,17 +123,17 @@ msgstr "Relevés"
msgid "Transaction"
msgstr "Transaction"
#: .\main\models.py:210 .\main\templates\main\table\transaction.html:17
#: .\main\models.py:210
msgid "Description"
msgstr "Description"
#: .\main\models.py:212 .\main\templates\main\table\snapshot.html:12
#: .\main\templates\main\table\transaction.html:9
#: .\main\models.py:212 .\main\templates\main\table\snapshot.html:25
#: .\main\templates\main\table\transaction.html:26
msgid "Value"
msgstr "Valeur"
#: .\main\models.py:214 .\main\templates\main\table\snapshot.html:8
#: .\main\templates\main\table\transaction.html:7
#: .\main\models.py:214 .\main\templates\main\table\snapshot.html:21
#: .\main\templates\main\table\transaction.html:24
msgid "Date"
msgstr "Date"
@ -138,7 +141,7 @@ msgstr "Date"
msgid "Real date"
msgstr "Date réelle"
#: .\main\models.py:217 .\main\templates\main\table\transaction.html:10
#: .\main\models.py:217 .\main\templates\main\table\transaction.html:27
msgid "Trader"
msgstr "Commerçant"
@ -151,8 +154,8 @@ msgstr "Paiement"
#: .\main\templates\main\index.html:29
#: .\main\templates\main\list\transaction.html:6
#: .\main\templates\main\list\transaction.html:23
#: .\main\templates\main\snapshot_form.html:76
#: .\main\templates\main\table\snapshot.html:14
#: .\main\templates\main\snapshot_form.html:39
#: .\main\templates\main\table\snapshot.html:27
msgid "Transactions"
msgstr "Transactions"
@ -186,8 +189,9 @@ msgid "Confirm"
msgstr "Confirmer"
#: .\main\templates\main\form\base.html:17
#: .\main\templates\main\table\invoice.html:11
#: .\main\templates\main\table\invoice.html:24
#: .\main\templates\main\tag\form_buttons.html:4
#: .\main\templates\main\transaction_form.html:35
msgid "Delete"
msgstr "Supprimer"
@ -216,37 +220,39 @@ msgstr "Aucune transaction à afficher"
msgid "Log In"
msgstr "Se connecter"
#: .\main\templates\main\plot\history.html:7
msgid "Month"
msgstr "Mois"
#: .\main\templates\main\plot\history.html:8
#: .\main\templates\main\plot\category.html:15
#: .\main\templates\main\plot\history.html:14
msgid "Expenses"
msgstr "Dépenses"
#: .\main\templates\main\plot\history.html:9
#: .\main\templates\main\plot\category.html:16
#: .\main\templates\main\plot\history.html:15
msgid "Income"
msgstr "Revenus"
#: .\main\templates\main\table\snapshot.html:18
msgid "New statement"
msgstr "Nouveau relevé"
#: .\main\templates\main\plot\history.html:13
msgid "Month"
msgstr "Mois"
#: .\main\templates\main\table\snapshot.html:53
msgid "View all statements"
msgstr "Voir tous les relevés"
#: .\main\templates\main\table\invoice.html:30
msgid "No invoice"
msgstr "Aucune facture"
#: .\main\templates\main\table\transaction.html:21
msgid "New transaction"
msgstr "Ajouter une transaction"
#: .\main\templates\main\table\transaction.html:64
msgid "View all transactions"
msgstr "Voir toutes les transactions"
#: .\main\templates\main\transaction_form.html:40
#: .\main\templates\main\table\invoice.html:37
msgid "New invoice"
msgstr "Nouvelle facture"
#~ msgid "New statement"
#~ msgstr "Nouveau relevé"
#~ msgid "View all statements"
#~ msgstr "Voir tous les relevés"
#~ msgid "New transaction"
#~ msgstr "Ajouter une transaction"
#~ msgid "View all transactions"
#~ msgstr "Voir toutes les transactions"
#~ msgid "Valid"
#~ msgstr "Valide"

View file

@ -11,19 +11,25 @@
<th>{% translate "Delete" %}</th>
</thead>
<tbody>
{% for invoice in transaction.invoices %}
<tr>
<th scope="row" class="l">
<a href="{{ invoice.get_absolute_url }}">{{ invoice.name }}</a>
</th>
<td>
<a href="{{ invoice.file.url }}">{% translate "File" %}</a>
</td>
<td>
<a href="{{ invoice.get_delete_url }}">{% translate "Delete" %}
{% if transaction.invoices %}
{% for invoice in transaction.invoices %}
<tr>
<th scope="row" class="l">
<a href="{{ invoice.get_absolute_url }}">{{ invoice.name }}</a>
</th>
<td>
<a href="{{ invoice.file.url }}">{% translate "File" %}</a>
</td>
<td>
<a href="{{ invoice.get_delete_url }}">{% translate "Delete" %}
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="3">{% translate "No invoice" %}</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
<tfoot>
<tr>