You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
686 B

from django.db import models
from django.utils import timezone
from users.models import User
TYPES = (
('minus', 'Снятие'),
('plus', 'Приход'),
)
class InvoiceHistory(models.Model):
comment = models.TextField(blank=True)
created = models.DateTimeField(default=timezone.now)
sum = models.DecimalField(max_digits=10, decimal_places=0, default=0, null=True, blank=True)
type = models.CharField(max_length=20)
user = models.ForeignKey(User, related_name='invoice_history')
def __str__(self):
return self.pk
class Meta:
verbose_name = 'Счет(История)'
verbose_name_plural = 'Счет(История)'