From: Maxime Bourget Date: Sun, 2 Jun 2013 23:05:39 +0000 (+0100) Subject: Fix 0 qoh bug. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b7c614d7a5355648f861f56ee9181db0416f0bfe;p=order_line_extra.git Fix 0 qoh bug. --- diff --git a/haxe/ItemScheduler.hx b/haxe/ItemScheduler.hx index d01c960..8ac7f6c 100644 --- a/haxe/ItemScheduler.hx +++ b/haxe/ItemScheduler.hx @@ -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;