|
@@ -2,7 +2,7 @@
|
|
|
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
|
|
- * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
|
|
+ * Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
|
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
|
|
* Copyright (C) 2006 Auguria SARL <info@auguria.org>
|
|
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
|
@@ -1385,7 +1385,7 @@ else
|
|
|
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
|
|
print $langs->trans("BarcodeType");
|
|
|
print '<td>';
|
|
|
- if (($action != 'editbarcodetype') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
|
|
|
+ if (($action != 'editbarcodetype') && ! empty($user->rights->barcode->creer)) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
|
|
|
print '</tr></table>';
|
|
|
print '</td><td colspan="2">';
|
|
|
if ($action == 'editbarcodetype')
|
|
@@ -1406,7 +1406,7 @@ else
|
|
|
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
|
|
print $langs->trans("BarcodeValue");
|
|
|
print '<td>';
|
|
|
- if (($action != 'editbarcode') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
|
|
|
+ if (($action != 'editbarcode') && ! empty($user->rights->barcode->creer)) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
|
|
|
print '</tr></table>';
|
|
|
print '</td><td colspan="2">';
|
|
|
if ($action == 'editbarcode')
|
|
@@ -1461,7 +1461,7 @@ else
|
|
|
print '</td></tr>';
|
|
|
|
|
|
// Batch number management (to batch)
|
|
|
- if ($conf->productbatch->enabled) {
|
|
|
+ if (! empty($conf->productbatch->enabled)) {
|
|
|
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="2">';
|
|
|
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
|
|
print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch');
|
|
@@ -1552,7 +1552,7 @@ else
|
|
|
}
|
|
|
|
|
|
// Unit
|
|
|
- if($conf->global->PRODUCT_USE_UNITS)
|
|
|
+ if (! empty($conf->global->PRODUCT_USE_UNITS))
|
|
|
{
|
|
|
$unit = $object->getLabelOfUnit();
|
|
|
|