diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index d7c5682e0a9..009326f1f41 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2012-2017 Juanjo Menent * Copyright (C) 2015 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -122,7 +122,7 @@ if (($action == 'create' || $action == 'add') && !$error) } if (isset($_POST['orders_to_invoice'])) { - $orders_id = GETPOST('orders_to_invoice','',1); + $orders_id = GETPOST('orders_to_invoice','',2); $nn = count($orders_id); $ii = 0; diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 1f87cdf5929..f804a1d9ab7 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2012-2017 Juanjo Menent * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Marcos GarcĂ­a * @@ -116,7 +116,7 @@ if (($action == 'create' || $action == 'add') && ! $error) { $_GET['originid'] = $orders_id[0]; } if (isset($_POST['orders_to_invoice'])) { - $orders_id = GETPOST('orders_to_invoice','',1); + $orders_id = GETPOST('orders_to_invoice','',2); $nn = count($orders_id); $ii = 0;