Fix: Clean Home, Crear lineas de Venta

This commit is contained in:
2024-07-12 22:00:37 -05:00
parent 7b0bee8313
commit 7223c0c9a9
6 changed files with 27 additions and 14 deletions

View File

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