Commit 8ac5efb1 authored by Patrick Kimber's avatar Patrick Kimber

tidy - invoice issues

parent 3c11adbd
Pipeline #81415431 passed with stage
in 5 minutes and 38 seconds
......@@ -54,6 +54,13 @@ class InvoiceBlankTodayForm(RequiredFieldForm):
class InvoiceIssueForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields["comment"].widget.attrs.update(
{"class": "pure-input-1", "rows": 5}
)
self.fields["confirmed"].label = "Issue resolved"
class Meta:
model = InvoiceIssue
fields = ("confirmed", "comment")
......
<thead>
<tr valign="top">
<th>Number</th>
<th>Issue</th>
<th>Status</th>
<th>Invoice / Credit</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for issue in invoiceissue_list %}
<tr valign="top">
<td>
<a href="{% url 'invoice.detail' issue.pk %}">
{{ issue.invoice.invoice_number }}
</a>
</td>
<td>
<ul>
{% for description in issue.lines %}
<li>
{{ description }}
</li>
{% endfor %}
</ul>
</td>
<td>
<a href="{% url 'invoice.issue.update' issue.pk %}">
{% if issue.confirmed %}
<i class="fa fa-check"></i>
Confirmed
<i class="fa fa-check"></i>
{% else %}
<i class="fa fa-edit"></i>
Resolve
{% endif %}
{% if issue.comment %}
<small>
({{ issue.comment|truncatewords_html:10 }})
</small>
{% endif %}
</a>
</td>
<td>
<a href="{% url 'invoice.detail' issue.pk %}">
{{ issue.invoice.invoice_number }}
</a>
</td>
<td>
{% for description in issue.lines %}
{% if not forloop.first %}
<br>
{% endif %}
{% if forloop.first and forloop.last %}
{{ description }}
{% else %}
{{ forloop.counter }}. {{ description }}
{% endif %}
{% endfor %}
{% if issue.comment %}
<br>
<strong>
Comment:
</strong>
{{ issue.comment|truncatewords_html:10 }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
{% extends "invoice/base.html" %} {% block sub_title %} Invoice Issue {{ object.pk }} {% endblock sub_title %} {% block sub_heading %} Invoice issue {{ object.pk }} {% endblock sub_heading %} {% block content %}
<div class="pure-g">
<div class="pure-u-1">
{% include '_form.html' %}
{% include '_form.html' with inline_checkbox=True %}
</div>
</div>
{% endblock content %}
\ No newline at end of file
{% endblock content %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment