Fix: [ bug #367 ] "Multi-tiers" fonctionality inverted in project
contacts.
This commit is contained in:
parent
80de63d5a3
commit
afb79d5d2c
@ -506,7 +506,7 @@ class FormCompany
|
|||||||
* @param string $var_id Name of id field
|
* @param string $var_id Name of id field
|
||||||
* @param string $selected Pre-selected third party
|
* @param string $selected Pre-selected third party
|
||||||
* @param string $htmlname Name of HTML form
|
* @param string $htmlname Name of HTML form
|
||||||
* @param string $limitto Disable answers that are not id in this array list
|
* @param array $limitto Disable answers that are not id in this array list
|
||||||
* @param int $forceid This is to force antoher object id than object->id
|
* @param int $forceid This is to force antoher object id than object->id
|
||||||
* @return void
|
* @return void
|
||||||
* TODO obsolete ?
|
* TODO obsolete ?
|
||||||
|
|||||||
@ -248,8 +248,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Line to add external contact. Only if project is linked to a third party.
|
// Line to add external contact. Only if project is linked to a third party.
|
||||||
if ($project->societe->id)
|
//if ($project->societe->id)
|
||||||
{
|
//{
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="addcontact">';
|
print '<input type="hidden" name="action" value="addcontact">';
|
||||||
@ -265,12 +265,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '<td colspan="1">';
|
print '<td colspan="1">';
|
||||||
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id;
|
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id;
|
||||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany');
|
$selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany', (empty($project->societe->id)?array():array($project->societe->id)));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td colspan="1">';
|
print '<td colspan="1">';
|
||||||
$nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
|
$nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
|
||||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
//if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$formcompany->selectTypeContact($project, '', 'type','external','rowid');
|
$formcompany->selectTypeContact($project, '', 'type','external','rowid');
|
||||||
@ -287,7 +287,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
//}
|
||||||
|
|
||||||
print '<tr><td colspan="6"> </td></tr>';
|
print '<tr><td colspan="6"> </td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -416,7 +416,9 @@ else
|
|||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||||
print $form->select_company($project->societe->id,'socid','',1,1);
|
$text=$form->select_company($project->societe->id,'socid','',1,1);
|
||||||
|
$texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");
|
||||||
|
print $form->textwithtooltip($text.' '.img_help(),$texthelp,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user