From 19e3c1b0894102ca8f3933894d5d23457bc591d2 Mon Sep 17 00:00:00 2001
From: Alexis Algoud <alexis@atm-consulting.fr>
Date: Thu, 17 Mar 2016 16:35:23 +0100
Subject: [PATCH] FIX finished parameters not used

---
 htdocs/product/ajax/products.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php
index 0d4cbda9fc2..c17fdb65aea 100644
--- a/htdocs/product/ajax/products.php
+++ b/htdocs/product/ajax/products.php
@@ -48,6 +48,7 @@ $price_level = GETPOST('price_level', 'int');
 $action = GETPOST('action', 'alpha');
 $id = GETPOST('id', 'int');
 $price_by_qty_rowid = GETPOST('pbq', 'int');
+$finished = GETPOST('finished', 'int');
 
 /*
  * View
@@ -180,7 +181,7 @@ if (! empty($action) && $action == 'fetch' && ! empty($id))
 
 	$form = new Form($db);
 	if (empty($mode) || $mode == 1) {
-		$arrayresult = $form->select_produits_list("", $htmlname, $type, "", $price_level, $searchkey, $status, 2, $outjson, $socid);
+		$arrayresult = $form->select_produits_list("", $htmlname, $type, "", $price_level, $searchkey, $status, $finished, $outjson, $socid);
 	} elseif ($mode == 2) {
 		$arrayresult = $form->select_produits_fournisseurs_list($socid, "", $htmlname, $type, "", $searchkey, $status, $outjson, $socid);
 	}
-- 
GitLab