2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

Include pricing information in part supplier view

Also some CSS tweaks to secondary modal buttons
This commit is contained in:
Oliver Walters
2019-05-22 22:11:27 +10:00
parent 49425efef9
commit cd7bc6cce5
8 changed files with 55 additions and 8 deletions

View File

@ -239,6 +239,10 @@ class SupplierPart(models.Model):
""" Return the associated price breaks in the correct order """
return self.pricebreaks.order_by('quantity').all()
@property
def unit_pricing(self):
return self.get_price(1)
def get_price(self, quantity, moq=True, multiples=True):
""" Calculate the supplier price based on quantity price breaks.