mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Improve number rendering of build allocation page
This commit is contained in:
@ -20,6 +20,7 @@ from markdownx.models import MarkdownxField
|
||||
|
||||
from InvenTree.status_codes import BuildStatus
|
||||
from InvenTree.fields import InvenTreeURLField
|
||||
from InvenTree.helpers import decimal2string
|
||||
|
||||
from stock.models import StockItem
|
||||
from part.models import Part, BomItem
|
||||
@ -42,7 +43,7 @@ class Build(models.Model):
|
||||
"""
|
||||
|
||||
def __str__(self):
|
||||
return "Build {q} x {part}".format(q=self.quantity, part=str(self.part))
|
||||
return "Build {q} x {part}".format(q=decimal2string(self.quantity), part=str(self.part))
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('build-detail', kwargs={'pk': self.id})
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
{% block collapse_heading %}
|
||||
<div class='col-sm-2'>
|
||||
<b>{{ item.sub_part.total_stock }}</b>
|
||||
<b>{% decimal item.sub_part.total_stock %}</b>
|
||||
</div>
|
||||
<div class='col-sm-2'>
|
||||
<b>{% multiply build.quantity item.quantity %}</b>
|
||||
|
Reference in New Issue
Block a user