mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Fixes
This commit is contained in:
parent
8c92c2c2a1
commit
c6331255de
@ -758,7 +758,7 @@ class BomItem(models.Model):
|
|||||||
ovg = int(overage)
|
ovg = int(overage)
|
||||||
|
|
||||||
if ovg < 0:
|
if ovg < 0:
|
||||||
ovg = 0;
|
ovg = 0
|
||||||
|
|
||||||
return ovg
|
return ovg
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@ -770,12 +770,12 @@ class BomItem(models.Model):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
percent = float(overage) / 100.0
|
percent = float(overage) / 100.0
|
||||||
if percetage > 1:
|
if percent > 1:
|
||||||
percentage = 1
|
percent = 1
|
||||||
if percentage < 0:
|
if percent < 0:
|
||||||
percentage = 0
|
percent = 0
|
||||||
|
|
||||||
return int(percentage * quantity)
|
return int(percent * quantity)
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user