diff --git a/schoolapps/fibu/migrations/0003_auto_20191228_1553.py b/schoolapps/fibu/migrations/0003_auto_20191228_1553.py new file mode 100644 index 0000000000000000000000000000000000000000..6674b3d95d25eb5451050e7c10fefb65149ead28 --- /dev/null +++ b/schoolapps/fibu/migrations/0003_auto_20191228_1553.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.8 on 2019-12-28 14:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('fibu', '0002_auto_20191228_1357'), + ] + + operations = [ + migrations.AlterField( + model_name='account', + name='budget', + field=models.IntegerField(default=0, verbose_name='Budget'), + ), + ] diff --git a/schoolapps/fibu/models.py b/schoolapps/fibu/models.py index aa6d69a4c26478960ede5963e62e1777d9684e5c..43f1bf01c207c8d55b979bc797d4241a52b0d0b4 100644 --- a/schoolapps/fibu/models.py +++ b/schoolapps/fibu/models.py @@ -20,7 +20,7 @@ status_list = [ Status(name='beantragt', style_class='red'), Status(name='abgelehnt', style_class='black'), Status(name='bewilligt', style_class='orange'), - Status(name='bestellt', style_class='darkyellow'), + Status(name='bestellt', style_class='yellow darken-1'), Status(name='eingereicht', style_class='blue'), Status(name='bezahlt', style_class='green'), ] diff --git a/schoolapps/fibu/templates/fibu/booking/index.html b/schoolapps/fibu/templates/fibu/booking/index.html index 92299a9eb316653a36021afc549f68108278b127..7a843f8c3b9a66d694275ff4bce520995d1bab8f 100755 --- a/schoolapps/fibu/templates/fibu/booking/index.html +++ b/schoolapps/fibu/templates/fibu/booking/index.html @@ -17,8 +17,9 @@ <table> <thead> <tr> - <th>Anschaffungswunsch</th> - <th class="right-align">Geplanter Betrag</th> + <th>Artikelbeschreibung</th> + <th class="right-align">erwarteter Betrag</th> + <th class="right-align">Rechnungsbetrag</th> <th>Buchungskonto</th> <th>Antragsteller</th> <th>Status</th> @@ -31,6 +32,7 @@ <a href="{% url "booking_book" booking.id %}">{{ booking.description }}</a> </td> <td class="right-align">{{ booking.planned_amount }} €</td> + <td class="right-align">{{ booking.amount }} €</td> <td>{{ booking.account|default:"" }}</td> <td>{{ booking.contact.get_full_name }}</td> <td> diff --git a/schoolapps/fibu/templates/fibu/index.html b/schoolapps/fibu/templates/fibu/index.html index 85fc802f4669795099fa9a0db78de1c82e39282a..51d38be8e185381e8f4aaf21582808f92216a4f0 100755 --- a/schoolapps/fibu/templates/fibu/index.html +++ b/schoolapps/fibu/templates/fibu/index.html @@ -34,16 +34,23 @@ </div> </form> - +<div class="collection-item row"> + <div class="col s5"><strong>Beschreibung</strong></div> + <div class="col s2 right-align"><strong>erwarteter Betrag</strong></div> + <div class="col s2 right-align"><strong>Rechnungsbetrag</strong></div> + <div class="col s1 center-align"><strong>Status</strong></div> + <div class="col s2 center-align"><strong>Aktionen</strong></div> + </div> <div class="collection"> {% for booking in bookings %} <div class="collection-item row"> - <div class="col s12 m7">{{ booking.description }}</div> - <span class="col s12 m1 right-align">{{ booking.planned_amount }} €</span> - <div class="col s12 m1"> + <div class="col s5">{{ booking.description }}</div> + <div class="col s2 right-align">{{ booking.planned_amount }} €</div> + <div class="col s2 right-align">{{ booking.amount }} €</div> + <div class="col s1"> <span class="badge new {{ booking.get_status.style_class }}">{{ booking.get_status.name }}</span> </div> - <span class="col s12 m3"> + <div class="col s2"> {# Delete #} {% if booking.status < 3 %} <form action="" method="POST" class="right"> @@ -93,7 +100,7 @@ </button> {% endif %} </form> - </span> + </div> </div> {% endfor %} </div> diff --git a/schoolapps/fibu/views.py b/schoolapps/fibu/views.py index 2abc201e059a7662332c8c5a2237c7addd3e868d..01047ee50c94a8f665483d5f620db52333881fe4 100644 --- a/schoolapps/fibu/views.py +++ b/schoolapps/fibu/views.py @@ -209,7 +209,7 @@ def account(request): messages.success(request, "Das Buchungskonto wurde erfolgreich angelegt.") return redirect('account') - accounts = Account.objects.filter() + accounts = Account.objects.filter().order_by('costcenter','-income','name') context = {'accounts': accounts, 'form': form} return render(request, 'fibu/account/index.html', context)