This commit is contained in:
Rodolphe Quiedeville 2005-02-17 13:01:41 +00:00
parent be8f80c2e0
commit 16118f1b95

View File

@ -69,8 +69,7 @@ if ($_GET["id"])
rmdir(DOL_DOCUMENT_ROOT."/document/produits"); rmdir(DOL_DOCUMENT_ROOT."/document/produits");
// Création répertoire pour images générées // Création répertoire pour images générées
// TODO A CORRIGER // $conf->produit->dir_images définit dans master.inc.php
$conf->produit->dir_images = DOL_DATA_ROOT.'/graph/produits';
$dir = $conf->produit->dir_images."/".$product->id; $dir = $conf->produit->dir_images."/".$product->id;
@ -91,7 +90,6 @@ if ($_GET["id"])
$filenbvente = $dir . "/vente12mois.png"; $filenbvente = $dir . "/vente12mois.png";
$filenbpiece = $dir . "/vendu12mois.png"; $filenbpiece = $dir . "/vendu12mois.png";
$px = new BarGraph(); $px = new BarGraph();
$mesg = $px->isGraphKo(); $mesg = $px->isGraphKo();
if (! $mesg) if (! $mesg)
@ -115,35 +113,35 @@ if ($_GET["id"])
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("Card"); $head[$h][1] = $langs->trans("Card");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id;
$head[$h][1] = $langs->trans("Price"); $head[$h][1] = $langs->trans("Price");
$h++; $h++;
if($product->type == 0) if($product->type == 0)
{
if ($conf->stock->enabled)
{ {
if ($conf->stock->enabled) $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
{ $head[$h][1] = $langs->trans('Stock');
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; $h++;
$head[$h][1] = $langs->trans('Stock'); }
$h++;
}
if ($conf->fournisseur->enabled) { if ($conf->fournisseur->enabled) {
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id;
$head[$h][1] = $langs->trans("Suppliers"); $head[$h][1] = $langs->trans("Suppliers");
$h++; $h++;
} }
} }
$head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("Statistics"); $head[$h][1] = $langs->trans("Statistics");
$hselected=$h; $hselected=$h;
$h++; $h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);
print '<table class="border" width="100%"><tr>'; print '<table class="border" width="100%"><tr>';
@ -153,21 +151,24 @@ if ($_GET["id"])
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
print '<td valign="top" rowspan="2">'; print '<td valign="top" rowspan="2">';
// Propals // Propals
if ($conf->propal->enabled) { if ($conf->propal->enabled)
$langs->load("propal"); {
print '<a href="propal.php?id='.$product->id.'">'.$langs->trans("Proposals").'</a> : '.$product->count_propale($socid); $langs->load("propal");
print " (Proposé à ".$product->count_propale_client($socid)." clients)<br>"; print '<a href="propal.php?id='.$product->id.'">'.$langs->trans("Proposals").'</a> : '.$product->count_propale($socid);
} print " (Proposé à ".$product->count_propale_client($socid)." clients)<br>";
}
// Commande // Commande
if ($conf->commande->enabled) { if ($conf->commande->enabled)
$langs->load("orders"); {
print '<a href="commande.php?id='.$product->id.'">'.$langs->trans("Orders").'</a> : '.$product->count_facture($socid)."<br>"; $langs->load("orders");
} print '<a href="commande.php?id='.$product->id.'">'.$langs->trans("Orders").'</a> : '.$product->count_facture($socid)."<br>";
}
// Factures // Factures
if ($conf->facture->enabled) { if ($conf->facture->enabled)
$langs->load("bills"); {
print '<a href="facture.php?id='.$product->id.'">'.$langs->trans("Bills").'</a> : '.$product->count_facture($socid); $langs->load("bills");
} print '<a href="facture.php?id='.$product->id.'">'.$langs->trans("Bills").'</a> : '.$product->count_facture($socid);
}
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'.$langs->trans("CurrentPrice").'</td><td>'.price($product->price).'</td></tr>'; print '<tr><td>'.$langs->trans("CurrentPrice").'</td><td>'.price($product->price).'</td></tr>';
print "</table>"; print "</table>";
@ -236,8 +237,6 @@ if ($_GET["id"])
print '</table><br>'; print '</table><br>';
} }
} }
else else