Fix: Clean Home, Crear lineas de Venta
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class Sale(models.Model):
|
||||
|
||||
customer = models.CharField(max_length=100)
|
||||
@@ -23,15 +24,18 @@ class SaleLine(models.Model):
|
||||
def __str__(self):
|
||||
return f"{self.sale} - {self.product}"
|
||||
|
||||
|
||||
class MeasuringUnits(models.TextChoices):
|
||||
UNIT = 'UNIT', _('Unit')
|
||||
|
||||
|
||||
class ProductCategory(models.Model):
|
||||
name = models.CharField(max_length=100, unique=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class Product(models.Model):
|
||||
name = models.CharField(max_length=100, unique=True)
|
||||
price = models.DecimalField(max_digits=9, decimal_places=2)
|
||||
|
||||
Reference in New Issue
Block a user