diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 5f185501444..ec777ce6978 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -69,8 +69,7 @@ if ($_GET["id"]) rmdir(DOL_DOCUMENT_ROOT."/document/produits"); // Création répertoire pour images générées - // TODO A CORRIGER - $conf->produit->dir_images = DOL_DATA_ROOT.'/graph/produits'; + // $conf->produit->dir_images définit dans master.inc.php $dir = $conf->produit->dir_images."/".$product->id; @@ -91,7 +90,6 @@ if ($_GET["id"]) $filenbvente = $dir . "/vente12mois.png"; $filenbpiece = $dir . "/vendu12mois.png"; - $px = new BarGraph(); $mesg = $px->isGraphKo(); if (! $mesg) @@ -115,37 +113,37 @@ if ($_GET["id"]) $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; $head[$h][1] = $langs->trans("Card"); - $h++; + $h++; $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; $head[$h][1] = $langs->trans("Price"); - $h++; - - if($product->type == 0) + $h++; + + 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'); - $h++; - } - + $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; + $head[$h][1] = $langs->trans('Stock'); + $h++; + } + if ($conf->fournisseur->enabled) { - $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; - $head[$h][1] = $langs->trans("Suppliers"); - $h++; + $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; + $head[$h][1] = $langs->trans("Suppliers"); + $h++; } - } - + } + $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; $head[$h][1] = $langs->trans("Statistics"); - $hselected=$h; - $h++; - - - dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); - - + $hselected=$h; + $h++; + + + dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); + + print '
| '.$langs->trans("Ref").' | '; print ''.$product->ref.' | '; @@ -153,21 +151,24 @@ if ($_GET["id"]) print '|
| '.$langs->trans("Label").' | '.$product->libelle.' | '; print '';
// Propals
- if ($conf->propal->enabled) {
- $langs->load("propal");
- print ''.$langs->trans("Proposals").' : '.$product->count_propale($socid);
- print " (Proposé à ".$product->count_propale_client($socid)." clients) "; - } + if ($conf->propal->enabled) + { + $langs->load("propal"); + print ''.$langs->trans("Proposals").' : '.$product->count_propale($socid); + print " (Proposé à ".$product->count_propale_client($socid)." clients) "; + } // Commande - if ($conf->commande->enabled) { - $langs->load("orders"); - print ''.$langs->trans("Orders").' : '.$product->count_facture($socid)." "; - } + if ($conf->commande->enabled) + { + $langs->load("orders"); + print ''.$langs->trans("Orders").' : '.$product->count_facture($socid)." "; + } // Factures - if ($conf->facture->enabled) { - $langs->load("bills"); - print ''.$langs->trans("Bills").' : '.$product->count_facture($socid); - } + if ($conf->facture->enabled) + { + $langs->load("bills"); + print ''.$langs->trans("Bills").' : '.$product->count_facture($socid); + } print ' |
| '.$langs->trans("CurrentPrice").' | '.price($product->price).' |