mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
Merge pull request #591 from SchrodingersGat/bug-fixes
normalize decimal fields
This commit is contained in:
commit
0ef033f800
@ -282,7 +282,6 @@ function loadBomTable(table, options) {
|
|||||||
},
|
},
|
||||||
formatNoMatches: function() { return "No BOM items found"; },
|
formatNoMatches: function() { return "No BOM items found"; },
|
||||||
clickToSelect: true,
|
clickToSelect: true,
|
||||||
showFooter: true,
|
|
||||||
queryParams: function(p) {
|
queryParams: function(p) {
|
||||||
return params;
|
return params;
|
||||||
},
|
},
|
||||||
|
@ -1230,6 +1230,10 @@ class BomItem(models.Model):
|
|||||||
|
|
||||||
pmin, pmax = prange
|
pmin, pmax = prange
|
||||||
|
|
||||||
|
# remove trailing zeros
|
||||||
|
pmin = pmin.normalize()
|
||||||
|
pmax = pmax.normalize()
|
||||||
|
|
||||||
if pmin == pmax:
|
if pmin == pmax:
|
||||||
return str(pmin)
|
return str(pmin)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user