Create table for accounts

This commit is contained in:
Edgar P. Burkhart 2024-01-03 14:40:48 +01:00
parent 9927cbbab4
commit d48818e455
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
8 changed files with 86 additions and 56 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-02 15:52+0100\n"
"POT-Creation-Date: 2024-01-03 14:32+0100\n"
"PO-Revision-Date: 2023-04-23 08:03+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n"
@ -29,11 +29,11 @@ msgstr "Aller au contenu principal"
msgid "Home"
msgstr "Accueil"
#: .\main\templates\main\base.html:39 .\main\templates\main\index.html:43
#: .\main\templates\main\base.html:39 .\main\templates\main\index.html:60
msgid "Statements"
msgstr "Relevés"
#: .\main\templates\main\base.html:45 .\main\templates\main\index.html:23
#: .\main\templates\main\base.html:45 .\main\templates\main\index.html:40
msgid "Transactions"
msgstr "Transactions"
@ -113,15 +113,23 @@ msgstr "Comptes"
msgid "No account"
msgstr "Aucun compte"
#: .\main\templates\main\index.html:29
#: .\main\templates\main\index.html:23
msgid "Account"
msgstr "Compte"
#: .\main\templates\main\index.html:24
msgid "Balance"
msgstr "Solde"
#: .\main\templates\main\index.html:46
msgid "Categories"
msgstr "Catégories"
#: .\main\templates\main\index.html:35
#: .\main\templates\main\index.html:52
msgid "No category"
msgstr "Aucune catégorie"
#: .\main\templates\main\index.html:49
#: .\main\templates\main\index.html:66
msgid "History"
msgstr "Historique"

View file

@ -26,11 +26,9 @@ table {
tbody &:where(:nth-of-type(even)) {
background: #eeeeff;
}
tfoot &.more,
thead &.new {
&.more,
&.new {
text-align: center;
}
tfoot &.more {
border-style: dashed;
}
}

View file

@ -10,13 +10,36 @@
{% block body %}
<section>
<h2>{% translate "Accounts" %}</h2>
<p>
{% for acc in accounts %}
<a class="big-link" href="{{ acc.get_absolute_url }}">{{ acc.icon|remix }}{{ acc }}</a>
{% empty %}
{% translate "No account" %}
{% endfor %}
</p>
<table>
<thead>
<tr>
<th colspan="2">{% translate "Account" %}</th>
<th>{% translate "Balance" %}</th>
</tr>
</thead>
<tbody>
{% for acc in accounts %}
<tr>
<td>{{ acc.icon|remix }}</td>
<th class="l">
<a href="{{ acc.get_absolute_url }}">{{ acc }}</a>
</th>
<td>{{ acc.statement_set.first.value|value }}</td>
</tr>
{% empty %}
<tr>
<td class="empty" colspan="3">{% translate "No account" %}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr class="new">
<td colspan="3">
<a href="{% url "new_account" %}">{% translate "Create account" %}</a>
</td>
</tr>
</tfoot>
</table>
</section>
{% if transactions %}
<section>

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-02 15:52+0100\n"
"POT-Creation-Date: 2024-01-03 14:32+0100\n"
"PO-Revision-Date: 2023-04-22 15:22+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n"
@ -38,7 +38,7 @@ msgid "Start value"
msgstr "Valeur initiale"
#: .\statement\models.py:29
#: .\statement\templates\statement\statement_table.html:28
#: .\statement\templates\statement\statement_table.html:23
msgid "Difference"
msgstr "Différence"
@ -66,7 +66,7 @@ msgid "Statements"
msgstr "Relevés"
#: .\statement\templates\statement\statement_form.html:4
#: .\statement\templates\statement\statement_table.html:5
#: .\statement\templates\statement\statement_table.html:29
msgid "Create statement"
msgstr "Créer un relevé"
@ -79,27 +79,27 @@ msgid "Categories"
msgstr "Catégories"
#: .\statement\templates\statement\statement_form.html:27
#: .\statement\templates\statement\statement_table.html:29
#: .\statement\templates\statement\statement_table.html:24
msgid "Transactions"
msgstr "Transactions"
#: .\statement\templates\statement\statement_table.html:23
#: .\statement\templates\statement\statement_table.html:18
msgid "Date"
msgstr "Date"
#: .\statement\templates\statement\statement_table.html:25
#: .\statement\templates\statement\statement_table.html:20
msgid "Account"
msgstr "Compte"
#: .\statement\templates\statement\statement_table.html:27
#: .\statement\templates\statement\statement_table.html:22
msgid "Value"
msgstr "Valeur"
#: .\statement\templates\statement\statement_table.html:60
#: .\statement\templates\statement\statement_table.html:62
msgid "No statement"
msgstr "Aucun relevé"
#: .\statement\templates\statement\statement_table.html:68
#: .\statement\templates\statement\statement_table.html:70
msgid "View all statements"
msgstr "Voir tous les relevés"

View file

@ -12,6 +12,13 @@
<col class="value" span="3">
</colgroup>
<thead>
{% if new_statement_url %}
<tr class="new">
<td colspan="{% if account %}6{% else %}8{% endif %}">
<a href="{{ new_statement_url }}">{% translate "Create statement" %}</a>
</td>
</tr>
{% endif %}
<tr>
<th>{{ "check"|remix }}</th>
<th>{{ "attachment"|remix }}</th>
@ -23,13 +30,6 @@
<th>{% translate "Difference" %}</th>
<th>{% translate "Transactions" %}</th>
</tr>
{% if new_statement_url %}
<tr class="new">
<td colspan="{% if account %}6{% else %}8{% endif %}">
<a href="{{ new_statement_url }}">{% translate "Create statement" %}</a>
</td>
</tr>
{% endif %}
</thead>
<tbody>
{% for snap in statements %}

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-02 15:52+0100\n"
"POT-Creation-Date: 2024-01-03 14:32+0100\n"
"PO-Revision-Date: 2023-04-23 08:03+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n"
@ -23,7 +23,7 @@ msgstr "Transaction"
#: .\transaction\models.py:19 .\transaction\models.py:89
#: .\transaction\templates\transaction\invoice_table.html:10
#: .\transaction\templates\transaction\transaction_table.html:29
#: .\transaction\templates\transaction\transaction_table.html:24
msgid "Name"
msgstr "Nom"
@ -32,12 +32,12 @@ msgid "Description"
msgstr "Description"
#: .\transaction\models.py:23
#: .\transaction\templates\transaction\transaction_table.html:30
#: .\transaction\templates\transaction\transaction_table.html:25
msgid "Value"
msgstr "Valeur"
#: .\transaction\models.py:25
#: .\transaction\templates\transaction\transaction_table.html:28
#: .\transaction\templates\transaction\transaction_table.html:23
msgid "Date"
msgstr "Date"
@ -46,7 +46,7 @@ msgid "Real date"
msgstr "Date réelle"
#: .\transaction\models.py:28
#: .\transaction\templates\transaction\transaction_table.html:31
#: .\transaction\templates\transaction\transaction_table.html:26
msgid "Trader"
msgstr "Commerçant"
@ -55,7 +55,7 @@ msgid "Payment"
msgstr "Paiement"
#: .\transaction\models.py:38
#: .\transaction\templates\transaction\transaction_table.html:33
#: .\transaction\templates\transaction\transaction_table.html:28
msgid "Category"
msgstr "Catégorie"
@ -64,13 +64,13 @@ msgid "Statement"
msgstr "Relevé"
#: .\transaction\models.py:48
#: .\transaction\templates\transaction\transaction_table.html:36
#: .\transaction\templates\transaction\transaction_table.html:31
msgid "Account"
msgstr "Compte"
#: .\transaction\models.py:83
#: .\transaction\templates\transaction\transaction_archive_month.html:24
#: .\transaction\templates\transaction\transaction_archive_year.html:23
#: .\transaction\templates\transaction\transaction_archive_month.html:27
#: .\transaction\templates\transaction\transaction_archive_year.html:31
#: .\transaction\templates\transaction\transaction_list.html:4
#: .\transaction\templates\transaction\transaction_list.html:7
msgid "Transactions"
@ -109,21 +109,22 @@ msgstr "Supprimer"
msgid "No invoice"
msgstr "Aucune facture"
#: .\transaction\templates\transaction\transaction_archive_month.html:12
#: .\transaction\templates\transaction\transaction_archive_month.html:14
#: .\transaction\templates\transaction\transaction_archive_year.html:13
msgid "Back"
msgstr "Retour"
#: .\transaction\templates\transaction\transaction_archive_month.html:19
#: .\transaction\templates\transaction\transaction_archive_year.html:18
#: .\transaction\templates\transaction\transaction_archive_month.html:22
#: .\transaction\templates\transaction\transaction_archive_year.html:26
msgid "Categories"
msgstr "Catégories"
#: .\transaction\templates\transaction\transaction_archive_year.html:12
#: .\transaction\templates\transaction\transaction_archive_year.html:20
msgid "History"
msgstr "Historique"
#: .\transaction\templates\transaction\transaction_form.html:5
#: .\transaction\templates\transaction\transaction_table.html:5
#: .\transaction\templates\transaction\transaction_table.html:37
msgid "Create transaction"
msgstr "Créer une transaction"
@ -131,10 +132,10 @@ msgstr "Créer une transaction"
msgid "New transaction"
msgstr "Nouvelle transaction"
#: .\transaction\templates\transaction\transaction_table.html:75
#: .\transaction\templates\transaction\transaction_table.html:77
msgid "No transaction"
msgstr "Aucune transaction"
#: .\transaction\templates\transaction\transaction_table.html:84
#: .\transaction\templates\transaction\transaction_table.html:86
msgid "View all transactions"
msgstr "Voir toutes les transactions"

View file

@ -18,6 +18,13 @@
{% endif %}
</colgroup>
<thead>
{% if new_transaction_url %}
<tr class="new">
<td colspan="{% if category and account %}5{% elif category or account %}7{% else %}9{% endif %}">
<a href="{{ new_transaction_url }}">{% translate "Create transaction" %}</a>
</td>
</tr>
{% endif %}
<tr>
<th>{{ "attachment"|remix }}</th>
<th>{% translate "Date" %}</th>
@ -31,13 +38,6 @@
<th colspan="2">{% translate "Account" %}</th>
{% endif %}
</tr>
{% if new_transaction_url %}
<tr class="new">
<td colspan="{% if category and account %}5{% elif category or account %}7{% else %}9{% endif %}">
<a href="{{ new_transaction_url }}">{% translate "Create transaction" %}</a>
</td>
</tr>
{% endif %}
</thead>
<tbody>
{% for trans in transactions %}