141 lines
4.4 KiB
HTML
141 lines
4.4 KiB
HTML
{% extends "adm/adm_base.html" %}
|
|
{% block content %}
|
|
{% load adm_tags %}
|
|
{% load mathfilters %}
|
|
{% load humanize %}
|
|
{% load counter_tag %}
|
|
<div class="content-section col-12">
|
|
<h4>Rechungsübersicht
|
|
<span style="float: right;">
|
|
<a class="btn btn-primary btn-sm" href="{% url 'admbill-add' %}" style="float: right;"><i class="fas fa-plus"></i> Rechnung</a>
|
|
</span>
|
|
</h4>
|
|
<hr>
|
|
<table class="table table-hover" id="agdata" >
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Agentur</th>
|
|
<th scope="col">Rechnungsnummer</th>
|
|
<th scope="col">Rechnungsdatum</th>
|
|
<th scope="col">Leistung Start</th>
|
|
<th scope="col">Leistung Ende</th>
|
|
<th scope="col">Betrag</th>
|
|
<th scope="col">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody >
|
|
{% for ele in bills %}
|
|
<tr>
|
|
<td><a href="{% url 'adm-agency-single' ele.agency.pk %}">{{ele.agency.name}}</a></td>
|
|
<td><a href="{% url 'ag-getbillpdf' ele.pk %}" target="_blank">{{ele.billnumber}}</a></td>
|
|
<td data-sort='{{ele.billdate|date:"U"}}'>{{ele.billdate|date:"d.m.Y"}}</td>
|
|
<td data-sort='{{ele.start|date:"U"}}'>{{ele.start|date:"d.m.Y"}}</td>
|
|
<td data-sort='{{ele.end|date:"U"}}'>{{ele.end|date:"d.m.Y"}}</td>
|
|
<td>
|
|
{% loadBillValue ele as fm %}
|
|
{% if fm != False %}
|
|
{{fm|floatformat:2|intcomma}} €
|
|
{% else %}
|
|
Fehler bei Rechnungsabfrage (ID {{ele.pk}})
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if ele.billstatus == "open" %} <i class="far fa-times-circle" style="color: red"></i> {% elif ele.billstatus == "paid" %} <i class="far fa-check-circle" style="color: green"></i> {% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$('#agdata').DataTable({
|
|
order: [2, 'desc'],
|
|
"language": {
|
|
"search" : "Suche",
|
|
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
|
"lengthMenu": "Zeige _MENU_ Einträge",
|
|
"zeroRecords": "Nichts gefunden",
|
|
"infoEmpty": "Keine Einträge",
|
|
"paginate": {
|
|
"first": "Erste",
|
|
"last": "Letzte",
|
|
"next": "Nächste",
|
|
"previous": "Zurück"
|
|
},
|
|
},
|
|
"pageLength": 50,
|
|
"buttons" : {
|
|
"className" : "btn-danger"
|
|
}
|
|
});
|
|
})
|
|
</script>
|
|
|
|
<h4>Rechungsübersicht STORNO
|
|
<span style="float: right;">
|
|
<a class="btn btn-primary btn-sm" href="{% url 'admbill-add' %}" style="float: right;"><i class="fas fa-plus"></i> Rechnung</a>
|
|
</span>
|
|
</h4>
|
|
<hr>
|
|
<table class="table table-hover" id="ag_storno" >
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Agentur</th>
|
|
<th scope="col">Rechnungsnummer</th>
|
|
<th scope="col">Rechnungsdatum</th>
|
|
<th scope="col">Leistung Start</th>
|
|
<th scope="col">Leistung Ende</th>
|
|
<th scope="col">Betrag</th>
|
|
<th scope="col">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody >
|
|
{% for ele in bills_storno %}
|
|
<tr>
|
|
<td><a href="{% url 'adm-agency-single' ele.agency.pk %}">{{ele.agency.name}}</a></td>
|
|
<td><a href="{% url 'ag-getbillpdf' ele.pk %}" target="_blank">{{ele.billnumber}}</a></td>
|
|
<td data-sort='{{ele.billdate|date:"U"}}'>{{ele.billdate|date:"d.m.Y"}}</td>
|
|
<td data-sort='{{ele.start|date:"U"}}'>{{ele.start|date:"d.m.Y"}}</td>
|
|
<td data-sort='{{ele.end|date:"U"}}'>{{ele.end|date:"d.m.Y"}}</td>
|
|
<td>
|
|
{% loadBillValue ele as fm %}
|
|
{% if fm != False %}
|
|
{{fm|floatformat:2|intcomma}} €
|
|
{% else %}
|
|
Fehler bei Rechnungsabfrage (ID {{ele.pk}})
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if ele.billstatus == "open" %} <i class="far fa-times-circle" style="color: red"></i> {% elif ele.billstatus == "paid" %} <i class="far fa-check-circle" style="color: green"></i> {% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$('#ag_storno').DataTable({
|
|
order: [2, 'desc'],
|
|
"language": {
|
|
"search" : "Suche",
|
|
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
|
"lengthMenu": "Zeige _MENU_ Einträge",
|
|
"zeroRecords": "Nichts gefunden",
|
|
"infoEmpty": "Keine Einträge",
|
|
"paginate": {
|
|
"first": "Erste",
|
|
"last": "Letzte",
|
|
"next": "Nächste",
|
|
"previous": "Zurück"
|
|
},
|
|
},
|
|
"pageLength": 50,
|
|
"buttons" : {
|
|
"className" : "btn-danger"
|
|
}
|
|
});
|
|
})
|
|
</script>
|
|
{% endblock content %} |