* Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Regis Houssin * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ */ /** \file htdocs/product/barcode.php \ingroup product \brief Page du code barre \version $Revision$ */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); $langs->load("products"); $langs->load("bills"); $user->getrights('barcode'); if (!$user->rights->barcode->lire) accessforbidden(); /* * Affiche historique prix */ llxHeader("","",$langs->trans("BarCode")); $html = new Form($db); $product = new Product($db); if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); if ($_GET["id"]) $result = $product->fetch($_GET["id"]); $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); dolibarr_fiche_head($head, 'barcode', $titre); print ''; // Reference print ''; print ''; print ''; // Libelle print ''; print ''; // Prix print ''; // Statut print ''; print "
'.$langs->trans("Ref").''; print $html->showrefnav($product,'ref'); print '
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("SellingPrice").''; if ($product->price_base_type == 'TTC') { print price($product->price_ttc).' '.$langs->trans($product->price_base_type); } else { print price($product->price).' '.$langs->trans($product->price_base_type); } print '
'.$langs->trans("Status").''; print $product->getLibStatut(2); print '
\n"; print "\n"; /* * Affiche code barre */ $db->close(); llxFooter('$Date$ - $Revision$'); ?>