From: Maxime Bourget Date: Sun, 14 Jul 2013 09:41:02 +0000 (+0100) Subject: Fix 0 quantity not displayed X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;p=order_line_extra.git Fix 0 quantity not displayed --- diff --git a/haxe/ItemScheduler.hx b/haxe/ItemScheduler.hx index 7b988f2..e8156c8 100644 --- a/haxe/ItemScheduler.hx +++ b/haxe/ItemScheduler.hx @@ -303,7 +303,7 @@ class ItemScheduler { ,location.name ,location.quantityOnHand(stock_id, null) ,left-location.quantityOnHand(stock_id, null) - ,left + , ""+left+"" // only to force null or 0 to be displayed ,location.code ,location.delivery.getTime() == 0 ? '' : location.delivery.format("%F") ,"" diff --git a/hincludes/lib/ItemScheduler.class.php b/hincludes/lib/ItemScheduler.class.php index 530224e..f7f7371 100644 --- a/hincludes/lib/ItemScheduler.class.php +++ b/hincludes/lib/ItemScheduler.class.php @@ -123,7 +123,7 @@ class ItemScheduler { return FA::query($sql); } public function formatLocation($location, $type, $left) { - $cells = new _hx_array(array($type, $location->name, $location->quantityOnHand($this->stock_id, null), $left - $location->quantityOnHand($this->stock_id, null), $left, $location->code, ((_hx_equal($location->delivery->getTime(), 0)) ? "" : DateTools::format($location->delivery, "%F")), "", "", "")); + $cells = new _hx_array(array($type, $location->name, $location->quantityOnHand($this->stock_id, null), $left - $location->quantityOnHand($this->stock_id, null), "" . _hx_string_rec($left, "") . "", $location->code, ((_hx_equal($location->delivery->getTime(), 0)) ? "" : DateTools::format($location->delivery, "%F")), "", "", "")); $this->printRow($cells, new _hx_array(array("class = \"tableheader location\"", "id = \"loc_" . $location->code . "\""))); } public function quantity_box($row_id, $order, $left) { diff --git a/item_schedule.php b/item_schedule.php index 4449d16..5e893b9 100644 --- a/item_schedule.php +++ b/item_schedule.php @@ -60,9 +60,9 @@ if (list_updated('stock_id') || in_ajax()) $Ajax->activate('item_schedule') ; + stock_costable_items_list_cells(_("Item:"), 'stock_id', $_POST['stock_id']); +// Needs to be done afterward as it can modify the post variable $stock_id = $_POST['stock_id']; - stock_costable_items_list_cells(_("Item:"), 'stock_id', $stock_id); - end_row(); end_table(1);