purchase_view_a_formularios_de_django #8

Merged
mono merged 4 commits from purchase_view_a_formularios_de_django into main 2024-07-06 09:42:32 -05:00
Showing only changes of commit 2425ecc811 - Show all commits

View File

@ -8,6 +8,9 @@ class Sale(models.Model):
phone = models.CharField(max_length=13, null=True, blank=True)
description = models.CharField(max_length=255, null=True, blank=True)
def __str__(self):
return f"{self.date} {self.customer}"
class SaleLine(models.Model):
@ -17,6 +20,9 @@ class SaleLine(models.Model):
unit_price = models.DecimalField(max_digits=9, decimal_places=2)
description = models.CharField(max_length=255, null=True, blank=True)
def __str__(self):
return f"{self.sale} - {self.product}"
class MeasuringUnits(models.TextChoices):
UNIT = 'UNIT', _('Unit')