quickfix inventory view
This commit is contained in:
1 parent
c7fb6102b0
commit
292235858e
1 file changed
+3
@@ -39,8 +39,11 @@ class Product(models.Model):
|
||||
if self.inventory_amount <= sum_units:
|
||||
return up['unit_price']
|
||||
|
||||
if len(unit_prices) > 0:
|
||||
return unit_prices[0]['unit_price']
|
||||
|
||||
return 0
|
||||
|
||||
@property
|
||||
def wholesale_value(self):
|
||||
return self.wholesale_unit_price * self.inventory_amount
|
||||
|
||||
Reference in new issue
Block a user