mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 18:08:21 +02:00
Create, view and update remittances
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
@ -88,7 +89,7 @@ class Product(models.Model):
|
||||
|
||||
|
||||
class Remittance(models.Model):
|
||||
date = models.DateField(
|
||||
date = models.DateTimeField(
|
||||
auto_now_add=True,
|
||||
verbose_name=_("Date"),
|
||||
)
|
||||
@ -104,6 +105,11 @@ class Remittance(models.Model):
|
||||
verbose_name=_("Comment"),
|
||||
)
|
||||
|
||||
closed = models.BooleanField(
|
||||
default=False,
|
||||
verbose_name=_("Closed"),
|
||||
)
|
||||
|
||||
@property
|
||||
def size(self):
|
||||
return self.specialtransaction_set.count()
|
||||
|
Reference in New Issue
Block a user