Bug 3585. 'Exclude from purchase' function not working in PO.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 15 Jul 2016 08:55:11 +0000 (10:55 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 15 Jul 2016 08:55:11 +0000 (10:55 +0200)
purchasing/includes/ui/po_ui.inc

index 22b6caec1e8536281781e4fd091c68f6950d7934..44f2b3930b86a0bf75166d4e6581928a244850b6 100644 (file)
@@ -389,7 +389,7 @@ function po_item_controls(&$order, &$rowcounter, $line_no=-1)
                if ($order->fixed_asset)
                        stock_purchasable_fa_list_cells(null, 'stock_id', null, false, true, false, true, $order->line_items);
                else
-                       stock_items_list_cells(null, 'stock_id', null, false, true, false, true, array('editable' => 30));
+                       stock_items_list_cells(null, 'stock_id', null, false, true, false, true, array('editable' => 30, 'where'=>array("NOT no_purchase")));
 
                if (list_updated('stock_id')) {
                            $Ajax->activate('price');