for(order in orders()) {
var quantity : Int = Std.parseInt(order.quantity);
- while(0 > left && locationIter.hasNext()) {
+ while(0 >= left && locationIter.hasNext()) {
location = locationIter.next();
var quantityForLocation : Int = location.quantityOnHand(stock_id, null);
if(quantityForLocation == null || quantityForLocation == 0) continue;
}
// display the left locations
- while(0 > left && locationIter.hasNext()) {
+ while(0 >= left && locationIter.hasNext()) {
location = locationIter.next();
var quantityForLocation : Int = location.quantityOnHand(stock_id, null);
if(quantityForLocation == null || quantityForLocation == 0) continue;