mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-15 15:11:34 +00:00
Added "ProjectRun" model
This commit is contained in:
@@ -9,9 +9,9 @@ from part.models import Part
|
||||
class Supplier(Company):
|
||||
""" Represents a manufacturer or supplier
|
||||
"""
|
||||
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class Manufacturer(Company):
|
||||
""" Represents a manfufacturer
|
||||
@@ -37,13 +37,18 @@ class SupplierPart(models.Model):
|
||||
supplier = models.ForeignKey(Supplier,
|
||||
on_delete=models.CASCADE)
|
||||
SKU = models.CharField(max_length=100)
|
||||
|
||||
|
||||
manufacturer = models.ForeignKey(Manufacturer, blank=True, null=True, on_delete=models.CASCADE)
|
||||
MPN = models.CharField(max_length=100, blank=True)
|
||||
|
||||
|
||||
URL = models.URLField(blank=True)
|
||||
description = models.CharField(max_length=250, blank=True)
|
||||
|
||||
single_price = models.DecimalField(max_digits=10, decimal_places=3)
|
||||
|
||||
# packaging that the part is supplied in, e.g. "Reel"
|
||||
packaging = models.CharField(max_length=50, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return "{mpn} - {supplier}".format(
|
||||
mpn=self.MPN,
|
||||
@@ -58,7 +63,7 @@ class SupplierPriceBreak(models.Model):
|
||||
|
||||
part = models.ForeignKey(SupplierPart,
|
||||
on_delete=models.CASCADE)
|
||||
quantity = models.IntegerField()
|
||||
quantity = models.PositiveIntegerField()
|
||||
cost = models.DecimalField(max_digits=10, decimal_places=3)
|
||||
currency = models.CharField(max_length=10,
|
||||
blank=True)
|
||||
|
Reference in New Issue
Block a user