Fix 0 qoh bug.
authorMaxime Bourget <bmx007@gmail.com>
Sun, 2 Jun 2013 23:05:39 +0000 (00:05 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Sun, 2 Jun 2013 23:05:39 +0000 (00:05 +0100)
haxe/ItemScheduler.hx

index d01c9602be47f960acb9378d5bd4330bcad1bae5..8ac7f6ced256c3605df2655bb810d71a92b59400 100644 (file)
@@ -118,7 +118,7 @@ class ItemScheduler {
                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;
@@ -131,7 +131,7 @@ class ItemScheduler {
 
                }
                // 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;