} if ($showbarcode) { // Barcode type print '<tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans("BarcodeType"); print '<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') { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formbarcode.class.php'; $formbarcode = new FormBarCode($db); $formbarcode->form_barcode_type($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->barcode_type, 'fk_barcode_type'); } else { $object->fetch_barcode(); print $object->barcode_type_label ? $object->barcode_type_label : ($object->barcode ? '<div class="warning">' . $langs->trans("SetDefaultBarcodeType") . '<div>' : ''); } print '</td></tr>' . "\n"; // Barcode value print '<tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans("BarcodeValue"); print '<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">';
// Status (to buy) print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td>'; print $product->getLibStatut(2,1); print '</td></tr>'; // Barcode type print '<tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print $langs->trans("BarcodeType"); print '<td>'; if (($_GET['action'] != 'editbarcodetype') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&id='.$product->id.'">'.img_edit($langs->trans('SetBarcodeType'),1).'</a></td>'; print '</tr></table>'; print '</td><td colspan="2">'; if ($_GET['action'] == 'editbarcodetype') { $formbarcode->form_barcode_type($_SERVER['PHP_SELF'].'?id='.$product->id,$product->barcode_type,'barcodetype_id'); } else { print $product->barcode_type_label?$product->barcode_type_label:'<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>'; } print '</td></tr>'."\n"; // Barcode value print '<tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print $langs->trans("BarcodeValue"); print '<td>'; if (($_GET['action'] != 'editbarcode') && $user->rights->barcode->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&id='.$product->id.'">'.img_edit($langs->trans('SetBarcode'),1).'</a></td>'; print '</tr></table>'; print '</td><td colspan="2">';