New: Ajout picto statut prospect

Fix: Ajout onglet info
This commit is contained in:
Laurent Destailleur 2006-04-07 21:40:25 +00:00
parent 208c797038
commit a5b9b715ba

View File

@ -28,6 +28,7 @@
*/ */
require_once("./pre.inc.php"); require_once("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/prospect.class.php");
require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
@ -81,14 +82,13 @@ if ($_GET["action"] == 'cstc')
* *
* Mode fiche * Mode fiche
* *
*
*********************************************************************************/ *********************************************************************************/
llxHeader(); llxHeader();
if ($socid > 0) if ($socid > 0)
{ {
$societe = new Societe($db, $socid); $societe = new Prospect($db, $socid);
$result = $societe->fetch($socid); $result = $societe->fetch($socid);
if ($result < 0) if ($result < 0)
{ {
@ -115,13 +115,6 @@ if ($socid > 0)
$hselected=$h; $hselected=$h;
$h++; $h++;
if (file_exists(DOL_DOCUMENT_ROOT.'/sl/'))
{
$head[$h][0] = DOL_URL_ROOT.'/sl/fiche.php?id='.$societe->id;
$head[$h][1] = 'Fiche catalogue';
$h++;
}
if ($societe->fournisseur) if ($societe->fournisseur)
{ {
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id;
@ -149,13 +142,19 @@ if ($socid > 0)
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Notifications"); $head[$h][1] = $langs->trans("Notifications");
$h++;
$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Info");
$h++;
dolibarr_fiche_head($head, $hselected, $societe->nom); dolibarr_fiche_head($head, $hselected, $societe->nom);
/* /*
* *
*/ */
print "<table width=\"100%\">\n"; print "<table width=\"100%\">\n";
print '<tr><td valign="top" width="50%">'; print '<tr><td valign="top" width="50%">';
@ -171,23 +170,19 @@ if ($socid > 0)
if ($societe->rubrique) if ($societe->rubrique)
{ {
print "<tr><td>Rubrique</td><td colspan=\"3\">$societe->rubrique</td></tr>"; print "<tr><td>Rubrique</td><td colspan=\"3\">".$societe->rubrique."</td></tr>";
} }
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td colspan="3">'.$societe->forme_juridique.'</td></tr>'; print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td colspan="3">'.$societe->forme_juridique.'</td></tr>';
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">'.$societe->statut_commercial.'</td>';
print '<td> '; // Status
print '<a href="fiche.php?id='.$societe->id.'&amp;stcomm=-1&amp;action=cstc">'; print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">'.$societe->getLibStatut(4).'</td>';
print img_action(0,-1); print '<td>';
print '</a> <a href="fiche.php?id='.$societe->id.'&amp;stcomm=0&amp;action=cstc">'; if ($societe->stcomm_id != -1) print '<a href="fiche.php?id='.$societe->id.'&amp;stcomm=-1&amp;action=cstc">'.img_action(0,-1).'</a>';
print img_action(0,0); if ($societe->stcomm_id != 0) print '<a href="fiche.php?id='.$societe->id.'&amp;stcomm=0&amp;action=cstc">'.img_action(0,0).'</a>';
print '</a> <a href="fiche.php?id='.$societe->id.'&amp;stcomm=1&amp;action=cstc">'; if ($societe->stcomm_id != 1) print '<a href="fiche.php?id='.$societe->id.'&amp;stcomm=1&amp;action=cstc">'.img_action(0,1).'</a>';
print img_action(0,1); if ($societe->stcomm_id != 2) print '<a href="fiche.php?id='.$societe->id.'&amp;stcomm=2&amp;action=cstc">'.img_action(0,2).'</a>';
print '</a> <a href="fiche.php?id='.$societe->id.'&amp;stcomm=2&amp;action=cstc">'; if ($societe->stcomm_id != 3) print '<a href="fiche.php?id='.$societe->id.'&amp;stcomm=3&amp;action=cstc">'.img_action(0,3).'</a>';
print img_action(0,2);
print '</a> <a href="fiche.php?id='.$societe->id.'&amp;stcomm=3&amp;action=cstc">';
print img_action(0,3);
print '</a>';
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';