diff --git a/abonapp/locale/ru/LC_MESSAGES/django.po b/abonapp/locale/ru/LC_MESSAGES/django.po index b8ec190..fd4562c 100644 --- a/abonapp/locale/ru/LC_MESSAGES/django.po +++ b/abonapp/locale/ru/LC_MESSAGES/django.po @@ -43,10 +43,6 @@ msgstr "Пополнение счёта" msgid "not enough money" msgstr "Не хватает денег на счету" -#: abonapp/models.py:125 -msgid "service finish log" -msgstr "Завершение и оплата услуги по истечению срока действия" - #: abonapp/models.py:144 msgid "finish service perm" msgstr "Снятие со счёта средств" diff --git a/abonapp/models.py b/abonapp/models.py index 011acf2..63c06bb 100644 --- a/abonapp/models.py +++ b/abonapp/models.py @@ -123,7 +123,7 @@ class AbonTariff(models.Model): # считаем дату завершения услуги self.deadline = calc_obj.calc_deadline() # снимаем деньги за услугу - self.abon.make_pay(current_user, amnt, u_comment=_('service finish log')) + self.abon.make_pay(current_user, amnt) self.save() # Используется-ли услуга сейчас, если время старта есть то он активирован @@ -235,13 +235,7 @@ class Abon(UserProfile): ) # Платим за что-то - def make_pay(self, curuser, how_match_to_pay=0.0, u_comment=_('pay log')): - AbonLog.objects.create( - abon=self, - amount=-how_match_to_pay, - author=curuser, - comment=u_comment - ) + def make_pay(self, curuser, how_match_to_pay=0.0): self.ballance -= how_match_to_pay self.save(update_fields=['ballance']) diff --git a/clientsideapp/views.py b/clientsideapp/views.py index 1d00f33..afc7530 100644 --- a/clientsideapp/views.py +++ b/clientsideapp/views.py @@ -175,7 +175,7 @@ def debt_buy(request, d_id): if abon.ballance < debt.amount: raise LogicError('Не достаточно средств на счету') - abon.make_pay(request.user, debt.amount, debt.comment) + abon.make_pay(request.user, debt.amount) debt.set_ok() abon.save(update_fields=['ballance']) debt.save(update_fields=['status', 'date_pay'])