check invoice online payment attribute

This commit is contained in:
Serghei Mihai 2015-09-23 10:49:01 +02:00
parent fa4c0a24ac
commit bd46d535d2
2 changed files with 6 additions and 3 deletions

View File

@ -56,7 +56,8 @@ def build_remote_item(data, regie):
total_amount=data.get('total_amount'),
amount=data.get('amount'),
subject=data.get('label'),
has_pdf=data.get('has_pdf'))
has_pdf=data.get('has_pdf'),
online_payment=data.get('online_payment'))
class Regie(models.Model):
@ -176,7 +177,8 @@ class BasketItem(models.Model):
class RemoteItem(object):
def __init__(self, id, regie, creation_date, total_amount,
amount, display_id, subject, has_pdf):
amount, display_id, subject, has_pdf,
online_payment):
self.id = id
self.regie = regie
self.creation_date = parser.parse(creation_date)
@ -185,6 +187,7 @@ class RemoteItem(object):
self.display_id = display_id
self.subject = subject
self.has_pdf = has_pdf
self.online_payment = online_payment
class Transaction(models.Model):

View File

@ -29,7 +29,7 @@
{% if item.payment_date %}
<p>{% trans "Payed on : " %} {{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</p>
{% endif %}
{% if item.amount %}
{% if item.online_payement %}
{% csrf_token %}
<input type="hidden" name="regie" value="{{ regie.pk }}" />
<input type="hidden" name="item" value="{{ item.id }}" />