7 changed files with 118 additions and 107 deletions
-
38abonapp/templates/abonapp/abonamount.html
-
14abonapp/templates/abonapp/ext.htm
-
117abonapp/templates/abonapp/invoiceForPayment.html
-
31abonapp/templates/abonapp/modal_abonamount.html
-
18abonapp/templates/abonapp/payHistory.html
-
2abonapp/urls_abon.py
-
5abonapp/views.py
@ -1,38 +0,0 @@ |
|||||
{% extends request.is_ajax|yesno:'nullcont.htm,abonapp/ext.htm' %} |
|
||||
{% load i18n %} |
|
||||
{% block content %} |
|
||||
|
|
||||
|
|
||||
<legend>{% trans 'Additional sum' %}</legend> |
|
||||
|
|
||||
|
|
||||
<div class="row"> |
|
||||
<div class="col-sm-4"> |
|
||||
<form role="form" action="{% url 'abonapp:abon_amount' abon_group.id abon.id %}" |
|
||||
method="post"> {% csrf_token %} |
|
||||
|
|
||||
<div class="form-group-sm"> |
|
||||
<label for="amount">{% trans 'Amount of money' %}</label> |
|
||||
|
|
||||
<div class="input-group"> |
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-ruble"></span></span> |
|
||||
<input id="amount" type="text" name="amount" placeholder="0.0" class="form-control" required |
|
||||
pattern="\d+"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<input type="hidden" name="abonid" value="{{ abon.id }}"><br> |
|
||||
|
|
||||
<div class="btn-group"> |
|
||||
<button type="submit" class="btn btn-sm btn-primary"> |
|
||||
<span class="glyphicon glyphicon-save"></span> {% trans 'Refill' %} |
|
||||
</button> |
|
||||
<button type="reset" class="btn btn-sm btn-default"> |
|
||||
<span class="glyphicon glyphicon-remove-circle"></span> {% trans 'Reset' %} |
|
||||
</button> |
|
||||
</div> |
|
||||
|
|
||||
</form> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
{% endblock %} |
|
||||
@ -1,57 +1,72 @@ |
|||||
{% extends request.is_ajax|yesno:'nullcont.htm,abonapp/ext.htm' %} |
|
||||
|
{% extends 'base.html' %} |
||||
{% load i18n %} |
{% load i18n %} |
||||
{% block content %} |
|
||||
|
{% block main %} |
||||
|
|
||||
<table class="table table-striped table-bordered"> |
|
||||
<thead> |
|
||||
<tr> |
|
||||
<th>{% trans 'Pay status' %}</th> |
|
||||
<th>{% trans 'Month' %}</th> |
|
||||
<th>{% trans 'Sum' %}</th> |
|
||||
<th>{% trans 'Comment' %}</th> |
|
||||
<th>{% trans 'Date of make' %}</th> |
|
||||
<th>{% trans 'Date of payment' %}</th> |
|
||||
<th>{% trans 'Author of payment' %}</th> |
|
||||
</tr> |
|
||||
</thead> |
|
||||
<tbody> |
|
||||
{% for inv in invoices %} |
|
||||
<tr> |
|
||||
<td>{% if inv.status %} |
|
||||
<span class="glyphicon glyphicon-ok"></span> |
|
||||
{% else %} |
|
||||
<span class="glyphicon glyphicon-time"></span> |
|
||||
{% endif %}</td> |
|
||||
<td>{{ inv.date_create|date:"F" }}</td> |
|
||||
<td>{{ inv.amount }}</td> |
|
||||
<td>{{ inv.comment }}</td> |
|
||||
<td>{{ inv.date_create|date:"D d E Y H:i:s" }}</td> |
|
||||
<td> |
|
||||
{% if inv.date_pay %} |
|
||||
{{ inv.date_pay|date:"D d M Y H:i:s" }} |
|
||||
{% else %} |
|
||||
{{ inv.status|yesno:_('Created paid,Not yet paid') }} |
|
||||
{% endif %} |
|
||||
</td> |
|
||||
<td><a href="{% url 'acc_app:other_profile' inv.author.id %}" target="_blank">{{ inv.author.username }}</a></td> |
|
||||
</tr> |
|
||||
{% empty %} |
|
||||
<tr> |
|
||||
<td colspan="7">{% trans 'Receipts not found' %}</td> |
|
||||
</tr> |
|
||||
{% endfor %} |
|
||||
</tbody> |
|
||||
{% if perms.abonapp.add_invoiceforpayment %} |
|
||||
<tfoot> |
|
||||
|
<ol class="breadcrumb"> |
||||
|
<li><span class="glyphicon glyphicon-home"></span></li> |
||||
|
<li><a href="{% url 'abonapp:group_list' %}">{% trans 'User groups' %}</a></li> |
||||
|
<li><a href="{% url 'abonapp:people_list' abon_group.pk %}">{{ abon_group.title }}</a></li> |
||||
|
<li><a href="{% url 'abonapp:abon_phistory' abon_group.pk abon.pk %}">{{ abon.fio }}</a></li> |
||||
|
<li class="active">{% trans 'Debts' %}</li> |
||||
|
</ol> |
||||
|
|
||||
|
{% include 'message_block.html' %} |
||||
|
|
||||
|
<h3>{% trans 'Debtor' %} {{ abon.fio }}</h3> |
||||
|
<div class="table-responsive"> |
||||
|
<table class="table table-striped table-bordered"> |
||||
|
<thead> |
||||
<tr> |
<tr> |
||||
<th colspan="7"> |
|
||||
<a href="{% url 'abonapp:add_invoice' abon_group.id abon.id %}" class="btn btn-success btn-sm"> |
|
||||
<span class="glyphicon glyphicon-plus"></span> {% trans 'Add debt' %} |
|
||||
</a> |
|
||||
</th> |
|
||||
|
<th>{% trans 'Pay status' %}</th> |
||||
|
<th>{% trans 'Month' %}</th> |
||||
|
<th>{% trans 'Sum' %}</th> |
||||
|
<th>{% trans 'Comment' %}</th> |
||||
|
<th>{% trans 'Date of make' %}</th> |
||||
|
<th>{% trans 'Date of payment' %}</th> |
||||
|
<th>{% trans 'Author of payment' %}</th> |
||||
</tr> |
</tr> |
||||
</tfoot> |
|
||||
{% endif %} |
|
||||
</table> |
|
||||
|
</thead> |
||||
|
<tbody> |
||||
|
{% for inv in invoices %} |
||||
|
<tr> |
||||
|
<td>{% if inv.status %} |
||||
|
<span class="glyphicon glyphicon-ok"></span> |
||||
|
{% else %} |
||||
|
<span class="glyphicon glyphicon-time"></span> |
||||
|
{% endif %}</td> |
||||
|
<td>{{ inv.date_create|date:"F" }}</td> |
||||
|
<td>{{ inv.amount }}</td> |
||||
|
<td>{{ inv.comment }}</td> |
||||
|
<td>{{ inv.date_create|date:"D d E Y H:i:s" }}</td> |
||||
|
<td> |
||||
|
{% if inv.date_pay %} |
||||
|
{{ inv.date_pay|date:"D d M Y H:i:s" }} |
||||
|
{% else %} |
||||
|
{{ inv.status|yesno:_('Created paid,Not yet paid') }} |
||||
|
{% endif %} |
||||
|
</td> |
||||
|
<td><a href="{% url 'acc_app:other_profile' inv.author.id %}" target="_blank">{{ inv.author.username }}</a></td> |
||||
|
</tr> |
||||
|
{% empty %} |
||||
|
<tr> |
||||
|
<td colspan="7">{% trans 'Receipts not found' %}</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</tbody> |
||||
|
{% if perms.abonapp.add_invoiceforpayment %} |
||||
|
<tfoot> |
||||
|
<tr> |
||||
|
<th colspan="7"> |
||||
|
<a href="{% url 'abonapp:add_invoice' abon_group.id abon.id %}" class="btn btn-success btn-sm"> |
||||
|
<span class="glyphicon glyphicon-plus"></span> {% trans 'Add debt' %} |
||||
|
</a> |
||||
|
</th> |
||||
|
</tr> |
||||
|
</tfoot> |
||||
|
{% endif %} |
||||
|
</table> |
||||
|
</div> |
||||
|
|
||||
|
{% include 'toolbar_page.html' with pag=invoices %} |
||||
|
|
||||
{% endblock %} |
{% endblock %} |
||||
@ -0,0 +1,31 @@ |
|||||
|
{% load i18n %} |
||||
|
|
||||
|
<form role="form" action="{% url 'abonapp:abon_amount' abon_group.id abon.id %}" method="post"> {% csrf_token %} |
||||
|
<div class="modal-header primary"> |
||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
||||
|
<h4 class="modal-title"><span class="glyphicon glyphicon-shopping-cart"></span>{% trans 'Additional sum' %}</h4> |
||||
|
</div> |
||||
|
|
||||
|
<div class="modal-body"> |
||||
|
<div class="form-group-sm"> |
||||
|
<label for="amount">{% trans 'Amount of money' %}</label> |
||||
|
|
||||
|
<div class="input-group"> |
||||
|
<span class="input-group-addon"><span class="glyphicon glyphicon-ruble"></span></span> |
||||
|
<input id="amount" type="text" name="amount" placeholder="0.0" class="form-control" required |
||||
|
pattern="\d+"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<input type="hidden" name="abonid" value="{{ abon.id }}"><br> |
||||
|
|
||||
|
<div class="btn-group"> |
||||
|
<button type="submit" class="btn btn-sm btn-primary"> |
||||
|
<span class="glyphicon glyphicon-save"></span> {% trans 'Refill' %} |
||||
|
</button> |
||||
|
<button type="reset" class="btn btn-sm btn-default"> |
||||
|
<span class="glyphicon glyphicon-remove-circle"></span> {% trans 'Reset' %} |
||||
|
</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</form> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue