mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
881931c6b1
@ -65,8 +65,19 @@ def decimal2string(d):
|
|||||||
A string representation of the input number
|
A string representation of the input number
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Ensure that the provided string can actually be converted to a float
|
||||||
|
float(d)
|
||||||
|
except ValueError:
|
||||||
|
# Not a number
|
||||||
|
return str(d)
|
||||||
|
|
||||||
s = str(d)
|
s = str(d)
|
||||||
|
|
||||||
|
# Return entire number if there is no decimal place
|
||||||
|
if '.' not in s:
|
||||||
|
return s
|
||||||
|
|
||||||
return s.rstrip("0").rstrip(".")
|
return s.rstrip("0").rstrip(".")
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -20,3 +20,7 @@ For site administrator and project code documentation, refer to the [developer d
|
|||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
Refer to the [getting started guide](https://inventree.readthedocs.io/en/latest/start.html) for installation and setup instructions.
|
Refer to the [getting started guide](https://inventree.readthedocs.io/en/latest/start.html) for installation and setup instructions.
|
||||||
|
|
||||||
|
### Third Party
|
||||||
|
|
||||||
|
[InvenTree Docker](https://github.com/Zeigren/inventree-docker) - A docker build for InvenTree by [Zeigren](https://github.com/Zeigren)
|
||||||
|
Loading…
Reference in New Issue
Block a user