Browse Source

добавил опциональный коммент

devel
Dmitry 9 years ago
parent
commit
59a0704add
  1. 4
      abonapp/models.py

4
abonapp/models.py

@ -199,12 +199,12 @@ class Abon(UserProfile):
self.ballance -= how_match_to_pay self.ballance -= how_match_to_pay
# Пополняем счёт # Пополняем счёт
def add_ballance(self, current_user, amount):
def add_ballance(self, current_user, amount, comment):
AbonLog.objects.create( AbonLog.objects.create(
abon=self, abon=self,
amount=amount, amount=amount,
author=current_user, author=current_user,
comment='Пополнение счёта через админку'
comment=comment
) )
self.ballance += amount self.ballance += amount

Loading…
Cancel
Save