mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 09:55:28 +00:00
Add API interface for SupplierPriceBreak
This commit is contained in:
1 parent
a3b544e2a4
commit
150bc1e674
3 files changed
+38
-3
No files matched your search
@@ -508,6 +508,10 @@ class SupplierPart(models.Model):
|
||||
|
||||
return ' | '.join(items)
|
||||
|
||||
@property
|
||||
def has_price_breaks(self):
|
||||
return self.price_breaks.count() > 0
|
||||
|
||||
def get_price(self, quantity, moq=True, multiples=True):
|
||||
""" Calculate the supplier price based on quantity price breaks.
|
||||
- If no price breaks available, use the single_price field
|
||||
|
||||
Reference in new issue
Block a user