diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index a60ac19d0af..daf366d0739 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2006-2016 Laurent Destailleur + * Copyright (C) 2006-2017 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -145,7 +145,7 @@ if ($action == 'builddoc') // Load barcode class for generating barcode image $classname = "mod".ucfirst($generator); $module = new $classname($db); - if ($generator != 'tcpdfbarcode') + if ($generator != 'tcpdfbarcode') { // May be phpbarcode $template = 'standardlabel'; @@ -374,19 +374,25 @@ jQuery(document).ready(function() { print ' '.$langs->trans("FillBarCodeTypeAndValueManually").'   '; print '
'; -print ' '.$langs->trans("FillBarCodeTypeAndValueFromProduct").'   '; -print '
'; -print '
'; -$form->select_produits(GETPOST('productid'), 'productid', ''); -print '   '; -print '
'; +if (! empty($user->rights->produit->lire) || ! empty($user->rights->service->lire)) +{ + print ' '.$langs->trans("FillBarCodeTypeAndValueFromProduct").'   '; + print '
'; + print '
'; + $form->select_produits(GETPOST('productid'), 'productid', ''); + print '   '; + print '
'; +} -print ' '.$langs->trans("FillBarCodeTypeAndValueFromThirdParty").'   '; -print '
'; -print '
'; -print $form->select_company(GETPOST('socid'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); -print '   '; -print '
'; +if (! empty($user->rights->societe->lire)) +{ + print ' '.$langs->trans("FillBarCodeTypeAndValueFromThirdParty").'   '; + print '
'; + print '
'; + print $form->select_company(GETPOST('socid'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); + print '   '; + print '
'; +} print '
';