gestioCOF/journaldecaisse/models.py

24 lines
591 B
Python
Raw Normal View History

2020-02-16 18:37:16 +01:00
from django.db import models
from django.utils.translation import ugettext_lazy as _
PAYMENTS_CHOICES = (
("cash", _("Espèces")),
("cb", _("CB")),
("check", _("Chèque")),
)
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