Qual: Removed deprecated method
This commit is contained in:
parent
0e83ec1359
commit
426317a355
@ -335,9 +335,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -332,9 +332,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -327,9 +327,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -279,7 +279,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '<td colspan="1">';
|
print '<td colspan="1">';
|
||||||
//$contactAlreadySelected = $contrat->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
//$contactAlreadySelected = $contrat->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
||||||
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', 'contactid', 0, $contactAlreadySelected);
|
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
|
||||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -331,9 +331,8 @@ if ($id > 0)
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -266,7 +266,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '<td colspan="1">';
|
print '<td colspan="1">';
|
||||||
//$contactAlreadySelected = $fichinter->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
//$contactAlreadySelected = $fichinter->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
|
||||||
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', 'contactid', 0, $contactAlreadySelected);
|
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
|
||||||
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -317,9 +317,8 @@ if ($id > 0)
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -200,6 +200,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
// TODO All contact.php pages use this huge part of code. Use a function instead.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lignes de contacts
|
* Lignes de contacts
|
||||||
*/
|
*/
|
||||||
@ -207,12 +209,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Ajouter une ligne de contact
|
* Ajouter une ligne de contact
|
||||||
* Non affich<EFBFBD> en mode modification de ligne
|
* Non affiche en mode modification de ligne
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] != 'editline' && $user->rights->fournisseur->facture->creer)
|
if ($_GET["action"] != 'editline' && $user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
// TODO All contacts page should use same code
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Source").'</td>';
|
print '<td>'.$langs->trans("Source").'</td>';
|
||||||
print '<td>'.$langs->trans("Company").'</td>';
|
print '<td>'.$langs->trans("Company").'</td>';
|
||||||
@ -324,9 +324,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -316,9 +316,8 @@ if ($id > 0)
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -341,9 +341,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -344,9 +344,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
if ($tab[$i]['socid'] > 0)
|
if ($tab[$i]['socid'] > 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
|
$companystatic->fetch($tab[$i]['socid']);
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
|
print $companystatic->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
if ($tab[$i]['socid'] < 0)
|
if ($tab[$i]['socid'] < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1331,33 +1331,6 @@ class Societe extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Renvoie le nom d'une societe a partir d'un id
|
|
||||||
* \param id id company we search for name
|
|
||||||
* \return string Third party name
|
|
||||||
*/
|
|
||||||
function get_nom($id)
|
|
||||||
{
|
|
||||||
|
|
||||||
$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe WHERE rowid='".$id."';";
|
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
|
||||||
|
|
||||||
if ($result)
|
|
||||||
{
|
|
||||||
if ($this->db->num_rows())
|
|
||||||
{
|
|
||||||
$obj = $this->db->fetch_object($result);
|
|
||||||
return $obj->nom;
|
|
||||||
}
|
|
||||||
$this->db->free();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dol_print_error($this->db);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return full address of a third party (TODO in format of its country)
|
* \brief Return full address of a third party (TODO in format of its country)
|
||||||
* \return string Full address string
|
* \return string Full address string
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user