New: Add hidden option SOCIETE_DISABLE_PROSPECTS

This commit is contained in:
Laurent Destailleur 2011-01-23 18:32:43 +00:00
parent 03064edc59
commit c75a450a8e
2 changed files with 75 additions and 72 deletions

View File

@ -97,10 +97,13 @@ else dol_print_error($db);
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
if ($conf->societe->enabled) if ($conf->societe->enabled)
{
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{ {
$statProducts = "<tr $bc[0]>"; $statProducts = "<tr $bc[0]>";
$statProducts.= '<td><a href="'.DOL_URL_ROOT.'/comm/prospect/prospects.php">'.$langs->trans("Prospects").'</a></td><td align="right">'.round($third['prospect']).'</td>'; $statProducts.= '<td><a href="'.DOL_URL_ROOT.'/comm/prospect/prospects.php">'.$langs->trans("Prospects").'</a></td><td align="right">'.round($third['prospect']).'</td>';
$statProducts.= "</tr>"; $statProducts.= "</tr>";
}
$statProducts.= "<tr $bc[1]>"; $statProducts.= "<tr $bc[1]>";
$statProducts.= '<td><a href="'.DOL_URL_ROOT.'/comm/clients.php">'.$langs->trans("Customers").'</a></td><td align="right">'.round($third['customer']).'</td>'; $statProducts.= '<td><a href="'.DOL_URL_ROOT.'/comm/clients.php">'.$langs->trans("Customers").'</a></td><td align="right">'.round($third['customer']).'</td>';
$statProducts.= "</tr>"; $statProducts.= "</tr>";
@ -174,12 +177,12 @@ if ($result)
{ {
print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$thirdparty_static->id."\">".$langs->trans("Customer")."</a>\n"; print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$thirdparty_static->id."\">".$langs->trans("Customer")."</a>\n";
} }
if ($thirdparty_static->client == 3) print " / "; if ($thirdparty_static->client == 3 && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print " / ";
if ($thirdparty_static->client==2 || $thirdparty_static->client==3) if (($thirdparty_static->client==2 || $thirdparty_static->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{ {
print "<a href=\"".DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$thirdparty_static->id."\">".$langs->trans("Prospect")."</a>\n"; print "<a href=\"".DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$thirdparty_static->id."\">".$langs->trans("Prospect")."</a>\n";
} }
if ($thirdparty_static->fournisseur) if ($conf->fournisseur->enabled && $thirdparty_static->fournisseur)
{ {
if ($thirdparty_static->client) print " / "; if ($thirdparty_static->client) print " / ";
print '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$thirdparty_static->id.'">'.$langs->trans("Supplier").'</a>'; print '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$thirdparty_static->id.'">'.$langs->trans("Supplier").'</a>';

View File

@ -325,12 +325,12 @@ if ($resql)
{ {
print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$obj->rowid."\">".$langs->trans("Customer")."</a>\n"; print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$obj->rowid."\">".$langs->trans("Customer")."</a>\n";
} }
if ($obj->client == 3) print " / "; if ($obj->client == 3 && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print " / ";
if ($obj->client==2 || $obj->client==3) if (($obj->client==2 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{ {
print "<a href=\"".DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$obj->rowid."\">".$langs->trans("Prospect")."</a>\n"; print "<a href=\"".DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$obj->rowid."\">".$langs->trans("Prospect")."</a>\n";
} }
if ($obj->fournisseur) if ($conf->fournisseur->enabled && $obj->fournisseur)
{ {
if ($obj->client) print " / "; if ($obj->client) print " / ";
print '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->rowid.'">'.$langs->trans("Supplier").'</a>'; print '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->rowid.'">'.$langs->trans("Supplier").'</a>';