1
0
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:
Yohann D'ANELLO
2020-03-22 18:27:22 +01:00
parent 3551568de5
commit 5fd472d408
9 changed files with 94 additions and 12 deletions

View File

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