0001-lingo-invoice-details-if-present-10483.patch
combo/apps/lingo/models.py | ||
---|---|---|
70 | 70 |
subject=data.get('label'), |
71 | 71 |
has_pdf=data.get('has_pdf'), |
72 | 72 |
online_payment=data.get('online_payment'), |
73 |
payment_date=data.get('payment_date')) |
|
73 |
payment_date=data.get('payment_date'), |
|
74 |
details=data.get('comment'), |
|
75 |
status=data.get('status')) |
|
74 | 76 | |
75 | 77 | |
76 | 78 |
class Regie(models.Model): |
... | ... | |
229 | 231 | |
230 | 232 |
def __init__(self, id, regie, creation_date, payment_limit_date, |
231 | 233 |
total_amount, amount, display_id, subject, has_pdf, |
232 |
online_payment, payment_date): |
|
234 |
online_payment, payment_date, status, details):
|
|
233 | 235 |
self.id = id |
234 | 236 |
self.regie = regie |
235 | 237 |
self.creation_date = parser.parse(creation_date) |
... | ... | |
240 | 242 |
self.subject = subject |
241 | 243 |
self.has_pdf = has_pdf |
242 | 244 |
self.online_payment = online_payment |
245 |
self.details = details |
|
246 |
self.status = status |
|
243 | 247 |
if payment_date: |
244 | 248 |
self.payment_date = parser.parse(payment_date) |
245 | 249 |
combo/apps/lingo/templates/lingo/combo/item.html | ||
---|---|---|
29 | 29 |
{% if item.payment_date %} |
30 | 30 |
<div class="paid">{% trans "Payed on:" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div> |
31 | 31 |
{% endif %} |
32 |
{% if item.details %} |
|
33 |
<div class="details">{% trans "Details:" %} <span>{{ item.details }}</span></div> |
|
34 |
{% endif %} |
|
32 | 35 |
{% if item.online_payment and item.amount >= regie.payment_min_amount %} |
33 | 36 |
{% csrf_token %} |
34 | 37 |
<input type="hidden" name="regie" value="{{ regie.pk }}" /> |
combo/apps/lingo/templates/lingo/combo/items.html | ||
---|---|---|
8 | 8 |
<tr> |
9 | 9 |
<th class="invoice-id">{% trans "Number" %}</th> |
10 | 10 |
<th class="invoice-subject">{% trans "Label" %}</th> |
11 |
<th class="invoice-details">{% trans "Details" %}</th> |
|
11 | 12 |
<th class="invoice-creation-date">{% trans "Issue date" %}</th> |
12 | 13 |
<th class="invoice-payment-limit-date">{% trans "Payment limit date" %}</th> |
13 | 14 |
<th class="invoice-amount">{% trans "Amount" %}</th> |
... | ... | |
16 | 17 |
</thead> |
17 | 18 |
<tbody> |
18 | 19 |
{% for item in items %} |
19 |
<tr> |
|
20 |
<tr class='{{ item.status }}-invoice'>
|
|
20 | 21 |
<td class="invoice-id">{{ item.display_id }}</td> |
21 |
<td class="invoice-subject">{{ item.subject }}</td> |
|
22 |
<td class="invoice-subject"> |
|
23 |
{{ item.subject }} |
|
24 |
</td> |
|
25 |
<td class="invoice-details">{{ item.details }}</td> |
|
22 | 26 |
<td class="invoice-creation-date">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</td> |
23 | 27 |
<td class="invoice-payment-limit-date">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }}</td> |
24 | 28 |
<td class="invoice-amount amount">{% blocktrans with amount=item.total_amount|floatformat:"2" %} |
25 |
- |