From fd26b2ce661f11d462ffaefced556c6262c9116d Mon Sep 17 00:00:00 2001 From: Dmitriy Shesterkin Date: Thu, 6 Jul 2017 17:17:23 +0300 Subject: [PATCH] fixs --- src/customer/models.py | 10 +++++----- templates/customer/profile/orders_list.html | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/customer/models.py b/src/customer/models.py index 9fcf8f2..f3b488b 100644 --- a/src/customer/models.py +++ b/src/customer/models.py @@ -653,11 +653,11 @@ class License(models.Model): @property def account_status(self): - if self.status in [0, 1, 4]: - if self.status in [0, 4]: - return 'Счет не оплачен' - else: - return 'Счет оплачен' + if self.status in [0, 4]: + return 'Счет не оплачен' + else: + return 'Счет оплачен' + @property def account_sub_status(self): diff --git a/templates/customer/profile/orders_list.html b/templates/customer/profile/orders_list.html index 281cbd1..bb8a221 100644 --- a/templates/customer/profile/orders_list.html +++ b/templates/customer/profile/orders_list.html @@ -43,8 +43,12 @@ {% if object.type %}
+ {% if object.pay_sum == 0 %} + + {% else %}

{{ object.account_status }} {% if object.paid_date %}{{ object.paid_date }}{% endif %}

{% if object.paid_date %}Выдана лицензия № {{ object.id }}{% else %}{{ object.account_sub_status }}{% endif %}

+ {% endif %}
{% else %}