]
interval = models.SmallIntegerField(_('inteval'), choices=intervals)
- min_amount = models.DecimalField(_('min_amount'), max_digits=10, decimal_places=2)
+ min_amount = models.DecimalField(_('min amount'), max_digits=10, decimal_places=2)
+ default_amount = models.DecimalField(_('default amount'), max_digits=10, decimal_places=2)
allow_recurring = models.BooleanField(_('allow recurring'))
allow_one_time = models.BooleanField(_('allow one time'))
active = models.BooleanField(_('active'), default=True)
""" Represents a user being recognized as a member of the club. """
user = models.OneToOneField(settings.AUTH_USER_MODEL, verbose_name=_('user'), on_delete=models.CASCADE)
created_at = models.DateTimeField(_('created at'), auto_now_add=True)
+ name = models.CharField(max_length=255, blank=True)
honorary = models.BooleanField(default=False)
class Meta:
def status_updated(self):
if self.status == 'COMPLETED':
- new_exp = self.schedule.plan.get_next_installment(now())
+ since = self.schedule.expires_at or now()
+ new_exp = self.schedule.plan.get_next_installment(since)
if self.schedule.expires_at is None or self.schedule.expires_at < new_exp:
self.schedule.expires_at = new_exp
self.schedule.save()