Fix: Merge customer and prospect tab
This commit is contained in:
parent
7260f39d21
commit
e0bbb78f56
@ -386,29 +386,32 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
// Level of prospect
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
print $langs->trans('ProspectLevelShort');
|
||||
print '<td>';
|
||||
if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editlevel')
|
||||
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
|
||||
else
|
||||
print $object->getLibProspLevel();
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="2">'.$object->getLibProspCommStatut(4).'</td>';
|
||||
print '<td>';
|
||||
if ($object->stcomm_id != -1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=-1&action=cstc">'.img_action(0,-1).'</a>';
|
||||
if ($object->stcomm_id != 0) print '<a href="fiche.php?socid='.$object->id.'&stcomm=0&action=cstc">'.img_action(0,0).'</a>';
|
||||
if ($object->stcomm_id != 1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=1&action=cstc">'.img_action(0,1).'</a>';
|
||||
if ($object->stcomm_id != 2) print '<a href="fiche.php?socid='.$object->id.'&stcomm=2&action=cstc">'.img_action(0,2).'</a>';
|
||||
if ($object->stcomm_id != 3) print '<a href="fiche.php?socid='.$object->id.'&stcomm=3&action=cstc">'.img_action(0,3).'</a>';
|
||||
print '</td></tr>';
|
||||
if ($object->client == 2 || $object->client == 3)
|
||||
{
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
print $langs->trans('ProspectLevel');
|
||||
print '<td>';
|
||||
if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editlevel')
|
||||
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
|
||||
else
|
||||
print $object->getLibProspLevel();
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="2">'.$object->getLibProspCommStatut(4).'</td>';
|
||||
print '<td>';
|
||||
if ($object->stcomm_id != -1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=-1&action=cstc">'.img_action(0,-1).'</a>';
|
||||
if ($object->stcomm_id != 0) print '<a href="fiche.php?socid='.$object->id.'&stcomm=0&action=cstc">'.img_action(0,0).'</a>';
|
||||
if ($object->stcomm_id != 1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=1&action=cstc">'.img_action(0,1).'</a>';
|
||||
if ($object->stcomm_id != 2) print '<a href="fiche.php?socid='.$object->id.'&stcomm=2&action=cstc">'.img_action(0,2).'</a>';
|
||||
if ($object->stcomm_id != 3) print '<a href="fiche.php?socid='.$object->id.'&stcomm=3&action=cstc">'.img_action(0,3).'</a>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Sales representative
|
||||
include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
|
||||
|
||||
@ -45,7 +45,9 @@ function societe_prepare_head($object)
|
||||
if ($object->client==1 || $object->client==2 || $object->client==3 || (isset($object->object) && $object->object->client==1) || (isset($object->object) && $object->object->client==3))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Customer");
|
||||
if ($object->client==2 || $object->client==3) $head[$h][1] = $langs->trans("Prospect");
|
||||
if ($object->client==3) $head[$h][1] .= '/';
|
||||
if ($object->client==1 || $object->client==3) $head[$h][1] .= $langs->trans("Customer");
|
||||
$head[$h][2] = 'customer';
|
||||
$h++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user