mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix: Corrections divers sur gestion actions. On utilise le code type action pour identifier type action plutot que id
This commit is contained in:
@@ -79,7 +79,7 @@ class ActionComm
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
dolibarr_syslog("ActionComm.class::add datep=".strftime("%x %X",$this->datep)." datea=".$this->datea);
|
||||
dolibarr_syslog("ActionComm.class::add type_id=".$this->type_id." datep=".strftime("%x %X",$this->datep)." datea=".$this->datea);
|
||||
|
||||
if (! $this->percent) $this->percent = 0;
|
||||
if (! $this->priority) $this->priority = 0;
|
||||
@@ -121,86 +121,96 @@ class ActionComm
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge l'objet action depuis la base
|
||||
* \param id id de l'action a r<>cup<75>rer
|
||||
*/
|
||||
function fetch($id)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$sql = "SELECT ".$this->db->pdate("a.datea")." as datea,";
|
||||
$sql.= " ".$this->db->pdate("a.datep")." as datep,";
|
||||
$sql.= " ".$this->db->pdate("a.datec")." as datec, tms as datem,";
|
||||
$sql.= " a.note, a.label, a.fk_action as type_id,";
|
||||
$sql.= " c.code, c.libelle, fk_soc, fk_user_author, fk_contact, fk_facture, a.percent, a.fk_commande";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c";
|
||||
$sql.= " WHERE a.id=".$id." AND a.fk_action=c.id";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($this->db->num_rows($resql))
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $id;
|
||||
$this->type_id = $obj->type_id;
|
||||
$this->type_code = $obj->code;
|
||||
$transcode=$langs->trans("Action".$obj->code);
|
||||
$type_libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||
$this->type = $type_libelle;
|
||||
$this->label = $obj->label;
|
||||
$this->date = $obj->datea;
|
||||
$this->datep = $obj->datep;
|
||||
$this->datec = $obj->datec;
|
||||
$this->datem = $obj->datem;
|
||||
$this->note =$obj->note;
|
||||
$this->percent =$obj->percent;
|
||||
$this->societe->id = $obj->fk_soc;
|
||||
$this->author->id = $obj->fk_user_author;
|
||||
$this->contact->id = $obj->fk_contact;
|
||||
$this->fk_facture = $obj->fk_facture;
|
||||
if ($this->fk_facture)
|
||||
{
|
||||
$this->objet_url = img_object($langs->trans("ShowBill"),'bill').' '.'<a href="'. DOL_URL_ROOT . '/compta/facture.php?facid='.$this->fk_facture.'">'.$langs->trans("Bill").'</a>';
|
||||
$this->objet_url_type = 'facture';
|
||||
}
|
||||
$this->fk_propal = $obj->propalrowid;
|
||||
if ($this->fk_propal)
|
||||
{
|
||||
$this->objet_url = img_object($langs->trans("ShowPropal"),'propal').' '.'<a href="'. DOL_URL_ROOT . '/propal/fiche.php?rowid='.$this->fk_propal.'">'.$langs->trans("Propal").'</a>';
|
||||
$this->objet_url_type = 'propal';
|
||||
}
|
||||
$this->fk_commande = $obj->fk_commande;
|
||||
if ($this->fk_commande)
|
||||
{
|
||||
$this->objet_url = img_object($langs->trans("ShowOrder"),'order').' '.'<a href="'. DOL_URL_ROOT . '/commande/fiche.php?id='.$this->fk_commande.'">'.$langs->trans("Order").'</a>';
|
||||
$this->objet_url_type = 'order';
|
||||
}
|
||||
|
||||
}
|
||||
$this->db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($this->db);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* \brief Charge l'objet action depuis la base
|
||||
* \param id id de l'action a r<>cup<75>rer
|
||||
*/
|
||||
function fetch($id)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$sql = "SELECT a.id, ".$this->db->pdate("a.datea")." as datea,";
|
||||
$sql.= " ".$this->db->pdate("a.datep")." as datep,";
|
||||
$sql.= " ".$this->db->pdate("a.datec")." as datec, tms as datem,";
|
||||
$sql.= " a.note, a.label, a.fk_action as type_id,";
|
||||
$sql.= " fk_soc, fk_user_author, fk_contact, fk_facture, a.percent, a.fk_commande,";
|
||||
$sql.= " c.id as type_id, c.code, c.libelle";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c";
|
||||
$sql.= " WHERE a.id=".$id." AND a.fk_action=c.id";
|
||||
|
||||
dolibarr_syslog("ActionComm.class::fetch sql=".$sql);
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($this->db->num_rows($resql))
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->id;
|
||||
$this->type_id = $obj->type_id;
|
||||
$this->type_code = $obj->code;
|
||||
$transcode=$langs->trans("Action".$obj->code);
|
||||
$type_libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||
$this->type = $type_libelle;
|
||||
$this->label = $obj->label;
|
||||
$this->date = $obj->datea;
|
||||
$this->datep = $obj->datep;
|
||||
$this->datec = $obj->datec;
|
||||
$this->datem = $obj->datem;
|
||||
$this->note =$obj->note;
|
||||
$this->percent =$obj->percent;
|
||||
$this->societe->id = $obj->fk_soc;
|
||||
$this->author->id = $obj->fk_user_author;
|
||||
$this->contact->id = $obj->fk_contact;
|
||||
$this->fk_facture = $obj->fk_facture;
|
||||
if ($this->fk_facture)
|
||||
{
|
||||
$this->objet_url = img_object($langs->trans("ShowBill"),'bill').' '.'<a href="'. DOL_URL_ROOT . '/compta/facture.php?facid='.$this->fk_facture.'">'.$langs->trans("Bill").'</a>';
|
||||
$this->objet_url_type = 'facture';
|
||||
}
|
||||
$this->fk_propal = $obj->propalrowid;
|
||||
if ($this->fk_propal)
|
||||
{
|
||||
$this->objet_url = img_object($langs->trans("ShowPropal"),'propal').' '.'<a href="'. DOL_URL_ROOT . '/propal/fiche.php?rowid='.$this->fk_propal.'">'.$langs->trans("Propal").'</a>';
|
||||
$this->objet_url_type = 'propal';
|
||||
}
|
||||
$this->fk_commande = $obj->fk_commande;
|
||||
if ($this->fk_commande)
|
||||
{
|
||||
$this->objet_url = img_object($langs->trans("ShowOrder"),'order').' '.'<a href="'. DOL_URL_ROOT . '/commande/fiche.php?id='.$this->fk_commande.'">'.$langs->trans("Order").'</a>';
|
||||
$this->objet_url_type = 'order';
|
||||
}
|
||||
|
||||
}
|
||||
$this->db->free($resql);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Supprime l'action de la base
|
||||
* \param id id de l'action a effacer
|
||||
* \return int 1 en cas de succ<63>s
|
||||
*/
|
||||
function delete($id)
|
||||
/**
|
||||
* \brief Supprime l'action de la base
|
||||
* \return int <0 si ko, >0 si ok
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE id=$id;";
|
||||
|
||||
if ($this->db->query($sql) )
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
|
||||
$sql.= " WHERE id=".$this->id;
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error()." sql=".$sql;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,15 +59,16 @@ class CActioncomm {
|
||||
|
||||
/**
|
||||
* \brief Charge l'objet type d'action depuis la base
|
||||
* \param id id du type d'action <20> r<>cup<75>rer
|
||||
* \param id id ou code du type d'action <20> r<>cup<75>rer
|
||||
* \return int 1=ok, 0=aucune action, -1=erreur
|
||||
*/
|
||||
function fetch($id)
|
||||
{
|
||||
|
||||
$sql = "SELECT code, type, libelle, active";
|
||||
$sql = "SELECT id, code, type, libelle, active";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
|
||||
$sql.= " WHERE id=$id";
|
||||
if (is_numeric($id)) $sql.= " WHERE id=".$id;
|
||||
else $sql.= " WHERE code='".$id."'";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
@@ -76,7 +77,7 @@ class CActioncomm {
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $id;
|
||||
$this->id = $obj->id;
|
||||
$this->code = $obj->code;
|
||||
$this->type = $obj->type;
|
||||
$this->libelle = $obj->libelle;
|
||||
@@ -101,15 +102,18 @@ class CActioncomm {
|
||||
/*
|
||||
* \brief Renvoi la liste des types d'actions existant
|
||||
* \param active 1 ou 0 pour un filtre sur l'etat actif ou non ('' par defaut = pas de filtre)
|
||||
* \return array tableau des types d'actions actifs si ok, <0 si erreur
|
||||
* \return array Tableau des types d'actions actifs si ok, <0 si erreur
|
||||
*/
|
||||
function liste_array($active='')
|
||||
function liste_array($active='',$idorcode='id')
|
||||
{
|
||||
global $langs,$conf;
|
||||
$langs->load("commercial");
|
||||
|
||||
$ga = array();
|
||||
|
||||
$repid = array();
|
||||
$repcode = array();
|
||||
|
||||
dolibarr_syslog("CActionComm.class::liste_array active=$active idorcode=$idorcode");
|
||||
|
||||
$sql = "SELECT id, code, libelle, module";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
|
||||
if ($active != '')
|
||||
@@ -137,13 +141,15 @@ class CActioncomm {
|
||||
if ($qualified)
|
||||
{
|
||||
$transcode=$langs->trans("Action".$obj->code);
|
||||
$ga[$obj->id] = ($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||
$repid[$obj->id] = ($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||
$repcode[$obj->code] = ($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$this->liste_array=$ga;
|
||||
return $ga;
|
||||
if ($idorcode == 'id') $this->liste_array=$repid;
|
||||
if ($idorcode == 'code') $this->liste_array=$repcode;
|
||||
return $this->liste_array;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -152,47 +158,62 @@ class CActioncomm {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* \brief Renvoie le nom sous forme d'un libell<6C> traduit d'un type d'action
|
||||
* \param id id du type d'action
|
||||
* \return string libelle du type d'action
|
||||
*/
|
||||
function get_nom($id)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if (! isset($this->type_actions[$id]))
|
||||
{
|
||||
// Si valeur non disponible en cache
|
||||
$sql = 'SELECT code, libelle';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm';
|
||||
$sql.= " WHERE id='".$id."'";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($this->db->num_rows($result))
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
/*
|
||||
* \brief Renvoie le nom sous forme d'un libell<6C> traduit d'un type d'action
|
||||
* \param id id ou code du type d'action
|
||||
* \return string libelle du type d'action
|
||||
*/
|
||||
function get_nom($id)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if (! isset($this->type_actions[$id]))
|
||||
{
|
||||
// Si valeur non disponible en cache
|
||||
$sql = 'SELECT id, code, libelle';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm';
|
||||
if (is_numeric($id)) $sql.= " WHERE id=".$id;
|
||||
else $sql.= " WHERE code='".$id."'";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if ($this->db->num_rows($result))
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
||||
$transcode=$langs->trans("Action".$obj->code);
|
||||
$libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||
|
||||
$this->type_actions[$obj->id]=$libelle; // Met en cache
|
||||
return $libelle;
|
||||
}
|
||||
$this->db->free($result);
|
||||
}
|
||||
else {
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
// Si valeur disponible en cache
|
||||
return $this->type_actions[$id];
|
||||
}
|
||||
}
|
||||
|
||||
$transcode=$langs->trans("Action".$obj->code);
|
||||
$libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle);
|
||||
|
||||
$this->type_actions[$id]=$libelle; // Met en cache
|
||||
return $libelle;
|
||||
}
|
||||
$this->db->free($result);
|
||||
}
|
||||
else {
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
// Si valeur disponible en cache
|
||||
return $this->type_actions[$id];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* \brief Renvoie le nom sous forme d'un libell<6C> traduit d'un type d'action
|
||||
* \return string Libelle du type d'action
|
||||
*/
|
||||
function getNom()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$transcode=$langs->trans("Action".$this->code);
|
||||
$libelle=($transcode!="Action".$this->code ? $transcode : $this->get_nom($this->code));
|
||||
return $libelle;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/**
|
||||
\file htdocs/comm/action/fiche.php
|
||||
\ingroup commercial
|
||||
\brief Page de la fiche action commercial
|
||||
\brief Page de la fiche action
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
@@ -78,7 +78,7 @@ if ($_POST["action"] == 'add_action')
|
||||
$contact->fetch($_POST["contactid"]);
|
||||
}
|
||||
|
||||
if (! $_POST["actionid"])
|
||||
if (! $_POST["actioncode"])
|
||||
{
|
||||
$error=1;
|
||||
$_GET["action"] = 'create';
|
||||
@@ -104,18 +104,18 @@ if ($_POST["action"] == 'add_action')
|
||||
$db->begin();
|
||||
|
||||
$cactioncomm = new CActionComm($db);
|
||||
$cactioncomm->fetch($_POST["actionid"]);
|
||||
$cactioncomm->fetch($_POST["actioncode"]);
|
||||
|
||||
// Initialisation objet actioncomm
|
||||
$actioncomm = new ActionComm($db);
|
||||
|
||||
$actioncomm->type_id = $_POST["actionid"];
|
||||
$actioncomm->type_id = $cactioncomm->id;
|
||||
$actioncomm->type_code = $cactioncomm->code;
|
||||
$actioncomm->priority = isset($_POST["priority"])?$_POST["priority"]:0;
|
||||
$actioncomm->label = trim($_POST["label"]);
|
||||
if (! $_POST["label"])
|
||||
{
|
||||
if ($_POST["actionid"] == 5 && $contact->fullname)
|
||||
if ($_POST["actioncode"] == 'AC_RDV' && $contact->fullname)
|
||||
{
|
||||
$actioncomm->label = $langs->trans("TaskRDVWith",$contact->fullname);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ if ($_POST["action"] == 'add_action')
|
||||
$actioncomm->datep = $datep;
|
||||
$actioncomm->date = $datea;
|
||||
if ($_POST["percentage"] < 100 && ! $actioncomm->datep) $actioncomm->datep=$actioncomm->date;
|
||||
if ($actioncomm->type_id == 5)
|
||||
if ($actioncomm->type_code == 'AC_RDV')
|
||||
{
|
||||
// RDV
|
||||
if ($actioncomm->date)
|
||||
@@ -207,10 +207,18 @@ if ($_POST["action"] == 'add_action')
|
||||
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
||||
{
|
||||
$actioncomm = new ActionComm($db);
|
||||
$actioncomm->delete($_GET["id"]);
|
||||
$actioncomm->fetch($_GET["id"]);
|
||||
$result=$actioncomm->delete();
|
||||
|
||||
Header("Location: index.php");
|
||||
exit;
|
||||
if ($result >= 0)
|
||||
{
|
||||
Header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg=$actioncomm->error;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -296,7 +304,7 @@ if ($_GET["action"] == 'create')
|
||||
* Si action de type Rendez-vous
|
||||
*
|
||||
*/
|
||||
if ($_GET["actionid"] == 5)
|
||||
if ($_GET["actioncode"] == 'AC_RDV')
|
||||
{
|
||||
print_titre ($langs->trans("AddActionRendezVous"));
|
||||
print "<br>";
|
||||
@@ -308,7 +316,7 @@ if ($_GET["action"] == 'create')
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Type d'action
|
||||
print '<input type="hidden" name="actionid" value="5">';
|
||||
print '<input type="hidden" name="actioncode" value="AC_RDV">';
|
||||
|
||||
// Societe, contact
|
||||
print '<tr><td nowrap>'.$langs->trans("ActionOnCompany").'</td><td>';
|
||||
@@ -419,10 +427,6 @@ if ($_GET["action"] == 'create')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
print_titre ($langs->trans("AddAnAction"));
|
||||
print "<br>";
|
||||
@@ -433,17 +437,17 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
// Type d'action actifs
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td>';
|
||||
if ($_GET["actionid"])
|
||||
if ($_GET["actioncode"])
|
||||
{
|
||||
print '<input type="hidden" name="actionid" value="'.$_GET["actionid"].'">'."\n";
|
||||
print $caction->get_nom($_GET["actionid"]);
|
||||
print '<input type="hidden" name="actioncode" value="'.$_GET["actioncode"].'">'."\n";
|
||||
print $caction->get_nom($_GET["actioncode"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$arraylist=$caction->liste_array(1);
|
||||
$arraylist=$caction->liste_array(1,'code');
|
||||
$arraylist[0]=' ';
|
||||
sort($arraylist);
|
||||
$html->select_array("actionid", $arraylist, 0);
|
||||
asort($arraylist);
|
||||
$html->select_array("actioncode", $arraylist, 0);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ if ($_GET["action"] == 'builddoc')
|
||||
if ($action=='delete_action')
|
||||
{
|
||||
$actioncomm = new ActionComm($db);
|
||||
$result=$actioncomm->delete($actionid);
|
||||
$actioncomm->fetch($actionid);
|
||||
$result=$actioncomm->delete();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -176,9 +176,9 @@ if ($result)
|
||||
print '<td><a href="contact.php?type='.$type.'&socid='.$obj->idp.'">'.img_object($langs->trans("ShowCompany"),"company").'</a> ';
|
||||
print "<a href=\"".$urlfiche."?socid=$obj->idp\">$obj->nom</a></td>\n";
|
||||
|
||||
print '<td><a href="action/fiche.php?action=create&actionid=4&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->email.'</a> </td>';
|
||||
print '<td><a href="action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->email.'</a> </td>';
|
||||
|
||||
print '<td><a href="action/fiche.php?action=create&actionid=1&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
print '<td><a href="action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@@ -712,20 +712,20 @@ if ($socid > 0)
|
||||
// Lien click to dial
|
||||
if (strlen($obj->phone) && $user->clicktodial_enabled == 1)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$objsoc->id.'&call='.$obj->phone.'">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->idp.'&socid='.$objsoc->id.'&call='.$obj->phone.'">';
|
||||
print img_phone_out("Appel <20>mis") ;
|
||||
}
|
||||
print '</td><td>';
|
||||
print '<a href="action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$objsoc->id.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
print '<td><a href="action/fiche.php?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$objsoc->id.'">'.dolibarr_print_phone($obj->fax).'</a> </td>';
|
||||
print '<td><a href="action/fiche.php?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$objsoc->id.'">'.$obj->email.'</a> </td>';
|
||||
print '<a href="action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->idp.'&socid='.$objsoc->id.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
print '<td><a href="action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->idp.'&socid='.$objsoc->id.'">'.dolibarr_print_phone($obj->fax).'</a> </td>';
|
||||
print '<td><a href="action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->idp.'&socid='.$objsoc->id.'">'.$obj->email.'</a> </td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print "<a href=\"../contact/fiche.php?action=edit&id=$obj->idp\">";
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
print '<td align="center"><a href="action/fiche.php?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$objsoc->id.'">';
|
||||
print '<td align="center"><a href="action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->idp.'&socid='.$objsoc->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
|
||||
|
||||
@@ -285,17 +285,17 @@ if ($socid > 0)
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$obj->poste.' </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone;
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone;
|
||||
|
||||
if (strlen($obj->phone) && $user->clicktodial_enabled == 1)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$societe->id.'&call='.$obj->phone.'">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->idp.'&socid='.$societe->id.'&call='.$obj->phone.'">';
|
||||
print img_phone_out("Appel <20>mis") ;
|
||||
}
|
||||
print '</a></td>';
|
||||
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
|
||||
print '<td align="center">';
|
||||
|
||||
@@ -309,7 +309,7 @@ if ($socid > 0)
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center"><a href="../comm/action/fiche.php?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$societe->id.'">';
|
||||
print '<td align="center"><a href="../comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->idp.'&socid='.$societe->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
|
||||
|
||||
@@ -404,9 +404,9 @@ if ($socid > 0)
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$obj->poste.' </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
|
||||
print '<td align="center">';
|
||||
|
||||
@@ -420,7 +420,7 @@ if ($socid > 0)
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center"><a href="../comm/action/fiche.php?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$societe->id.'">';
|
||||
print '<td align="center"><a href="../comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->idp.'&socid='.$societe->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ if ($result)
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
|
||||
if ($_GET["view"] == 'phone')
|
||||
{
|
||||
|
||||
@@ -340,9 +340,9 @@ if ( $societe->fetch($socid) )
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>$obj->poste </td>";
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user