0001-lingo-clarify-message-on-paid-invoice-57952.patch
combo/apps/lingo/templates/lingo/combo/item.html | ||
---|---|---|
41 | 41 |
<span class="timestamp">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }} {% trans "(up to and including)" %}</span></div> |
42 | 42 |
{% endif %} |
43 | 43 |
{% if item.payment_date %} |
44 |
<div class="paid">{% trans "Payment date:" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
|
|
44 |
<div class="paid paid-info">{% trans "Invoice paid on" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
|
|
45 | 45 |
{% elif item.paid %} |
46 | 46 |
<div class="paid paid-info">{% trans "Invoice has been paid." %}</div> |
47 | 47 |
{% endif %} |
tests/test_lingo_remote_regie.py | ||
---|---|---|
670 | 670 |
mock_get.return_value = mock_json |
671 | 671 |
mock_pay_invoice.return_value = mock.Mock(status_code=200) |
672 | 672 |
resp = app.get('/lingo/item/%s/%s/?page=%s' % (remote_regie.id, encrypt_id, page.pk)) |
673 |
assert '"paid"' not in resp |
|
673 |
assert '"paid paid-info"' not in resp
|
|
674 | 674 |
form = resp.form |
675 | 675 |
assert form['next_url'].value == '/active-remote-invoices-page/' |
676 | 676 |
form['email'] = 'test@example.net' |
... | ... | |
702 | 702 |
# check true payment status is visible, even if the remote regie web-service still report the invoice as unpaid |
703 | 703 |
resp = app.get('/lingo/item/%s/%s/?page=%s' % (remote_regie.id, encrypt_id, page.pk)) |
704 | 704 |
assert not INVOICES[0]['paid'] |
705 |
assert '"paid"' in resp |
|
705 |
assert '"paid paid-info"' in resp
|
|
706 | 706 | |
707 | 707 | |
708 | 708 |
@mock.patch('combo.apps.lingo.models.UserSAMLIdentifier') |
709 |
- |