This commit is contained in:
Matthias 2021-06-05 17:24:04 +02:00
parent 768080f9a0
commit 81f00753c6
2 changed files with 3 additions and 3 deletions

View File

@ -726,7 +726,7 @@ class PriceBreak(models.Model):
return converted.amount 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. """ Calculate the price based on quantity price breaks.
- Don't forget to add in flat-fee cost (base_cost field) - Don't forget to add in flat-fee cost (base_cost field)

View File

@ -1649,8 +1649,8 @@ class Part(MPTTModel):
price=price price=price
) )
def get_internal_price(instance, quantity, moq=True, multiples=True, currency=None): def get_internal_price(self, quantity, moq=True, multiples=True, currency=None):
return common.models.get_price(instance, quantity, moq, multiples, currency, break_name='internal_price_breaks') return common.models.get_price(self, quantity, moq, multiples, currency, break_name='internal_price_breaks')
@property @property
def has_internal_price_breaks(self): def has_internal_price_breaks(self):