2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-05 09:13:35 +00:00
This commit is contained in:
2021-06-05 17:24:04 +02:00
parent 768080f9a0
commit 81f00753c6
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -726,7 +726,7 @@ class PriceBreak(models.Model):
return converted.amount
def get_price(instance, quantity, moq=True, multiples=True, currency=None, break_name:str='price_breaks'):
def get_price(instance, quantity, moq=True, multiples=True, currency=None, break_name: str = 'price_breaks'):
""" Calculate the price based on quantity price breaks.
- Don't forget to add in flat-fee cost (base_cost field)
+2 -2
View File
@@ -1649,8 +1649,8 @@ class Part(MPTTModel):
price=price
)
def get_internal_price(instance, quantity, moq=True, multiples=True, currency=None):
return common.models.get_price(instance, quantity, moq, multiples, currency, break_name='internal_price_breaks')
def get_internal_price(self, quantity, moq=True, multiples=True, currency=None):
return common.models.get_price(self, quantity, moq, multiples, currency, break_name='internal_price_breaks')
@property
def has_internal_price_breaks(self):