Feat(WIP): Calculo Total en Linea
This commit is contained in:
@@ -14,12 +14,12 @@ class Sale(models.Model):
|
||||
|
||||
|
||||
class SaleLine(models.Model):
|
||||
|
||||
sale = models.ForeignKey(Sale, on_delete=models.CASCADE)
|
||||
product = models.CharField(max_length=100)
|
||||
quantity = models.IntegerField(null=True)
|
||||
unit_price = models.DecimalField(max_digits=9, decimal_places=2)
|
||||
description = models.CharField(max_length=255, null=True, blank=True)
|
||||
total = models.DecimalField(max_digits=9, decimal_places=2)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.sale} - {self.product}"
|
||||
|
||||
Reference in New Issue
Block a user