From 4c82714777e57ebd01d770bfabba7c05fef244a0 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 18 May 2019 21:20:44 +1000 Subject: [PATCH] Allow 5 decimal places for pricing info --- .../migrations/0008_auto_20190518_2120.py | 19 +++++++++++++++++++ InvenTree/company/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 InvenTree/company/migrations/0008_auto_20190518_2120.py diff --git a/InvenTree/company/migrations/0008_auto_20190518_2120.py b/InvenTree/company/migrations/0008_auto_20190518_2120.py new file mode 100644 index 0000000000..ef9c318f52 --- /dev/null +++ b/InvenTree/company/migrations/0008_auto_20190518_2120.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2 on 2019-05-18 11:20 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('company', '0007_supplierpart_supplierpricebreak'), + ] + + operations = [ + migrations.AlterField( + model_name='supplierpricebreak', + name='cost', + field=models.DecimalField(decimal_places=5, max_digits=10, validators=[django.core.validators.MinValueValidator(0)]), + ), + ] diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index b45bd04c3d..90a0df23a2 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -312,7 +312,7 @@ class SupplierPriceBreak(models.Model): quantity = models.PositiveIntegerField(default=1, validators=[MinValueValidator(1)]) - cost = models.DecimalField(max_digits=10, decimal_places=3, validators=[MinValueValidator(0)]) + cost = models.DecimalField(max_digits=10, decimal_places=5, validators=[MinValueValidator(0)]) class Meta: unique_together = ("part", "quantity")