|
|
@ -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 |
|
|
|
|
|
|
|
|
|