2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-08 12:50:55 +00:00

VIews / forms / etc

This commit is contained in:
Oliver Walters
2020-09-18 21:49:56 +10:00
parent 1a90106bac
commit ff7570aea4
5 changed files with 117 additions and 4 deletions

View File

@@ -17,6 +17,8 @@ from .models import Part, PartCategory, PartAttachment
from .models import BomItem
from .models import PartParameterTemplate, PartParameter
from .models import PartTestTemplate
from .models import PartSellPriceBreak
from common.models import Currency
@@ -253,3 +255,22 @@ class PartPriceForm(forms.Form):
'quantity',
'currency',
]
class EditPartSalePriceBreakForm(HelperForm):
"""
Form for creating / editing a sale price for a part
"""
quantity = RoundingDecimalFormField(max_digits=10, decimal_places=5)
cost = RoundingDecimalFormField(max_digits=10, decimal_places=5)
class Meta:
model = PartSellPriceBreak
fields = [
'part',
'quantity',
'cost',
'currency',
]