lingo: don't crash "past invoice" cell when used on basket items (#13505)

This commit is contained in:
Frédéric Péters 2016-10-11 10:15:19 +02:00
parent 94bc439887
commit 79c82fe077
2 changed files with 6 additions and 0 deletions

View File

@ -250,6 +250,10 @@ class BasketItem(models.Model):
self.cancellation_date = timezone.now()
self.save()
@property
def total_amount(self):
return self.amount
class RemoteItem(object):
payment_date = None

View File

@ -25,6 +25,7 @@
{{ amount }}€
{% endblocktrans %}
</td>
{% if item.regie.is_remote %}
<td>
<a href="{% url 'view-item' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}" rel="popup" class="icon-view">{% trans "View" %}
{% if item.online_payment and item.amount >= item.regie.payment_min_amount %}{% trans "and pay" %}{% endif %}
@ -34,6 +35,7 @@
>{% trans "Download" %}</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>