2020-02-16 18:37:16 +01:00
|
|
|
from django.db import models
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
|
|
PAYMENTS_CHOICES = (
|
2020-02-17 11:40:58 +01:00
|
|
|
("Espèces", _("Espèces")),
|
|
|
|
("CB", _("CB")),
|
|
|
|
("Chèque", _("Chèque")),
|
2020-02-16 18:37:16 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
class JournalEntry(models.Model):
|
|
|
|
entry_text = models.CharField(max_length=500)
|
|
|
|
entry_date = models.DateTimeField('Date')
|
|
|
|
cofeux_id = models.CharField("Trigramme", max_length=8)
|
|
|
|
entry_amount = models.FloatField()
|
|
|
|
payment_type = models.CharField(
|
|
|
|
_("Moyen de paiement"), choices=PAYMENTS_CHOICES, max_length=20
|
|
|
|
)
|
|
|
|
def __str__(self):
|
|
|
|
return self.entry_text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|