mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
style
This commit is contained in:
parent
768080f9a0
commit
81f00753c6
@ -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)
|
||||||
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user