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;
private function loadOrders() {
var tb : String = untyped __php__('TB_PREF');
- var sql : String = "SELECT * , d.priority AS pp
+ var sql : String = "SELECT * , d.quantity as qty, d.priority AS pp
FROM "+tb+"denorm_order_details_queue d
JOIN "+tb+"sales_order_details od ON (od.id = d.id)
JOIN "+tb+"sales_orders so ON (so.order_no = d.order_id)
var a:Dynamic = php.Lib.objectOfAssociativeArray(row);
var order:Order = a;
order.priority = Date.fromString(a.pp);
+ order.quantity = a.qty;
orderList.push(order);
};