diff --git a/InvenTree/company/forms.py b/InvenTree/company/forms.py index 0ad63b9d63..76b1c1342c 100644 --- a/InvenTree/company/forms.py +++ b/InvenTree/company/forms.py @@ -57,7 +57,6 @@ class EditSupplierPartForm(HelperForm): 'note', 'base_cost', 'multiple', - 'minimum', 'packaging', 'lead_time' ] diff --git a/InvenTree/company/migrations/0003_remove_supplierpart_minimum.py b/InvenTree/company/migrations/0003_remove_supplierpart_minimum.py new file mode 100644 index 0000000000..21ec25ebbf --- /dev/null +++ b/InvenTree/company/migrations/0003_remove_supplierpart_minimum.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2 on 2019-05-21 03:51 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('company', '0002_auto_20190520_2204'), + ] + + operations = [ + migrations.RemoveField( + model_name='supplierpart', + name='minimum', + ), + ] diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index be6cf10f7c..5c3b3291ff 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -173,7 +173,6 @@ class SupplierPart(models.Model): note: Longer form note field base_cost: Base charge added to order independent of quantity e.g. "Reeling Fee" multiple: Multiple that the part is provided in - minimum: MOQ (minimum order quantity) required for purchase lead_time: Supplier lead time packaging: packaging that the part is supplied in, e.g. "Reel" """ @@ -217,8 +216,6 @@ class SupplierPart(models.Model): multiple = models.PositiveIntegerField(default=1, validators=[MinValueValidator(1)], help_text='Order multiple') - minimum = models.PositiveIntegerField(default=1, validators=[MinValueValidator(1)], help_text='Minimum order quantity (MOQ)') - lead_time = models.DurationField(blank=True, null=True) @property @@ -256,10 +253,6 @@ class SupplierPart(models.Model): if len(price_breaks) == 0: return None - # Minimum ordering requirement - if moq and self.minimum > quantity: - quantity = self.minimum - # Order multiples if multiples: quantity = int(math.ceil(quantity / self.multiple) * self.multiple) diff --git a/InvenTree/company/templates/company/partdetail.html b/InvenTree/company/templates/company/partdetail.html index 5d0eee89a9..812ceacf04 100644 --- a/InvenTree/company/templates/company/partdetail.html +++ b/InvenTree/company/templates/company/partdetail.html @@ -66,9 +66,6 @@ InvenTree | {{ company.name }} - Parts {% if part.base_cost > 0 %}