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
|
// Level of prospect
|
||||||
print '<tr><td nowrap>';
|
if ($object->client == 2 || $object->client == 3)
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
{
|
||||||
print $langs->trans('ProspectLevelShort');
|
print '<tr><td nowrap>';
|
||||||
print '<td>';
|
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||||
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 $langs->trans('ProspectLevel');
|
||||||
print '</tr></table>';
|
print '<td>';
|
||||||
print '</td><td colspan="3">';
|
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>';
|
||||||
if ($action == 'editlevel')
|
print '</tr></table>';
|
||||||
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
|
print '</td><td colspan="3">';
|
||||||
else
|
if ($action == 'editlevel')
|
||||||
print $object->getLibProspLevel();
|
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
|
||||||
print "</td>";
|
else
|
||||||
print '</tr>';
|
print $object->getLibProspLevel();
|
||||||
|
print "</td>";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="2">'.$object->getLibProspCommStatut(4).'</td>';
|
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="2">'.$object->getLibProspCommStatut(4).'</td>';
|
||||||
print '<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 != -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 != 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 != 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 != 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>';
|
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>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Sales representative
|
// Sales representative
|
||||||
include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
|
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))
|
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][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';
|
$head[$h][2] = 'customer';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user