Ajout résumé stats sur commande fournisseur et factures fournisseur sur fiche référent et fiche stats de produit
This commit is contained in:
parent
e84e29a42a
commit
1d7f6aed5e
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
@ -108,7 +109,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Referers").'</td>';
|
print '<tr><td valign="top" width="25%">'.$langs->trans("Referers").'</td>';
|
||||||
print '<td align="right" width="25%">'.$langs->trans("NbOfCustomers").'</td>';
|
print '<td align="right" width="25%">'.$langs->trans("NbOfThirdParties").'</td>';
|
||||||
print '<td align="right" width="25%">'.$langs->trans("NbOfReferers").'</td>';
|
print '<td align="right" width="25%">'.$langs->trans("NbOfReferers").'</td>';
|
||||||
print '<td align="right" width="25%">'.$langs->trans("TotalQuantity").'</td>';
|
print '<td align="right" width="25%">'.$langs->trans("TotalQuantity").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -130,7 +131,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
// Commandes
|
// Commandes clients
|
||||||
if ($conf->commande->enabled)
|
if ($conf->commande->enabled)
|
||||||
{
|
{
|
||||||
$ret=$product->load_stats_commande($socidp);
|
$ret=$product->load_stats_commande($socidp);
|
||||||
@ -147,6 +148,23 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
// Commandes fournisseurs
|
||||||
|
if ($conf->fournisseur->enabled)
|
||||||
|
{
|
||||||
|
$ret=$product->load_stats_commande_fournisseur($socidp);
|
||||||
|
if ($ret < 0) dolibarr_print_error($db);
|
||||||
|
$langs->load("orders");
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<a href="commande_fournisseur.php?id='.$product->id.'">'.img_object('','order').' '.$langs->trans("SuppliersOrders").'</a>';
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_commande_fournisseur['suppliers'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_commande_fournisseur['nb'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_commande_fournisseur['qty'];
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
// Contrats
|
// Contrats
|
||||||
if ($conf->contrat->enabled)
|
if ($conf->contrat->enabled)
|
||||||
{
|
{
|
||||||
@ -164,7 +182,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
// Factures
|
// Factures clients
|
||||||
if ($conf->facture->enabled)
|
if ($conf->facture->enabled)
|
||||||
{
|
{
|
||||||
$ret=$product->load_stats_facture($socidp);
|
$ret=$product->load_stats_facture($socidp);
|
||||||
@ -181,7 +199,23 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
// Factures fournisseurs
|
||||||
|
if ($conf->fournisseur->enabled)
|
||||||
|
{
|
||||||
|
$ret=$product->load_stats_facture_fournisseur($socidp);
|
||||||
|
if ($ret < 0) dolibarr_print_error($db);
|
||||||
|
$langs->load("bills");
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<a href="facture_fournisseur.php?id='.$product->id.'">'.img_object('','bill').' '.$langs->trans("SuppliersInvoices").'</a>';
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_facture_fournisseur['suppliers'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_facture_fournisseur['nb'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_facture_fournisseur['qty'];
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/dolgraph.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/dolgraph.class.php");
|
||||||
|
|
||||||
|
$langs->load("companies");
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
@ -174,7 +175,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Referers").'</td>';
|
print '<tr><td valign="top" width="25%">'.$langs->trans("Referers").'</td>';
|
||||||
print '<td align="right" width="25%">'.$langs->trans("NbOfCustomers").'</td>';
|
print '<td align="right" width="25%">'.$langs->trans("NbOfThirdParties").'</td>';
|
||||||
print '<td align="right" width="25%">'.$langs->trans("NbOfReferers").'</td>';
|
print '<td align="right" width="25%">'.$langs->trans("NbOfReferers").'</td>';
|
||||||
print '<td align="right" width="25%">'.$langs->trans("TotalQuantity").'</td>';
|
print '<td align="right" width="25%">'.$langs->trans("TotalQuantity").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -196,7 +197,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
// Commandes
|
// Commandes clients
|
||||||
if ($conf->commande->enabled)
|
if ($conf->commande->enabled)
|
||||||
{
|
{
|
||||||
$ret=$product->load_stats_commande($socid);
|
$ret=$product->load_stats_commande($socid);
|
||||||
@ -213,6 +214,23 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
// Commandes fournisseurs
|
||||||
|
if ($conf->fournisseur->enabled)
|
||||||
|
{
|
||||||
|
$ret=$product->load_stats_commande_fournisseur($socidp);
|
||||||
|
if ($ret < 0) dolibarr_print_error($db);
|
||||||
|
$langs->load("orders");
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<a href="commande_fournisseur.php?id='.$product->id.'">'.img_object('','order').' '.$langs->trans("SuppliersOrders").'</a>';
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_commande_fournisseur['suppliers'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_commande_fournisseur['nb'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_commande_fournisseur['qty'];
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
// Contrats
|
// Contrats
|
||||||
if ($conf->contrat->enabled)
|
if ($conf->contrat->enabled)
|
||||||
{
|
{
|
||||||
@ -230,7 +248,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
// Factures
|
// Factures clients
|
||||||
if ($conf->facture->enabled)
|
if ($conf->facture->enabled)
|
||||||
{
|
{
|
||||||
$ret=$product->load_stats_facture($socid);
|
$ret=$product->load_stats_facture($socid);
|
||||||
@ -247,6 +265,23 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
// Factures fournisseurs
|
||||||
|
if ($conf->fournisseur->enabled)
|
||||||
|
{
|
||||||
|
$ret=$product->load_stats_facture_fournisseur($socidp);
|
||||||
|
if ($ret < 0) dolibarr_print_error($db);
|
||||||
|
$langs->load("bills");
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<a href="facture_fournisseur.php?id='.$product->id.'">'.img_object('','bill').' '.$langs->trans("SuppliersInvoices").'</a>';
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_facture_fournisseur['suppliers'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_facture_fournisseur['nb'];
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $product->stats_facture_fournisseur['qty'];
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user