diff --git a/htdocs/comm/action/index.php3 b/htdocs/comm/action/index.php3 index ac874682520..8ee42565e53 100644 --- a/htdocs/comm/action/index.php3 +++ b/htdocs/comm/action/index.php3 @@ -125,7 +125,7 @@ if ($socid) { print_barre_liste("Liste des actions commerciales effectuées sur " . $societe->nom,$page, $PHP_SELF); $sql = "SELECT a.id,".$db->pdate("a.datea")." as da, c.libelle, u.code, a.note, u.name, u.firstname "; - $sql .= " FROM actioncomm as a, c_actioncomm as c, llx_user as u"; + $sql .= " FROM llx_actioncomm as a, c_actioncomm as c, llx_user as u"; $sql .= " WHERE a.fk_soc = $socid AND c.id=a.fk_action AND a.fk_user_author = u.rowid"; if ($type) { @@ -167,8 +167,8 @@ else print_barre_liste("Liste des actions commerciales effectuées",$page, $PHP_SELF); - $sql = "SELECT s.nom as societe, s.idp as socidp,a.id,".$db->pdate("a.datea")." as da, a.datea, c.libelle, u.code, a.fk_contact "; - $sql .= " FROM actioncomm as a, c_actioncomm as c, societe as s, llx_user as u"; + $sql = "SELECT s.nom as llx_societe, s.idp as socidp,a.id,".$db->pdate("a.datea")." as da, a.datea, c.libelle, u.code, a.fk_contact "; + $sql .= " FROM llx_actioncomm as a, c_actioncomm as c, llx_societe as s, llx_user as u"; $sql .= " WHERE a.fk_soc = s.idp AND c.id=a.fk_action AND a.fk_user_author = u.rowid"; if ($type) { diff --git a/htdocs/comm/contact.php3 b/htdocs/comm/contact.php3 index a77a88e1d2b..3d8b72e1bb9 100644 --- a/htdocs/comm/contact.php3 +++ b/htdocs/comm/contact.php3 @@ -58,7 +58,7 @@ print_barre_liste("Liste des contacts",$page, $PHP_SELF,"",$sortfield,$sortorder $sql = "SELECT s.idp, s.nom, st.libelle as stcomm, p.idp as cidp, p.name, p.firstname, p.email, p.phone "; -$sql .= "FROM societe as s, socpeople as p, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.idp = p.fk_soc"; +$sql .= "FROM llx_societe as s, llx_socpeople as p, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.idp = p.fk_soc"; if (strlen($stcomm)) // statut commercial { diff --git a/htdocs/comm/fiche.php3 b/htdocs/comm/fiche.php3 index ce1469ff986..eab65498613 100644 --- a/htdocs/comm/fiche.php3 +++ b/htdocs/comm/fiche.php3 @@ -50,7 +50,7 @@ if ($action == 'recontact') { } if ($action == 'note') { - $sql = "UPDATE societe SET note='$note' WHERE idp=$socid"; + $sql = "UPDATE llx_societe SET note='$note' WHERE idp=$socid"; $result = $db->query($sql); } @@ -61,7 +61,7 @@ if ($action == 'stcomm') { $result = @$db->query($sql); if ($result) { - $sql = "UPDATE societe SET fk_stcomm=$stcommid WHERE idp=$socid"; + $sql = "UPDATE llx_societe SET fk_stcomm=$stcommid WHERE idp=$socid"; $result = $db->query($sql); } else { $errmesg = "ERREUR DE DATE !"; @@ -69,7 +69,7 @@ if ($action == 'stcomm') { } if ($actioncommid) { - $sql = "INSERT INTO actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')"; + $sql = "INSERT INTO llx_actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')"; $result = @$db->query($sql); if (!$result) { @@ -85,7 +85,7 @@ if ($action == 'stcomm') { */ if ($mode == 'search') { if ($mode-search == 'soc') { - $sql = "SELECT s.idp FROM societe as s "; + $sql = "SELECT s.idp FROM llx_societe as s "; $sql .= " WHERE lower(s.nom) like '%".strtolower($socname)."%'"; } @@ -114,7 +114,7 @@ if ($socid > 0) { $societe = new Societe($db, $socid); - $sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description FROM societe as s, c_stcomm as st, c_typent as t, c_effectif as e "; + $sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description FROM llx_societe as s, c_stcomm as st, c_typent as t, c_effectif as e "; $sql .= " WHERE s.fk_stcomm=st.id AND s.fk_typent = t.id AND s.fk_effectif = e.id"; if ($to == 'next') { @@ -201,7 +201,7 @@ if ($socid > 0) { print '
| Fax | idp&action=addcontact\">Ajouter | "; - $sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note FROM socpeople as p WHERE p.fk_soc = $objsoc->idp ORDER by p.datec"; + $sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note FROM llx_socpeople as p WHERE p.fk_soc = $objsoc->idp ORDER by p.datec"; $result = $db->query($sql); $i = 0 ; $num = $db->num_rows(); $tag = True; while ($i < $num) @@ -334,7 +334,7 @@ if ($socid > 0) { print ''; $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM actioncomm as a, c_actioncomm as c, llx_user as u "; + $sql .= " FROM llx_actioncomm as a, c_actioncomm as c, llx_user as u "; $sql .= " WHERE a.fk_soc = $objsoc->idp "; $sql .= " AND u.rowid = a.fk_user_author"; $sql .= " AND c.id=a.fk_action AND a.percent < 100"; @@ -410,7 +410,7 @@ if ($socid > 0) { print ' | ';
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
- $sql .= " FROM actioncomm as a, c_actioncomm as c, llx_user as u ";
+ $sql .= " FROM llx_actioncomm as a, c_actioncomm as c, llx_user as u ";
$sql .= " WHERE a.fk_soc = $objsoc->idp ";
$sql .= " AND u.rowid = a.fk_user_author";
$sql .= " AND c.id=a.fk_action AND a.percent = 100";
diff --git a/htdocs/comm/index.php3 b/htdocs/comm/index.php3
index ac27e7475f2..e498f0c87d4 100644
--- a/htdocs/comm/index.php3
+++ b/htdocs/comm/index.php3
@@ -1,5 +1,5 @@
+/* Copyright (C) 2001-2003 Rodolphe Quiedeville | Propositions commerciales | ";
print "\n";
$sql = "SELECT count(*) FROM llx_propal WHERE fk_statut = 0";
-if (valeur($sql)) {
+if (valeur($sql))
+{
$var=!$var;
print "Brouillons | ".valeur($sql)." | Ouvertes | ".valeur($sql)." | |

