diff --git a/apps/user/models.py b/apps/user/models.py index c5c6db04..f53fb977 100644 --- a/apps/user/models.py +++ b/apps/user/models.py @@ -91,7 +91,11 @@ class User(AbstractUser): @property def balance(self): - aggregate = self.balances.filter(type=0).aggregate( + aggregate = self.balances.filter( + type=0, + payment__isnull=False, + payment__status__isnull=False + ).aggregate( models.Sum('amount'), models.Sum('commission'), ) diff --git a/project/templates/lilcity/index.html b/project/templates/lilcity/index.html index b7b7db99..07f6509e 100644 --- a/project/templates/lilcity/index.html +++ b/project/templates/lilcity/index.html @@ -72,6 +72,8 @@ var schoolDiscount = parseFloat({{ config.SERVICE_DISCOUNT }}); var schoolAmountForDiscount = parseFloat({{ config.SERVICE_DISCOUNT_MIN_AMOUNT }}); + {% comment %} ROISTAT {% endcomment %} + {% block foot %}{% endblock foot %} diff --git a/requirements.txt b/requirements.txt index 2e369f1e..7b283f09 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,26 +1,26 @@ # Python-3.6 arrow==0.12.1 -celery[redis]==4.1.0 -Django==2.0.5 -django-active-link==0.1.4 -django-anymail[mailgun]==2.2 -django-cors-headers==2.2.0 +celery[redis]==4.2.0 +Django==2.0.6 +django-active-link==0.1.5 +django-anymail[mailgun]==3.0 +django-cors-headers==2.3.0 django-filter==2.0.0.dev1 django-mptt==0.9.0 -django-silk==2.0.0 +django-silk==3.0.0 django-phonenumber-field==2.0.0 django-polymorphic-tree==1.5 djangorestframework==3.8.2 -drf-yasg[validation]==1.7.1 +drf-yasg[validation]==1.9.0 facepy==1.0.9 -gunicorn==19.7.1 +gunicorn==19.8.1 mixpanel==4.3.2 -psycopg2-binary==2.7.4 +psycopg2-binary==2.7.5 Pillow==5.1.0 -raven==6.7.0 -requests==2.18.4 +raven==6.9.0 +requests==2.19.1 sorl-thumbnail==12.4.1 -twilio==6.12.1 +twilio==6.14.6 # paymentwall-python==1.0.7 git+https://github.com/ivlevdenis/paymentwall-python.git # python-instagram==1.3.2