Allow 5 decimal places for pricing info

This commit is contained in:
Oliver Walters 2019-05-18 21:20:44 +10:00
parent cdc55bb5d3
commit 4c82714777
2 changed files with 20 additions and 1 deletions

View File

@ -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)]),
),
]

View File

@ -312,7 +312,7 @@ class SupplierPriceBreak(models.Model):
quantity = models.PositiveIntegerField(default=1, validators=[MinValueValidator(1)]) 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: class Meta:
unique_together = ("part", "quantity") unique_together = ("part", "quantity")