From 0cb74a88951e5ce0644616fa11ac610f08ff7ae3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Aug 2011 23:00:13 +0000 Subject: [PATCH] Qual: Removed not used file --- htdocs/fourn/product/fourn.php | 220 --------------------------------- 1 file changed, 220 deletions(-) delete mode 100644 htdocs/fourn/product/fourn.php diff --git a/htdocs/fourn/product/fourn.php b/htdocs/fourn/product/fourn.php deleted file mode 100644 index e35c41d7650..00000000000 --- a/htdocs/fourn/product/fourn.php +++ /dev/null @@ -1,220 +0,0 @@ - - * - * 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, see . - */ - -/** - * \file htdocs/fourn/product/fourn.php - * \ingroup product - * \brief Page de la fiche produit fournisseur - * \version $Id: fourn.php,v 1.24 2011/07/31 23:57:03 eldy Exp $ - */ - -require("../../main.inc.php"); -require_once DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.product.class.php"; - - -if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden(); - -if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) -{ - - $product = new ProductFournisseur($db); - $result = $product->fetch($_GET["id"], $_GET["id_fourn"]); - - if( $result == 0 ) - { - $product->update($_POST["fourn_ref"], '1', $_POST["price"], $user); - } - - Header('Location :fourn.php?id='.$product->id.'&id_fourn='.$_GET["id_fourn"]); -} - - - -llxHeader("","",$langs->trans("CardProduct0")); - -/* - * Fiche produit - */ -if ($_GET["id"]) -{ - if ($_GET["action"] <> 're-edit') - { - $product = new ProductFournisseur($db); - $result = $product->fetch($_GET["id"], $_GET["id_fourn"]); - $product->get_buyprice($_GET["id_fourn"],1); - } - - if ( $result == 0) - { - - - /* - * En mode visu - */ - - $h=0; - - $head[$h][0] = DOL_URL_ROOT."/fourn/product/fiche.php?id=".$product->id; - $head[$h][1] = $langs->trans("ProductCard"); - $h++; - - $head[$h][0] = DOL_URL_ROOT."/fourn/product/fourn.php?id=".$product->id.'&id_fourn='.$_GET["id_fourn"]; - $head[$h][1] = $langs->trans("SupplierCard"); - $hselected = $h; - $h++; - - dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); - - print ''; - - if ($conf->categorie->enabled) - { - print ''; - print ''; - } - - print ''; - - print ''; - - print ''; - - print ""; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - print ''; - print ''; - - print "
'; - $cat = new Categorie ($db); - $way = $cat->print_primary_way($product->id," > ",'fourn/product/liste.php', 1); - if ($way == "") - { - print "Ce produit n'appartient a aucune categorie"; - } - else - { - print $langs->trans("Category")." : "; - print $way; - } - print '
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("InternalRef").''.$product->ref.''; - $product->show_photos($conf->product->dir_output,1,1,0); - print '
'.$langs->trans("Supplier").''.$product->fourn->getNomUrl(1).'
'.$langs->trans("SupplierRef").''.$product->fourn_ref.'
'.$langs->trans("BuiingPrice").''.price($product->buyprice).'
'.$langs->trans("Description").'
'.nl2br($product->description).' 

\n"; - - print ''; - print ''; - print ''; - print ''; - print ''; - - /* - * Prix - */ - - $sql = "SELECT p.price, p.quantity, tms as date_releve"; - $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as p"; - $sql .=" WHERE p.fk_soc = ".$product->fourn->id; - $sql .= " AND p.fk_product = ".$product->id; - $sql .= " ORDER BY p.quantity ASC"; - $resql= $db->query($sql) ; - if ($resql) - { - $num_fournisseur = $db->num_rows($resql); - $i = 0; - $var=True; - while ($i < $num_fournisseur) - { - $objp = $db->fetch_object($resql); - $var=!$var; - print ""; - print ''; - print ''; - print ''; - - $i++; - } - $db->free($resql); - } - print '
'; - print $langs->trans("Date").''.$langs->trans("Price").''.$langs->trans("Quantity").'
'.dol_print_date($db->datej($objp->date_releve)).''.price($objp->price).''.$objp->quantity.'
'; - - /* - * - * Fiche en mode edition - * - */ - if (($_GET["action"] == 'edit' || $_GET["action"] == 're-edit') && ($user->rights->produit->creer || $user->rights->service->creer)) - { - - $action = 'fourn.php?id='.$product->id.'&id_fourn='.$product->fourn->id; - - print '
'; - print ''; - print ''; - print '
'; - print ''; - print ''; - - print ''; - print ''; - - print '"; - - print ''; - print '
'.$langs->trans("Price").'
'.$langs->trans("SupplierRef").'
'.$langs->trans("Description").''; - print '
 '; - print '
'; - print '
'; - } - - print "\n"; - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - - print "\n
\n"; - - if ($_GET["action"] == '') - { - if ($user->rights->produit->creer || $user->rights->service->creer) - { - print ''.$langs->trans("Modify").''; - } - } - - print "\n
\n"; - - } -} -else -{ - print $langs->trans("ErrorUnknown"); -} -$db->close(); - -llxFooter("Dernière modification $Date: 2011/07/31 23:57:03 $ révision $Revision: 1.24 $"); -?> -