add dialog to show accounting data
This commit is contained in:
		
							
								
								
									
										48
									
								
								billard/templates/billard/accounting.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								billard/templates/billard/accounting.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,48 @@
 | 
			
		||||
{% extends 'billard/base.html' %}
 | 
			
		||||
{% load display_client %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Accounting Data{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
{% if not locations|length_is:"1" %}
 | 
			
		||||
    <form action="accounting" method="post" id="location-form">
 | 
			
		||||
{% csrf_token %}
 | 
			
		||||
        <div id="location-selector" class="alert">
 | 
			
		||||
            <select class="form-control" form="location-form" name="location-selector" id="location-select">
 | 
			
		||||
{% for loc in locations %}
 | 
			
		||||
                <option value="{{ loc.id }}"{%  if loc.id == location_id %} selected{% endif %}>{{ loc.code }} - {{ loc.name }}</option>
 | 
			
		||||
{% endfor %}
 | 
			
		||||
            </select>
 | 
			
		||||
        </div>
 | 
			
		||||
    </form>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
    <div class="alert alert-success" role="alert">Gesamt-Summe: {{ acc_sum }}</div>
 | 
			
		||||
 | 
			
		||||
    <table class="table">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <th>Start-Datum:</th>
 | 
			
		||||
            <th>Stop-Datum:</th>
 | 
			
		||||
            <th>Preis Normal:</th>
 | 
			
		||||
            <th>Preis Happy Hour:</th>
 | 
			
		||||
            <th>Preis gesamt:</th>
 | 
			
		||||
        </tr>
 | 
			
		||||
{% for acc in accounting %}
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>{{ acc.time_from }}</td>
 | 
			
		||||
            <td>{{ acc.time_to }}</td>
 | 
			
		||||
            <td>{{ acc.prize_normal }}</td>
 | 
			
		||||
            <td>{{ acc.prize_hh }}</td>
 | 
			
		||||
            <td>{{ acc.prize }}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
{% endfor %}
 | 
			
		||||
    </table>
 | 
			
		||||
 | 
			
		||||
    <form action="accounting" method="post" id="accounting">
 | 
			
		||||
{% csrf_token %}
 | 
			
		||||
        <input type="hidden" name="location-selector" value="{{ location_id }}">
 | 
			
		||||
        <input type="hidden" name="accountings" value="{{ acc_ids }}">
 | 
			
		||||
        <button type="submit" class="btn btn-default">Abrechnen</button>
 | 
			
		||||
    </form>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -29,6 +29,7 @@
 | 
			
		||||
            <div id="navbar" class="collapse navbar-collapse">
 | 
			
		||||
                <ul class="nav navbar-nav">
 | 
			
		||||
                    <li class="{% ifequal request.path '/billard/' %}active{% endifequal %}"><a href="{% url "carom_index" %}">Tische</a></li>
 | 
			
		||||
                    <li class="{% ifequal request.path '/billard/accounting' %}active{% endifequal %}"><a href="{% url "accounting" %}">Abrechnung</a></li>
 | 
			
		||||
{% if user.is_superuser %}
 | 
			
		||||
                    <li class="{% ifequal request.path '/logout/' %}active{% endifequal %}"><a href="/admin/">Administration</a></li>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user