Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix 0.7.8 #141

Merged
merged 8 commits into from
Apr 28, 2016
Prev Previous commit
removed annoying inventory sampling report constraint
  • Loading branch information
jmiranda committed Apr 22, 2016
commit 238af6468d51266d645c595b1861efd72ab1a5de
Original file line number Diff line number Diff line change
Expand Up @@ -3172,18 +3172,15 @@ class InventoryService implements ApplicationContextAware {
Integer maxSize = inventoryItemKeys.size()

if (n > maxSize) {
throw new RuntimeException("You cannot request more items than are available at this location [requested=${n},available=${maxSize}].")
n = maxSize
//throw new RuntimeException("You cannot request more items than are available at this location [requested=${n},available=${maxSize}].")
}

Random random = new Random()
def randomIntegerList = []
(1..n).each {
println "n: " + n
println "maxSize: " + maxSize
def randomIndex = random.nextInt(maxSize)
println "randomIndex: " + randomIndex
def inventoryItem = inventoryItemKeys.get(randomIndex)
println "lotNumber: " + inventoryItem.lotNumber
inventoryItems << inventoryItem
}
return inventoryItems;
Expand Down