Suppression du champ "code" de la table llx_user
This commit is contained in:
parent
2678673f3f
commit
18e51b52e3
@ -73,7 +73,7 @@ print_fiche_titre($langs->trans("Bookmarks"));
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
$sql = "SELECT b.fk_soc as idp, ".$db->pdate("b.dateb")." as dateb, b.rowid as bid, b.fk_user, b.url, b.target, b.title, b.favicon,";
|
||||
$sql.= " u.name, u.firstname, u.code";
|
||||
$sql.= " u.login, u.name, u.firstname";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE b.fk_user=u.rowid";
|
||||
if (! $user->admin) $sql.= " AND (b.fk_user = ".$user->id." OR b.fk_user is NULL)";
|
||||
@ -151,7 +151,7 @@ if ($resql)
|
||||
print "</td>\n";
|
||||
|
||||
// Auteur
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code."</a></td>\n";
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login."</a></td>\n";
|
||||
|
||||
// Date creation
|
||||
print '<td align="center">'.dolibarr_print_date($obj->dateb) ."</td>";
|
||||
|
||||
@ -65,7 +65,7 @@ llxHeader();
|
||||
$sql = "SELECT s.nom as societe, s.idp as socid, s.client,";
|
||||
$sql.= " a.id,".$db->pdate("a.datep")." as dp, a.fk_contact, a.note, a.label, a.percent as percent,";
|
||||
$sql.= " c.code as acode, c.libelle,";
|
||||
$sql.= " u.code, u.rowid as userid";
|
||||
$sql.= " u.login, u.rowid as userid";
|
||||
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."user as u";
|
||||
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -122,7 +122,7 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"a.fk_contact",$param,"","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.code",$param,"","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.login",$param,"","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield);
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
@ -201,7 +201,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
|
||||
// Auteur
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->userid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->userid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
// Status/Percent
|
||||
print '<td align="right">'.$actionstatic->LibStatut($obj->percent,5).'</td>';
|
||||
|
||||
@ -149,7 +149,7 @@ class CommActionRapport
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$y=$pdf->GetY()+1;
|
||||
|
||||
$sql = "SELECT s.nom as societe, s.idp as socid, s.client, a.id,".$this->db->pdate("a.datea")." as da, a.datea, c.libelle, u.code, a.fk_contact, a.note, a.percent as percent";
|
||||
$sql = "SELECT s.nom as societe, s.idp as socid, s.client, a.id,".$this->db->pdate("a.datea")." as da, a.datea, c.libelle, u.login, a.fk_contact, a.note, a.percent as percent";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE a.fk_soc = s.idp AND c.id=a.fk_action AND a.fk_user_author = u.rowid";
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ if ($_GET["action"] == 'delete')
|
||||
|
||||
print_fiche_titre($langs->trans("Bookmarks"));
|
||||
|
||||
$sql = "SELECT s.idp, s.nom, ".$db->pdate("b.dateb")." as dateb, b.rowid as bid, b.fk_user, b.url, b.target, u.name, u.firstname, u.code";
|
||||
$sql = "SELECT s.idp, s.nom, ".$db->pdate("b.dateb")." as dateb, b.rowid as bid, b.fk_user, b.url, b.target, u.name, u.firstname";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE b.fk_soc = s.idp AND b.fk_user=u.rowid";
|
||||
if (! $user->admin) $sql.= " AND b.fk_user = ".$user->id;
|
||||
|
||||
@ -760,7 +760,7 @@ if ($socid > 0)
|
||||
$sql.= " ".$db->pdate("a.datep")." as dp,";
|
||||
$sql.= " ".$db->pdate("a.datea")." as da,";
|
||||
$sql.= " a.percent,";
|
||||
$sql.= " c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql.= " c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.login, u.rowid ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql.= " WHERE a.fk_soc = ".$objsoc->id;
|
||||
$sql.= " AND u.rowid = a.fk_user_author";
|
||||
@ -844,7 +844,7 @@ if ($socid > 0)
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
print '<td width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'</a></td>';
|
||||
print '<td width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a></td>';
|
||||
|
||||
// Statut
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
@ -883,7 +883,7 @@ if ($socid > 0)
|
||||
$sql.= " a.percent,";
|
||||
$sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,";
|
||||
$sql.= " c.code as acode, c.libelle,";
|
||||
$sql.= " u.code, u.rowid";
|
||||
$sql.= " u.login, u.rowid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql.= " WHERE a.fk_soc = ".$objsoc->id;
|
||||
$sql.= " AND u.rowid = a.fk_user_author";
|
||||
@ -977,7 +977,7 @@ if ($socid > 0)
|
||||
}
|
||||
|
||||
// Auteur
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
// Statut
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
|
||||
@ -328,7 +328,7 @@ if ($socid > 0)
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre"><td colspan="9"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right"> </td></tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, c.code as acode, c.libelle, u.login, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql .= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql .= " AND u.rowid = a.fk_user_author";
|
||||
@ -410,7 +410,7 @@ if ($socid > 0)
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
print '<td width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'</a></td>';
|
||||
print '<td width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@ -427,7 +427,7 @@ if ($socid > 0)
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre"><td colspan="9"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsDone").'</a></td></tr>';
|
||||
|
||||
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.code, u.rowid ";
|
||||
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.login, u.rowid ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql .= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql .= " AND u.rowid = a.fk_user_author";
|
||||
@ -499,7 +499,7 @@ if ($socid > 0)
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ if ($_socid > 0)
|
||||
* Liste de l'historique des avoirs
|
||||
*/
|
||||
$sql = "SELECT rc.rowid,rc.remise_client,rc.note,".$db->pdate("rc.datec")." as dc,";
|
||||
$sql.= " u.rowid as user_id, u.code";
|
||||
$sql.= " u.login, u.rowid as user_id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql.= " AND u.rowid = rc.fk_user_author";
|
||||
@ -162,7 +162,7 @@ if ($_socid > 0)
|
||||
print '<td>'.dolibarr_print_date($obj->dc,"%d %B %Y %H:%M").'</td>';
|
||||
print '<td align="center">'.$obj->remise_client.' %</td>';
|
||||
print '<td align="left">'.$obj->note.'</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ if ($_socid > 0)
|
||||
* Liste remises fixes restant en cours
|
||||
*/
|
||||
$sql = "SELECT rc.rowid, rc.amount_ht,".$db->pdate("rc.datec")." as dc, rc.description,";
|
||||
$sql.= " u.code, u.rowid as user_id";
|
||||
$sql.= " u.login, u.rowid as user_id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql.= " AND u.rowid = rc.fk_user AND rc.fk_facture IS NULL";
|
||||
@ -205,7 +205,7 @@ if ($_socid > 0)
|
||||
print '<td>'.dolibarr_print_date($obj->dc).'</td>';
|
||||
print '<td>'.$obj->description.'</td>';
|
||||
print '<td align="right">'.price($obj->amount_ht).'</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</td>';
|
||||
if ($obj->user_id == $user->id) print '<td><a href="'.$_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&action=remove&remid='.$obj->rowid.'">'.img_delete($langs->trans("RemoveDiscount")).'</td>';
|
||||
else print '<td> </td>';
|
||||
print '</tr>';
|
||||
@ -225,7 +225,7 @@ if ($_socid > 0)
|
||||
* Liste ristournes appliquées
|
||||
*/
|
||||
$sql = "SELECT rc.rowid, rc.amount_ht,".$db->pdate("rc.datec")." as dc, rc.description, rc.fk_facture,";
|
||||
$sql.= " u.code, u.rowid as user_id,";
|
||||
$sql.= " u.login, u.rowid as user_id,";
|
||||
$sql.= " f.rowid, f.facnumber";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."user as u";
|
||||
@ -262,7 +262,7 @@ if ($_socid > 0)
|
||||
print '<td align="left"><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.'</a></td>';
|
||||
print '<td>'.$obj->description.'</td>';
|
||||
print '<td align="right">'.price($obj->amount_ht).'</td>';
|
||||
print '<td align="center">'.$obj->code.'</td>';
|
||||
print '<td align="center">'.$obj->login.'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -171,7 +171,7 @@ if ($_GET["facid"] > 0)
|
||||
$sql = "SELECT pfd.rowid, pfd.traite,".$db->pdate("pfd.date_demande")." as date_demande";
|
||||
$sql .= " ,".$db->pdate("pfd.date_traite")." as date_traite";
|
||||
$sql .= " , pfd.amount";
|
||||
$sql .= " , u.rowid as user_id, u.name, u.firstname, u.code";
|
||||
$sql .= " , u.rowid as user_id, u.name, u.firstname, u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE fk_facture = ".$fac->id;
|
||||
@ -227,7 +227,7 @@ if ($_GET["facid"] > 0)
|
||||
print '<td align="center">En attente de traitement</td>';
|
||||
print '<td align="center">'.price($obj->amount).'</td>';
|
||||
print '<td align="center">-</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
print '<td> </td>';
|
||||
print '<td>';
|
||||
print '<a href="prelevement.php?facid='.$fac->id.'&action=delete&did='.$obj->rowid.'">';
|
||||
@ -247,7 +247,7 @@ if ($_GET["facid"] > 0)
|
||||
$sql = "SELECT pfd.rowid, pfd.traite,".$db->pdate("pfd.date_demande")." as date_demande";
|
||||
$sql .= " ,".$db->pdate("pfd.date_traite")." as date_traite";
|
||||
$sql .= " , pfd.fk_prelevement_bons, pfd.amount";
|
||||
$sql .= " , u.rowid as user_id, u.name, u.firstname, u.code";
|
||||
$sql .= " , u.rowid as user_id, u.name, u.firstname, u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE fk_facture = ".$fac->id;
|
||||
@ -278,7 +278,7 @@ if ($_GET["facid"] > 0)
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$obj->fk_prelevement_bons;
|
||||
print '">'.$obj->fk_prelevement_bons."</a></td>\n";
|
||||
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
|
||||
@ -456,7 +456,7 @@ if ($socid > 0)
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,";
|
||||
$sql.= " c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql.= " c.code as acode, c.libelle, u.login, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql.= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql.= " AND u.rowid = a.fk_user_author";
|
||||
@ -540,7 +540,7 @@ if ($socid > 0)
|
||||
}
|
||||
|
||||
// Auteur
|
||||
print '<td width="50" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'</a></td>';
|
||||
print '<td width="50" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a></td>';
|
||||
|
||||
// Statut
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
@ -568,7 +568,7 @@ if ($socid > 0)
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,";
|
||||
$sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,";
|
||||
$sql.= " c.code as acode, c.libelle,";
|
||||
$sql.= " u.code, u.rowid";
|
||||
$sql.= " u.login, u.rowid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql.= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql.= " AND u.rowid = a.fk_user_author";
|
||||
@ -654,7 +654,7 @@ if ($socid > 0)
|
||||
}
|
||||
|
||||
// Auteur
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
// Statut
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
|
||||
@ -93,7 +93,7 @@ if ($socid > 0)
|
||||
|
||||
$sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df,";
|
||||
$sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,";
|
||||
$sql.= " u.code, u.rowid as userid";
|
||||
$sql.= " u.login, u.rowid as userid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE f.fk_soc = s.idp AND s.idp = ".$societe->id;
|
||||
$sql.= " AND f.fk_user_valid = u.rowid";
|
||||
@ -150,13 +150,13 @@ if ($socid > 0)
|
||||
print '<td align="right">'.price($solde)."</td>\n";
|
||||
|
||||
// Auteur
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objf->userid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$objf->code.'</a></td>';
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objf->userid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$objf->login.'</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
// Paiements
|
||||
$sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, pf.amount, p.statut,";
|
||||
$sql.= " p.fk_user_creat, u.code, u.rowid as userid";
|
||||
$sql.= " p.fk_user_creat, u.login, u.rowid as userid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."paiement as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON p.fk_user_creat = u.rowid";
|
||||
@ -185,7 +185,7 @@ if ($socid > 0)
|
||||
print '<td align="right">'.price($solde)."</td>\n";
|
||||
|
||||
// Auteur
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objp->userid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$objp->code.'</a></td>';
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objp->userid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$objp->login.'</a></td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -620,7 +620,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
||||
// Recherche histo sur actioncomm
|
||||
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, a.note, a.percent as percent,";
|
||||
$sql.= " c.code as acode, c.libelle,";
|
||||
$sql.= " u.rowid as user_id, u.code";
|
||||
$sql.= " u.rowid as user_id, u.login";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql.= " WHERE fk_contact = ".$contact->id;
|
||||
$sql.= " AND u.rowid = a.fk_user_author";
|
||||
@ -638,7 +638,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
||||
$obj = $db->fetch_object($resql);
|
||||
$histo[$numaction]=array('type'=>'action','id'=>$obj->id,'date'=>$obj->da,'note'=>$obj->note,'percent'=>$obj->percent,
|
||||
'acode'=>$obj->acode,'libelle'=>$obj->libelle,
|
||||
'userid'=>$obj->user_id,'code'=>$obj->code);
|
||||
'userid'=>$obj->user_id,'login'=>$obj->login);
|
||||
$numaction++;
|
||||
$i++;
|
||||
}
|
||||
@ -651,7 +651,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
||||
// Recherche histo sur mailing
|
||||
$sql = "SELECT m.rowid as id, ".$db->pdate("mc.date_envoi")." as da, m.titre as note, '100' as percent,";
|
||||
$sql.= " 'AC_EMAILING' as acode,";
|
||||
$sql.= " u.rowid as user_id, u.code";
|
||||
$sql.= " u.rowid as user_id, u.login";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql.= " WHERE mc.email = '".addslashes($contact->email)."'";
|
||||
$sql.= " AND mc.statut = 1";
|
||||
@ -670,7 +670,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
||||
$obj = $db->fetch_object($resql);
|
||||
$histo[$numaction]=array('type'=>'mailing','id'=>$obj->id,'date'=>$obj->da,'note'=>$obj->note,'percent'=>$obj->percent,
|
||||
'acode'=>$obj->acode,'libelle'=>$obj->libelle,
|
||||
'userid'=>$obj->user_id,'code'=>$obj->code);
|
||||
'userid'=>$obj->user_id,'login'=>$obj->login);
|
||||
$numaction++;
|
||||
$i++;
|
||||
}
|
||||
@ -724,9 +724,9 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
||||
|
||||
// Author
|
||||
print '<td>';
|
||||
if ($histo[$key]['code'])
|
||||
if ($histo[$key]['login'])
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$histo[$key]['userid'].'">'.img_object($langs->trans("ShowUser"),'user').' '.$histo[$key]['code'].'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$histo[$key]['userid'].'">'.img_object($langs->trans("ShowUser"),'user').' '.$histo[$key]['login'].'</a>';
|
||||
}
|
||||
else print " ";
|
||||
print "</td>";
|
||||
|
||||
@ -129,7 +129,7 @@ if ($_GET["id"] > 0)
|
||||
print '<td align="center">'.$langs->trans("Author").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT l.fk_statut, ".$db->pdate("l.datelog") ."as dl, u.rowid, u.code, u.firstname, u.name";
|
||||
$sql = "SELECT l.fk_statut, ".$db->pdate("l.datelog") ."as dl, u.rowid, u.login, u.firstname, u.name";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_log as l ";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql .= " WHERE l.fk_commande = ".$commande->id." AND u.rowid = l.fk_user";
|
||||
@ -156,7 +156,7 @@ if ($_GET["id"] > 0)
|
||||
|
||||
// User
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
|
||||
print img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -367,7 +367,7 @@ if ( $societe->fetch($socid) )
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre"><td colspan="10"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$societe->id.'&status=todo">'.$langs->trans("ActionsToDoShort").'</a></td><td align="right"> </td></tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, c.code as acode, c.libelle, u.login, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql .= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql .= " AND u.rowid = a.fk_user_author";
|
||||
@ -450,7 +450,7 @@ if ( $societe->fetch($socid) )
|
||||
}
|
||||
|
||||
// Auteur
|
||||
print '<td width="50" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'</a></td>';
|
||||
print '<td width="50" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@ -470,7 +470,7 @@ if ( $societe->fetch($socid) )
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da,";
|
||||
$sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,";
|
||||
$sql.= " c.code as acode, c.libelle,";
|
||||
$sql.= " u.code, u.rowid";
|
||||
$sql.= " u.login, u.rowid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql.= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql.= " AND u.rowid = a.fk_user_author";
|
||||
@ -558,7 +558,7 @@ if ( $societe->fetch($socid) )
|
||||
}
|
||||
|
||||
// Auteur
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
|
||||
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -147,9 +147,9 @@ class modUser extends DolibarrModules
|
||||
$r++;
|
||||
$this->export_code[$r]=$this->id.'_'.$r;
|
||||
$this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs';
|
||||
$this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.code'=>"Code",'u.login'=>"Login",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Tel','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion');
|
||||
$this->export_entities_array[$r]=array('u.rowid'=>"user",'u.code'=>"user",'u.login'=>"user",'u.name'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.fk_socpeople'=>"contact",'u.fk_societe'=>"company",'u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user');
|
||||
$this->export_alias_array[$r]=array('u.rowid'=>"rowid",'u.code'=>"code",'u.login'=>"login",'u.name'=>"name",'u.firstname'=>"firstname",'u.office_phone'=>'tel','u.office_fax'=>'fax','u.email'=>'email','u.datec'=>"datecreation",'u.tms'=>"datelastmodification",'u.admin'=>"admin",'u.statut'=>'status','u.fk_socpeople'=>"idcontact",'u.fk_societe'=>"idcompany",'u.note'=>"note",'u.datelastlogin'=>'datelastlogin','u.datepreviouslogin'=>'datepreviouslogin');
|
||||
$this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Tel','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion');
|
||||
$this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.name'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.fk_socpeople'=>"contact",'u.fk_societe'=>"company",'u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user');
|
||||
$this->export_alias_array[$r]=array('u.rowid'=>"rowid",'u.login'=>"login",'u.name'=>"name",'u.firstname'=>"firstname",'u.office_phone'=>'tel','u.office_fax'=>'fax','u.email'=>'email','u.datec'=>"datecreation",'u.tms'=>"datelastmodification",'u.admin'=>"admin",'u.statut'=>'status','u.fk_socpeople'=>"idcontact",'u.fk_societe'=>"idcompany",'u.note'=>"note",'u.datelastlogin'=>'datelastlogin','u.datepreviouslogin'=>'datepreviouslogin');
|
||||
$this->export_sql[$r]="select ";
|
||||
$i=0;
|
||||
foreach ($this->export_alias_array[$r] as $key => $value)
|
||||
|
||||
@ -69,7 +69,7 @@ if ($_GET["id"] > 0)
|
||||
|
||||
/* Liste des tâches */
|
||||
|
||||
$sql = "SELECT t.task_date, t.task_duration, t.fk_user, u.code";
|
||||
$sql = "SELECT t.task_date, t.task_duration, t.fk_user, u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE t.fk_task =".$task->id;
|
||||
|
||||
@ -222,7 +222,7 @@ if($_GET["socid"])
|
||||
$langs->load("users");
|
||||
$title=$langs->trans("ListOfUsers");
|
||||
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.code";
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " ORDER BY u.name ASC ";
|
||||
|
||||
@ -238,7 +238,7 @@ if($_GET["socid"])
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Code").'</td>';
|
||||
print '<td>'.$langs->trans("Login").'</td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -253,7 +253,7 @@ if($_GET["socid"])
|
||||
print img_object($langs->trans("ShowUser"),"user").' ';
|
||||
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
|
||||
print '</a>';
|
||||
print '</td><td>'.$obj->code.'</td>';
|
||||
print '</td><td>'.$obj->login.'</td>';
|
||||
print '<td><a href="commerciaux.php?socid='.$_GET["socid"].'&commid='.$obj->rowid.'">'.$langs->trans("Add").'</a></td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -135,7 +135,7 @@ if ($_GET["id"])
|
||||
|
||||
/* Commentaires */
|
||||
|
||||
$sql = "SELECT c.commentaire, u.firstname, u.name, u.code, c.rowid, c.fk_user";
|
||||
$sql = "SELECT c.commentaire, u.firstname, u.name, u.login, c.rowid, c.fk_user";
|
||||
$sql .= " , ".$db->pdate("c.datec") ." as datec";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_commentaire as c";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
@ -156,7 +156,7 @@ if ($_GET["id"])
|
||||
print "<tr $bc[$var]><td>".strftime("%d/%m/%y %H:%M",$obj->datec);
|
||||
print "</td>\n";
|
||||
print '<td>'.nl2br(stripslashes($obj->commentaire))."</td>\n";
|
||||
print '<td align="center">'.$obj->code."</td>\n";
|
||||
print '<td align="center">'.$obj->login."</td>\n";
|
||||
print '<td align="center"> ';
|
||||
if ($obj->fk_user == $user->id)
|
||||
{
|
||||
|
||||
@ -267,7 +267,7 @@ if ($_GET["id"])
|
||||
|
||||
/* Tarifs */
|
||||
|
||||
$sql = "SELECT t.rowid , t.libelle, tc.temporel, tc.fixe, u.code, tc.rowid, u.code";
|
||||
$sql = "SELECT t.rowid , t.libelle, tc.temporel, tc.fixe, u.login, tc.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif as t";
|
||||
$sql .= "," . MAIN_DB_PREFIX."telephonie_tarif_client as tc";
|
||||
$sql .= "," . MAIN_DB_PREFIX."societe as s";
|
||||
@ -304,7 +304,7 @@ if ($_GET["id"])
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/telephonie/client/tarifs.php?action=delete&tid='.$obj->rowid.'&id='.$soc->id.'">';
|
||||
print img_delete()."</a></td>\n";
|
||||
}
|
||||
print '<td align="center">'.$obj->code."</td>\n";
|
||||
print '<td align="center">'.$obj->login."</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
|
||||
@ -125,13 +125,12 @@ if ($_GET["id"])
|
||||
|
||||
$sql = "SELECT s.idp, s.nom, p.fk_contrat, p.montant, p.avance_duree, p.avance_pourcent";
|
||||
$sql .= ", p.rem_pour_prev, p.rem_pour_autr, p.mode_paiement";
|
||||
$sql .= ", u.name, u.firstname, uu.code";
|
||||
$sql .= ", u.name, u.firstname, u.login";
|
||||
$sql .= " , ".$db->pdate("p.datepo") . " as datepo";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre as p";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."telephonie_contrat as c";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as uu";
|
||||
|
||||
$sql .= " WHERE p.fk_commercial =u.rowid";
|
||||
$sql .= " AND p.fk_user =uu.rowid";
|
||||
@ -179,7 +178,7 @@ if ($_GET["id"])
|
||||
{
|
||||
print '<td align="center">Autre</td>';
|
||||
}
|
||||
print '<td align="center">'.$obj->code.'</td>';
|
||||
print '<td align="center">'.$obj->login.'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -173,7 +173,7 @@ if ($_GET["id"])
|
||||
|
||||
/* Commentaires */
|
||||
|
||||
$sql = "SELECT c.commentaire, u.firstname, u.name, u.code, c.rowid, c.fk_user";
|
||||
$sql = "SELECT c.commentaire, u.firstname, u.name, u.login, c.rowid, c.fk_user";
|
||||
$sql .= " , ".$db->pdate("c.datec") ." as datec";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne_comments as c";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
@ -194,7 +194,7 @@ if ($_GET["id"])
|
||||
print "<tr $bc[$var]><td>".strftime("%d/%m/%y %H:%M",$obj->datec);
|
||||
print "</td>\n";
|
||||
print '<td>'.nl2br(stripslashes($obj->commentaire))."</td>\n";
|
||||
print '<td align="center">'.$obj->code."</td>\n";
|
||||
print '<td align="center">'.$obj->login."</td>\n";
|
||||
print '<td align="center"> ';
|
||||
if ($obj->fk_user == $user->id)
|
||||
{
|
||||
|
||||
@ -662,7 +662,7 @@ else
|
||||
}
|
||||
|
||||
$sql = "SELECT ".$db->pdate("l.tms").", l.statut, l.fk_user";
|
||||
$sql .= ", u.code, u.code, l.comment, l.fk_fournisseur";
|
||||
$sql .= ", u.login, l.comment, l.fk_fournisseur";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne_statut as l";
|
||||
$sql .= ",".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE u.rowid = l.fk_user AND l.fk_ligne = ".$ligne->id;
|
||||
|
||||
@ -198,7 +198,7 @@ $offset = $conf->liste_limit * $page ;
|
||||
$sql = "SELECT d.libelle as tarif_desc, d.type_tarif";
|
||||
$sql .= " , t.libelle as tarif";
|
||||
$sql .= " , m.temporel, m.fixe, t.rowid";
|
||||
$sql .= " , u.code";
|
||||
$sql .= " , u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d";
|
||||
$sql .= "," . MAIN_DB_PREFIX."telephonie_tarif_montant as m";
|
||||
$sql .= "," . MAIN_DB_PREFIX."telephonie_tarif as t";
|
||||
@ -260,7 +260,7 @@ if ($result)
|
||||
print "<td>".sprintf("%01.4f",$obj->temporel)."</td>\n";
|
||||
print "<td>".sprintf("%01.4f",$obj->fixe)."</td>\n";
|
||||
print "<td>".$obj->type_tarif."</td>\n";
|
||||
print "<td>".$obj->code."</td>\n";
|
||||
print "<td>".$obj->login."</td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ $offset = $conf->liste_limit * $page ;
|
||||
$sql = "SELECT d.rowid as grille, d.libelle as tarif_desc, d.type_tarif";
|
||||
$sql .= " , t.libelle as tarif, t.rowid as tarif_id";
|
||||
$sql .= " , m.temporel, m.fixe";
|
||||
$sql .= " , u.code";
|
||||
$sql .= " , u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d";
|
||||
$sql .= "," . MAIN_DB_PREFIX."telephonie_tarif_grille_rights as r";
|
||||
$sql .= "," . MAIN_DB_PREFIX."telephonie_tarif_montant as m";
|
||||
@ -155,7 +155,7 @@ if ($resql)
|
||||
print "<td>".sprintf("%01.4f",$obj->temporel)."</td>\n";
|
||||
print "<td>".sprintf("%01.4f",$obj->fixe)."</td>\n";
|
||||
print '<td align="center">'.$obj->type_tarif."</td>\n";
|
||||
print '<td align="center">'.$obj->code."</td>\n";
|
||||
print '<td align="center">'.$obj->login."</td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ $offset = $conf->liste_limit * $page ;
|
||||
*/
|
||||
|
||||
$sql = "SELECT d.rowid as grille, d.libelle as tarif_desc, d.type_tarif";
|
||||
$sql .= " , u.code, u.name, u.firstname";
|
||||
$sql .= " , u.login, u.name, u.firstname";
|
||||
$sql .= " , r.pread, r.pwrite";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d";
|
||||
$sql .= "," . MAIN_DB_PREFIX."telephonie_tarif_grille_rights as r";
|
||||
|
||||
@ -274,7 +274,7 @@ else
|
||||
// On sélectionne les users qui ne sont pas déjà dans le groupe
|
||||
$uss = array();
|
||||
|
||||
$sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.code, u.admin";
|
||||
$sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
# $sql .= " LEFT JOIN llx_usergroup_user ug ON u.rowid = ug.fk_user";
|
||||
# $sql .= " WHERE ug.fk_usergroup IS NULL";
|
||||
@ -318,7 +318,7 @@ else
|
||||
/*
|
||||
* Membres du groupe
|
||||
*/
|
||||
$sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.code, u.admin";
|
||||
$sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||
$sql.= " WHERE ug.fk_user = u.rowid";
|
||||
@ -338,7 +338,6 @@ else
|
||||
print '<td width="25%">'.$langs->trans("Login").'</td>';
|
||||
print '<td width="25%">'.$langs->trans("Lastname").'</td>';
|
||||
print '<td width="25%">'.$langs->trans("Firstname").'</td>';
|
||||
print '<td>'.$langs->trans("Code").'</td>';
|
||||
print "<td> </td></tr>\n";
|
||||
if ($num) {
|
||||
$var=True;
|
||||
@ -354,7 +353,6 @@ else
|
||||
print '</td>';
|
||||
print '<td>'.ucfirst(stripslashes($obj->name)).'</td>';
|
||||
print '<td>'.ucfirst(stripslashes($obj->firstname)).'</td>';
|
||||
print '<td>'.$obj->code.'</td><td>';
|
||||
|
||||
if ($user->admin)
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||
*/
|
||||
$max=10;
|
||||
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.login, u.code, u.fk_societe, ".$db->pdate("u.datec")." as datec,";
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.login, u.fk_societe, ".$db->pdate("u.datec")." as datec,";
|
||||
$sql.= " u.ldap_sid, s.nom";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe=s.idp";
|
||||
|
||||
@ -66,7 +66,7 @@ if ($_POST["search_user"])
|
||||
{
|
||||
$sql.= " AND (u.name like '%".$_POST["search_user"]."%' OR u.firstname like '%".$_POST["search_user"]."%')";
|
||||
}
|
||||
if ($sall) $sql.= " AND (u.login like '%".$sall."%' OR u.name like '%".$sall."%' OR u.firstname like '%".$sall."%' OR u.code like '%".$sall."%' OR u.email like '%".$sall."%' OR u.note like '%".$sall."%')";
|
||||
if ($sall) $sql.= " AND (u.login like '%".$sall."%' OR u.name like '%".$sall."%' OR u.firstname like '%".$sall."%' OR u.email like '%".$sall."%' OR u.note like '%".$sall."%')";
|
||||
if ($sortfield) $sql.=" ORDER BY $sortfield $sortorder";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -715,10 +715,9 @@ alter table llx_user add column office_fax varchar(20);
|
||||
alter table llx_user add column user_mobile varchar(20);
|
||||
|
||||
alter table llx_user modify login varchar(24) NOT NULL;
|
||||
alter table llx_user modify code varchar(4) NOT NULL;
|
||||
alter table llx_user drop code;
|
||||
|
||||
ALTER TABLE llx_user ADD UNIQUE uk_user_login (login);
|
||||
ALTER TABLE llx_user ADD UNIQUE uk_user_code (code);
|
||||
|
||||
|
||||
alter table llx_boxes add column fk_user integer;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2007 Regis Houssin <regis.houssin@cap-networks.com>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -22,6 +23,4 @@
|
||||
-- ===========================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_user ADD UNIQUE uk_user_login (login);
|
||||
ALTER TABLE llx_user ADD UNIQUE uk_user_code (code);
|
||||
|
||||
ALTER TABLE llx_user ADD UNIQUE uk_user_login (login);
|
||||
@ -1,6 +1,7 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2007 Regis Houssin <regis.houssin@cap-networks.com>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -30,7 +31,6 @@ create table llx_user
|
||||
pass varchar(32),
|
||||
name varchar(50),
|
||||
firstname varchar(50),
|
||||
code varchar(4) NOT NULL,
|
||||
office_phone varchar(20),
|
||||
office_fax varchar(20),
|
||||
user_mobile varchar(20),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user