From 02a4e03162ebda44b5280a0c780d9135ac16e789 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 8 Apr 2005 15:37:29 +0000 Subject: [PATCH] Ajout nombres de produits --- htdocs/fourn/fiche.php | 125 ++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 63 deletions(-) diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 6c304f1a690..0db0e4e45a2 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2003 Éric Seigne * Copyright (C) 2004 Laurent Destailleur * @@ -22,11 +22,11 @@ * */ -/** - \file htdocs/fourn/fiche.php - \ingroup fournisseur, facture - \brief Page de fiche fournisseur - \version $Revision$ +/*! + \file htdocs/fourn/fiche.php + \ingroup fournisseur, facture + \brief Page de fiche fournisseur + \version $Revision$ */ require("./pre.inc.php"); @@ -52,69 +52,67 @@ if ($user->societe_id > 0) * * */ -$societe = new Societe($db); +$societe = new Fournisseur($db); if ( $societe->fetch($socid) ) { - $addons[0][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$socid; $addons[0][1] = $societe->nom; - llxHeader('',$langs->trans("SupplierCard").' : '.$societe->nom, $addons); - /* - * Affichage onglets - */ - $h = 0; + /* + * Affichage onglets + */ + $h = 0; - $head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$socid; - $head[$h][1] = $langs->trans("Company"); + $head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$socid; + $head[$h][1] = $langs->trans("Company"); + $h++; + + if ($societe->client==1) + { + $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$socid; + $head[$h][1] = $langs->trans("Customer"); + $h++; + } + if ($societe->client==2) + { + $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$socid; + $head[$h][1] = $langs->trans("Prospect"); + $h++; + } + if ($societe->fournisseur) + { + $hselected=$h; + $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$socid; + $head[$h][1] = $langs->trans("Supplier"); + $h++; + } + + if ($conf->compta->enabled) { + $langs->load("compta"); + $head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$socid; + $head[$h][1] = $langs->trans("Accountancy"); $h++; + } - if ($societe->client==1) + $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id; + $head[$h][1] = $langs->trans("Note"); + $h++; + + if ($user->societe_id == 0) { - $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$socid; - $head[$h][1] = $langs->trans("Customer"); - $h++; - } - if ($societe->client==2) - { - $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$socid; - $head[$h][1] = $langs->trans("Prospect"); - $h++; - } - if ($societe->fournisseur) - { - $hselected=$h; - $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$socid; - $head[$h][1] = $langs->trans("Supplier"); - $h++; + $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id; + $head[$h][1] = $langs->trans("Documents"); + $h++; } - if ($conf->compta->enabled) { - $langs->load("compta"); - $head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$socid; - $head[$h][1] = $langs->trans("Accountancy"); - $h++; - } - - $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id; - $head[$h][1] = $langs->trans("Note"); - $h++; - - if ($user->societe_id == 0) - { - $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id; - $head[$h][1] = $langs->trans("Documents"); - $h++; - } - - $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id; - $head[$h][1] = $langs->trans("Notifications"); - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id; + $head[$h][1] = $langs->trans("Notifications"); + $h++; - dolibarr_fiche_head($head, $hselected, $societe->nom); + dolibarr_fiche_head($head, $hselected, $societe->nom); /* * @@ -144,15 +142,16 @@ if ( $societe->fetch($socid) ) * Liste des produits * */ - if ($conf->produit->enabled || $conf->service->enabled) { + if ($conf->produit->enabled || $conf->service->enabled) + { $langs->load("products"); print ''; $var=!$var; - print ""; - print ''; - print '
'.$langs->trans("ProductsAndServices").'

'; - } - + print ""; + print ''.$langs->trans("ProductsAndServices").''; + print $societe->NbProduct(); + print '
'; + } /* * @@ -170,14 +169,14 @@ if ( $societe->fetch($socid) ) $num = $db->num_rows(); if ($num > 0) { - print ''; + print '
'; print ""; print ""; } while ($i < $num && $i < 5) { $obj = $db->fetch_object(); - $var=!$var; + $var=!$var; print ""; print '
id\">".$langs->trans("LastOrders",$num)."
'; @@ -335,7 +334,7 @@ if ( $societe->fetch($socid) ) } else { - dolibarr_print_error($db); + dolibarr_print_error($db); } $db->close();