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

Update company API

- option to include manufacturer_detail
- improve company serializer
This commit is contained in:
Oliver Walters
2020-04-13 17:37:44 +10:00
parent 6ef32dfa2d
commit 2ea1e72c44
4 changed files with 35 additions and 13 deletions

View File

@ -23,6 +23,7 @@ from markdownx.models import MarkdownxField
from stdimage.models import StdImageField
from InvenTree.helpers import getMediaUrl, getBlankImage, getBlankThumbnail
from InvenTree.helpers import normalize
from InvenTree.fields import InvenTreeURLField, RoundingDecimalField
from InvenTree.status_codes import OrderStatus
from common.models import Currency
@ -352,7 +353,7 @@ class SupplierPart(models.Model):
if pb_found:
cost = pb_cost * quantity
return cost + self.base_cost
return normalize(cost + self.base_cost)
else:
return None