lingo: clarify message on paid invoice (#57952)

This commit is contained in:
Thomas NOËL 2021-10-18 15:43:56 +00:00 committed by Thomas NOËL
parent 71a362bb14
commit 3b5b7081e2
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@
<span class="timestamp">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }} {% trans "(up to and including)" %}</span></div>
{% endif %}
{% if item.payment_date %}
<div class="paid">{% trans "Payment date:" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
<div class="paid paid-info">{% trans "Invoice paid on" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
{% elif item.paid %}
<div class="paid paid-info">{% trans "Invoice has been paid." %}</div>
{% endif %}

View File

@ -670,7 +670,7 @@ def test_remote_invoice_successfull_payment_redirect(
mock_get.return_value = mock_json
mock_pay_invoice.return_value = mock.Mock(status_code=200)
resp = app.get('/lingo/item/%s/%s/?page=%s' % (remote_regie.id, encrypt_id, page.pk))
assert '"paid"' not in resp
assert '"paid paid-info"' not in resp
form = resp.form
assert form['next_url'].value == '/active-remote-invoices-page/'
form['email'] = 'test@example.net'
@ -702,7 +702,7 @@ def test_remote_invoice_successfull_payment_redirect(
# check true payment status is visible, even if the remote regie web-service still report the invoice as unpaid
resp = app.get('/lingo/item/%s/%s/?page=%s' % (remote_regie.id, encrypt_id, page.pk))
assert not INVOICES[0]['paid']
assert '"paid"' in resp
assert '"paid paid-info"' in resp
@mock.patch('combo.apps.lingo.models.UserSAMLIdentifier')